tech/cisco/networking

NETWORKING

Cisco switching and routing — IOS/IOS-XE/NX-OS, VLANs, STP, inter-VLAN routing, OSPF, EIGRP, BGP, QoS.

production
requires: tech/cisco
improves: tech/cisco

Cisco Networking

Stub — full skill pending. Core patterns documented below.

Platform coverage

PlatformOSTypical use
Catalyst 9000 seriesIOS-XEEnterprise access/distribution/core switching
Nexus 9000 seriesNX-OSData centre switching, VXLAN fabric
ISR/ASR routersIOS-XEBranch/WAN routing, SD-WAN headend
CSR 1000v / Catalyst 8000vIOS-XEVirtual router (VM or cloud)

VLANs and trunking

! Create VLANs
vlan 10
 name SERVERS
vlan 20
 name CLIENTS
vlan 30
 name MANAGEMENT

! Access port
interface GigabitEthernet1/0/1
 switchport mode access
 switchport access vlan 10

! Trunk port (to upstream switch or router)
interface GigabitEthernet1/0/48
 switchport mode trunk
 switchport trunk allowed vlan 10,20,30

Inter-VLAN routing (Layer 3 switch)

! Enable IP routing
ip routing

! SVI per VLAN
interface Vlan10
 ip address 10.10.10.1 255.255.255.0
 no shutdown

interface Vlan20
 ip address 10.10.20.1 255.255.255.0
 no shutdown

OSPF (most common enterprise IGP)

router ospf 1
 router-id 1.1.1.1
 network 10.10.0.0 0.0.255.255 area 0
 passive-interface default
 no passive-interface GigabitEthernet0/0

BGP (WAN / internet peering)

router bgp 65001
 bgp router-id 1.1.1.1
 neighbor 203.0.113.1 remote-as 65002
 neighbor 203.0.113.1 description ISP_PEER
 address-family ipv4 unicast
  neighbor 203.0.113.1 activate
  network 196.x.x.0 mask 255.255.255.0

Spanning Tree (access layer)

! Enable Rapid PVST+ (default on Catalyst)
spanning-tree mode rapid-pvst

! Set root bridge for VLAN 10
spanning-tree vlan 10 priority 4096

! PortFast + BPDU Guard on access ports
interface GigabitEthernet1/0/1
 spanning-tree portfast
 spanning-tree bpduguard enable

Gotchas