clifford.network / toolbox

free library

Proven Designs

Twenty-five building blocks, from the campus and branch designs that turn up on almost every network to EVPN fabrics, ACI, SD-Access, SD-WAN, firewall clusters, ISE and a three-hub internet overlay with BGP and BFD, plus five worked cases that start from a real-world brief (a WAN replacement after acquisitions, separating OT from IT, disaster recovery without stretched VLANs, a two-site enterprise with a three-tier HQ, dual ISPs and GRE over IPsec, and routing that follows an active/passive firewall across two EVPN sites), drawn out with the rules that make them work, a full addressing pattern, copyable config, and the tests to run before you call the job done. Addresses are documentation examples. Swap in your own.

01 / Campus

Collapsed core with HSRP on the STP root

IOS XE, Catalyst 9000

One building, two core switches, layer 2 to the access closets. The most common campus design there is, and the one most often built with the gateway and the spanning-tree root on different switches.

Po1, 2 x 10G LACPCORE-1STP root + HSRP activeVLAN 10, 30CORE-2STP root + HSRP activeVLAN 20, 40ACCESS-1ACCESS-2ACCESS-3Shown for VLAN 10: every uplink to CORE-1 forwards, every uplink to CORE-2 blocks. VLAN 20 is the mirror image.
Layer 2 trunkPort-channelRoutedBlocked by STPKeepalive, tunnel or out-of-band

The rules

  1. For every VLAN, the same switch is the spanning-tree root and the HSRP active gateway. If they differ, traffic crosses the inter-core link twice.
  2. Split the VLANs: odd VLANs on CORE-1, even on CORE-2, so both cores and both uplinks carry traffic.
  3. Set explicit STP priorities (4096 and 8192). Do not use the root primary macro.
  4. HSRP version 2, preempt with a delay so routing and the port-channel settle before the gateway moves back.
  5. Inter-core link is an LACP port-channel of at least two links on different line cards or stack members.
  6. Root guard on core downlinks, BPDU Guard and PortFast on every access edge port, explicit allowed VLAN lists on every trunk.

Addressing

VLANSubnetGateway (VIP)CORE-1CORE-2Root and active
10 Users10.10.10.0/24.1.2.3CORE-1
20 Voice10.10.20.0/24.1.2.3CORE-2
30 Wireless10.10.30.0/23.1.2.3CORE-1
40 Printers10.10.40.0/26.1.2.3CORE-2

Config

CORE-1
spanning-tree mode rapid-pvst
spanning-tree vlan 10,30 priority 4096
spanning-tree vlan 20,40 priority 8192
!
interface Vlan10
 ip address 10.10.10.2 255.255.255.0
 standby version 2
 standby 10 ip 10.10.10.1
 standby 10 priority 110
 standby 10 preempt delay minimum 60
!
interface Vlan20
 ip address 10.10.20.2 255.255.255.0
 standby version 2
 standby 20 ip 10.10.20.1
 standby 20 priority 100
 standby 20 preempt delay minimum 60
!
interface range TenGigabitEthernet1/1/1 - 2
 channel-group 1 mode active
interface Port-channel1
 description CORE-2
 switchport mode trunk
 switchport nonegotiate
 switchport trunk allowed vlan 10,20,30,40
!
interface range GigabitEthernet1/0/1 - 3
 description Downlinks to access
 switchport mode trunk
 switchport nonegotiate
 switchport trunk allowed vlan 10,20,30,40
 spanning-tree guard root
CORE-2
spanning-tree mode rapid-pvst
spanning-tree vlan 20,40 priority 4096
spanning-tree vlan 10,30 priority 8192
!
interface Vlan10
 ip address 10.10.10.3 255.255.255.0
 standby version 2
 standby 10 ip 10.10.10.1
 standby 10 priority 100
 standby 10 preempt delay minimum 60
!
interface Vlan20
 ip address 10.10.20.3 255.255.255.0
 standby version 2
 standby 20 ip 10.10.20.1
 standby 20 priority 110
 standby 20 preempt delay minimum 60
! port-channel and downlinks as CORE-1

Verify

show
show spanning-tree root
show standby brief
show etherchannel summary
show interfaces trunk

Prove it before you sign it off

TestExpect
Compare the two outputs aboveFor each VLAN, the root bridge and the HSRP active router are the same switch.
Reload CORE-1CORE-2 becomes active for VLAN 10 and 30 when the 10 second hold time expires (default timers). Hosts keep the same gateway MAC.
CORE-1 returnsIt takes back VLAN 10 and 30 after the 60 second preempt delay, not before.
Shut one Po1 memberPo1 stays up on the other link. No STP change.
02 / Branch

Dual-WAN branch with a tracked default route

IOS XE, ISR and Catalyst 8000 routers

A branch router with a primary internet or WAN circuit and a cheaper backup. You want failover that notices when the provider is broken, not just when the cable is unplugged.

Gi0/0/0Gi0/0/1Branch LAN10.20.0.0/24BRANCH-RTRIP SLA 10 + track 10ISP AprimaryISP Bbackup, AD 250Probe targetbeyond ISP AThe probe is pinned to ISP A and dropped, never rerouted, if ISP A fails.
Layer 2 trunkPort-channelRoutedBlocked by STPKeepalive, tunnel or out-of-band

The rules

  1. Probe something beyond the provider's router. Their router can answer while their network is down.
  2. Pin the probe address to ISP A with a host route, and add a Null0 host route behind it. Without the Null0 route the probe fails over to ISP B, succeeds, and the default route flaps back and forth.
  3. Damp the track with a delay: quick to fail (30 seconds), slow to return (60 seconds or more).
  4. The backup default route has a distance of 250 so it only appears when the tracked route is gone.
  5. NAT each provider with its own route-map matched on the outgoing interface, so traffic is translated to the address of the link it leaves on.
  6. Existing sessions break on failover because their NAT address changes. Tell the users, it is not a fault.

Addressing

ItemValueNote
ISP A link203.0.113.2/30next hop 203.0.113.1
ISP B link198.51.100.2/30next hop 198.51.100.1
Probe target192.0.2.53replace with a stable address you are allowed to ping
LAN10.20.0.0/24NAT inside

Config

BRANCH-RTR
ip sla 10
 icmp-echo 192.0.2.53 source-interface GigabitEthernet0/0/0
 threshold 1000
 timeout 1000
 frequency 10
ip sla schedule 10 life forever start-time now
!
track 10 ip sla 10 reachability
 delay down 30 up 60
!
! pin the probe to ISP A, and drop it rather than reroute it
ip route 192.0.2.53 255.255.255.255 203.0.113.1
ip route 192.0.2.53 255.255.255.255 Null0 250
!
ip route 0.0.0.0 0.0.0.0 203.0.113.1 track 10
ip route 0.0.0.0 0.0.0.0 198.51.100.1 250
!
ip access-list standard NAT-INSIDE
 permit 10.20.0.0 0.0.0.255
route-map NAT-ISPA permit 10
 match ip address NAT-INSIDE
 match interface GigabitEthernet0/0/0
route-map NAT-ISPB permit 10
 match ip address NAT-INSIDE
 match interface GigabitEthernet0/0/1
!
ip nat inside source route-map NAT-ISPA interface GigabitEthernet0/0/0 overload
ip nat inside source route-map NAT-ISPB interface GigabitEthernet0/0/1 overload

Verify

show
show ip sla statistics 10
show track 10
show ip route 0.0.0.0
show ip nat translations | count .

Prove it before you sign it off

TestExpect
Normal runningtrack 10 is Up, the default route points at 203.0.113.1, SLA return code OK.
Block the probe upstream, or shut Gi0/0/0After about 30 seconds track 10 goes Down and the default route moves to 198.51.100.1.
ISP A recoversThe route returns 60 seconds after the probe succeeds again, not on the first reply.
Watch for flappingshow track 10 shows one change per event. Repeated changes mean the probe is escaping via ISP B.
03 / Internet edge

Dual-homed internet edge with BGP to two providers

IOS XE, ISR and Catalyst 8000 routers

You hold your own address block and AS number and want to stay online when either provider fails. One provider is primary, the other is backup, and neither should ever be able to use you as a path to the other.

eBGPeBGPiBGP between loopbacksOSPFOSPFISP AAS 64496, primaryISP BAS 64511, backupEDGE-1AS 64500, LP 200EDGE-2AS 64500, prepend x3Firewall pair203.0.113.0/24 insideEach provider hears 203.0.113.0/24 and nothing else.
Layer 2 trunkPort-channelRoutedBlocked by STPKeepalive, tunnel or out-of-band

The rules

  1. Send each provider your own prefix and nothing else: a prefix list plus an AS-path filter of ^$. Without both, one provider's routes leak to the other and you become their transit.
  2. Take only what you need from each provider, usually a default route, and set a maximum-prefix limit that restarts on its own.
  3. Originate the block with a network statement and a Null0 route at distance 254, so the static only holds the prefix in the table when nothing better exists.
  4. Outbound: local preference 200 on the primary provider's default. It is shared over iBGP, so both routers send internet traffic to ISP A.
  5. Inbound: prepend your AS three times on the backup. MED is no use between two providers, and never announce a more-specific on one link only, because the most specific route beats any prepend.
  6. Run iBGP between loopbacks with next-hop-self, and let OSPF carry the loopbacks, not the provider links.
  7. Put the default into OSPF without "always", with a better metric on EDGE-1, so it disappears when the BGP default does.
  8. Prepending moves most of the internet, not ISP B's own customers: providers prefer customer routes. For more control, use ISP B's documented communities to lower its local preference.
  9. A /24 is the smallest prefix most networks accept, so a single /24 cannot be split to share load. With a /23 or larger, announce the aggregate on both links and half on each.

Addressing

ItemValueNote
Our AS and prefixAS 64500, 203.0.113.0/24documentation values, swap in your own
ISP A link192.0.2.0/30ISP A .1 (AS 64496), EDGE-1 .2
ISP B link198.51.100.0/30ISP B .1 (AS 64511), EDGE-2 .2
Loopbacks10.255.0.1, 10.255.0.2iBGP peering and router IDs
Inside transit10.0.0.0/29EDGE-1 .1, EDGE-2 .2, firewall .3, OSPF area 0

Config

EDGE-1
interface Loopback0
 ip address 10.255.0.1 255.255.255.255
interface GigabitEthernet0/0/0
 description ISP A
 ip address 192.0.2.2 255.255.255.252
interface GigabitEthernet0/0/1
 description Inside transit
 ip address 10.0.0.1 255.255.255.248
!
router ospf 1
 router-id 10.255.0.1
 passive-interface default
 no passive-interface GigabitEthernet0/0/1
 network 10.0.0.0 0.0.0.7 area 0
 network 10.255.0.1 0.0.0.0 area 0
 default-information originate metric 10
!
ip route 203.0.113.0 255.255.255.0 Null0 254
ip prefix-list OUR-PREFIXES seq 5 permit 203.0.113.0/24
ip prefix-list DEFAULT-ONLY seq 5 permit 0.0.0.0/0
ip as-path access-list 10 permit ^$
!
route-map ISP-A-IN permit 10
 match ip address prefix-list DEFAULT-ONLY
 set local-preference 200
route-map ISP-A-OUT permit 10
 match ip address prefix-list OUR-PREFIXES
!
router bgp 64500
 bgp router-id 10.255.0.1
 bgp log-neighbor-changes
 neighbor 192.0.2.1 remote-as 64496
 neighbor 192.0.2.1 description ISP A
 neighbor 192.0.2.1 password <agreed with ISP A>
 neighbor 10.255.0.2 remote-as 64500
 neighbor 10.255.0.2 description EDGE-2
 neighbor 10.255.0.2 update-source Loopback0
 !
 address-family ipv4
  network 203.0.113.0 mask 255.255.255.0
  neighbor 192.0.2.1 activate
  neighbor 192.0.2.1 route-map ISP-A-IN in
  neighbor 192.0.2.1 route-map ISP-A-OUT out
  neighbor 192.0.2.1 filter-list 10 out
  neighbor 192.0.2.1 maximum-prefix 100 80 restart 15
  neighbor 10.255.0.2 activate
  neighbor 10.255.0.2 next-hop-self
EDGE-2
interface Loopback0
 ip address 10.255.0.2 255.255.255.255
interface GigabitEthernet0/0/0
 description ISP B
 ip address 198.51.100.2 255.255.255.252
interface GigabitEthernet0/0/1
 description Inside transit
 ip address 10.0.0.2 255.255.255.248
!
router ospf 1
 router-id 10.255.0.2
 passive-interface default
 no passive-interface GigabitEthernet0/0/1
 network 10.0.0.0 0.0.0.7 area 0
 network 10.255.0.2 0.0.0.0 area 0
 default-information originate metric 20
!
ip route 203.0.113.0 255.255.255.0 Null0 254
ip prefix-list OUR-PREFIXES seq 5 permit 203.0.113.0/24
ip prefix-list DEFAULT-ONLY seq 5 permit 0.0.0.0/0
ip as-path access-list 10 permit ^$
!
route-map ISP-B-IN permit 10
 match ip address prefix-list DEFAULT-ONLY
route-map ISP-B-OUT permit 10
 match ip address prefix-list OUR-PREFIXES
 set as-path prepend 64500 64500 64500
!
router bgp 64500
 bgp router-id 10.255.0.2
 bgp log-neighbor-changes
 neighbor 198.51.100.1 remote-as 64511
 neighbor 198.51.100.1 description ISP B
 neighbor 198.51.100.1 password <agreed with ISP B>
 neighbor 10.255.0.1 remote-as 64500
 neighbor 10.255.0.1 description EDGE-1
 neighbor 10.255.0.1 update-source Loopback0
 !
 address-family ipv4
  network 203.0.113.0 mask 255.255.255.0
  neighbor 198.51.100.1 activate
  neighbor 198.51.100.1 route-map ISP-B-IN in
  neighbor 198.51.100.1 route-map ISP-B-OUT out
  neighbor 198.51.100.1 filter-list 10 out
  neighbor 198.51.100.1 maximum-prefix 100 80 restart 15
  neighbor 10.255.0.1 activate
  neighbor 10.255.0.1 next-hop-self

Verify

show
show ip bgp summary
show ip bgp neighbors 192.0.2.1 advertised-routes
show ip bgp neighbors 192.0.2.1 routes
show ip bgp 0.0.0.0
show ip route 0.0.0.0
show ip ospf database external 0.0.0.0

Prove it before you sign it off

TestExpect
advertised-routes to each providerExactly one line: 203.0.113.0/24. Anything else is a leak.
show ip bgp 0.0.0.0 on EDGE-2Best path is via 10.255.0.1 with local preference 200; the ISP B default is a valid backup.
A looking glass or RIPEstat from outsideYour prefix via 64496 64500 as the usual path; via ISP B it shows 64500 four times.
Shut the ISP A sessionWithin the hold time both routers use ISP B for outbound, and inbound moves to ISP B as ISP A withdraws your prefix.
Shut both sessions in a labNo default in OSPF at all, so the firewall knows the internet is gone rather than sending traffic into a black hole.
04 / Data centre and campus

Firewall transit /29 per VRF

IOS XE core with an HA firewall pair

A core switch routes several security zones (for example corporate, guest and payment) and every zone must reach the others and the internet only through a firewall pair. Each zone is a VRF with its own small transit network to the firewall.

trunk 901-903trunk 901-903HA linkCOREVRF CORP | VRF GUEST | VRF PCIFW-1active, .5FW-2standby, .6InternetIn every transit /29 the firewall VIP is network + 4.
Layer 2 trunkPort-channelRoutedBlocked by STPKeepalive, tunnel or out-of-band

The rules

  1. One VRF per zone on the core, one transit VLAN and one /29 per VRF. Traffic between zones has no path except through the firewall.
  2. The same offsets in every /29: +1 core switch, +2 and +3 kept for a second core or HSRP later, +4 firewall virtual address, +5 FW-1, +6 FW-2. Anyone can find the firewall without a diagram.
  3. Each VRF has a default route to +4. The firewall routes the zone's subnets back to +1.
  4. Firewall-facing ports are trunks with negotiation off and only the transit VLANs allowed.
  5. Mark them as edge trunks. Firewalls do not run spanning tree, and a failover should not wait for STP to move a port to forwarding.
  6. Keep one numbering scheme for VLAN, VRF and subnet, so VLAN 902 is always the second zone and 10.255.1.8/29.

Addressing

VRFVLANTransit /29Core (+1)FW VIP (+4)FW-1, FW-2
CORP90110.255.1.0/2910.255.1.110.255.1.4.5, .6
GUEST90210.255.1.8/2910.255.1.910.255.1.12.13, .14
PCI90310.255.1.16/2910.255.1.1710.255.1.20.21, .22

Config

CORE
vrf definition CORP
 address-family ipv4
!
vlan 901
 name TRANSIT-CORP
!
interface Vlan901
 description Transit to firewall, VRF CORP
 vrf forwarding CORP
 ip address 10.255.1.1 255.255.255.248
!
ip route vrf CORP 0.0.0.0 0.0.0.0 10.255.1.4 name FW-VIP
!
! users in VRF CORP
interface Vlan10
 vrf forwarding CORP
 ip address 10.10.10.1 255.255.255.0
!
! repeat for GUEST (902, 10.255.1.8/29) and PCI (903, 10.255.1.16/29)
!
interface range GigabitEthernet1/0/47 - 48
 description FW-1 and FW-2
 switchport mode trunk
 switchport nonegotiate
 switchport trunk allowed vlan 901-903
 spanning-tree portfast edge trunk

Verify

show
show vrf
show ip route vrf CORP 0.0.0.0
show ip arp vrf CORP 10.255.1.4
ping vrf CORP 10.255.1.4 source Vlan10

Prove it before you sign it off

TestExpect
ARP for the VIPOne MAC for 10.255.1.4, owned by the active firewall.
Fail the firewall overThe VIP moves to FW-2. The core ARP entry updates from gratuitous ARP and pings lose at most a few packets.
Traceroute from a GUEST host to a CORP hostThe second hop is the firewall (10.255.1.12). The core has no direct route between zones.
show spanning-tree interface Gi1/0/47 detailThe port is in the portfast edge trunk mode, and forwarding.
05 / Data centre

vPC pair with dual-attached access

NX-OS, Nexus 9000

Two Nexus switches act as one for the devices below them, so every server or access switch has an active-active port-channel with no blocked links.

Po1 peer-linkkeepalive via mgmt0N9K-1vPC primary, role 10N9K-2vPC secondary, role 20ACCESS-1Po20 = vPC 20SERVER-1Po30 = vPC 30Keepalive takes a different path from the peer-link. Nothing is single-attached.
Layer 2 trunkPort-channelRoutedBlocked by STPKeepalive, tunnel or out-of-band

The rules

  1. The peer keepalive never runs over the peer-link. Use mgmt0 in the management VRF or a dedicated routed link.
  2. Peer-link: at least two links on different modules, a trunk, spanning-tree port type network.
  3. peer-gateway, so hosts that reply to the physical MAC of the other switch are still routed locally.
  4. peer-switch with the same STP priority on both, so the pair appears as one root.
  5. auto-recovery and delay restore, so a single switch coming back on its own still brings its vPCs up, and routing converges before they forward.
  6. Use the same number for the vPC and the port-channel. Dual-attach everything, or orphan ports lose service when the peer-link fails.

Addressing

ItemN9K-1N9K-2Note
mgmt0 (keepalive)192.168.0.1/24192.168.0.2/24VRF management
Role priority1020lower is primary
STP priority40964096same, with peer-switch
Vlan10 gateway10.30.10.210.30.10.3HSRP VIP .1, both forward

Config

N9K-1
feature lacp
feature vpc
feature interface-vlan
feature hsrp
!
spanning-tree vlan 1-3967 priority 4096
!
vpc domain 10
  role priority 10
  peer-keepalive destination 192.168.0.2 source 192.168.0.1 vrf management
  peer-switch
  peer-gateway
  auto-recovery
  ip arp synchronize
  delay restore 150
!
interface port-channel1
  description vPC peer-link
  switchport mode trunk
  spanning-tree port type network
  vpc peer-link
interface Ethernet1/49-50
  channel-group 1 mode active
!
interface port-channel20
  description ACCESS-1
  switchport mode trunk
  switchport trunk allowed vlan 10,20
  vpc 20
interface Ethernet1/1
  channel-group 20 mode active
N9K-2
! as N9K-1, with these differences
vpc domain 10
  role priority 20
  peer-keepalive destination 192.168.0.1 source 192.168.0.2 vrf management

Verify

show
show vpc brief
show vpc consistency-parameters global
show vpc orphan-ports
show port-channel summary

Prove it before you sign it off

TestExpect
show vpc briefPeer status: peer adjacency formed ok. Keepalive: peer is alive. Every vPC shows consistency success.
Shut one access uplinkPo20 stays up on the other switch. No STP topology change.
Fail the peer-link with the keepalive upThe secondary suspends its vPC ports and SVIs. Dual-attached devices carry on through the primary.
Reload N9K-1N9K-2 keeps forwarding and takes the primary role. vPCs come back on N9K-1 after delay restore.
06 / Data centre

vPC pair with routed uplinks, a firewall pair and a backup path

NX-OS, Nexus 9000, with an ASA pair

The data centre core is a vPC pair. It routes to the LAN core over its own links, carries a firewall pair on vPCs, and keeps the protected VLANs reachable only through the firewall.

routed /31sPo1 peer-linkEth1/48 L3 backupCORE-1LAN coreCORE-2LAN coreN9K-1vPC primaryN9K-2vPC secondaryFW-AactiveFW-BstandbySERVERSVLAN 10, vPC 30Keepalive on mgmt0 not drawn. No routing adjacency runs over a vPC.
Layer 2 trunkPort-channelRoutedBlocked by STPKeepalive, tunnel or out-of-band

The rules

  1. Uplinks to the LAN core are routed point-to-point links from each Nexus, not a vPC. Each switch runs its own OSPF adjacencies, and the core load-shares across all four links.
  2. A routed link between the two peers, with its own OSPF adjacency, so a switch that loses its uplinks routes through its partner instead of dropping the traffic hashed to it.
  3. The firewalls attach with a port-channel each, one link to each Nexus, as vPC trunks. The Nexus reaches the protected subnets with static routes to the firewall's outside address, and the firewalls point their default route at the HSRP address. No routing protocol runs over the vPC.
  4. Protected VLANs exist only at layer 2 on the Nexus, with no SVI, so the only way in or out is through the firewall.
  5. SVIs are passive in OSPF, HSRP keeps default timers, and there is no HSRP tracking. With vPC both switches forward for the gateway anyway.
  6. The data centre core and the LAN core meet at layer 3, which gives each its own change window and a clean line to move the data centre later.

Addressing

ItemN9K-1N9K-2Note
Uplink to CORE-110.255.1.0/3110.255.1.4/31Eth1/53, OSPF area 0
Uplink to CORE-210.255.1.2/3110.255.1.6/31Eth1/54, OSPF area 0
L3 backup link10.255.0.0/3110.255.0.1/31Eth1/48, peer to peer
Vlan10 SERVERS10.30.10.210.30.10.3HSRP VIP 10.30.10.1
Vlan100 FW-OUTSIDE /2910.30.100.210.30.100.3VIP .1, firewall .4 (standby .5)
VLAN 20 SECURE-APPno SVIno SVIgateway 10.30.20.1 on the firewall

Config

N9K-1
feature ospf
feature interface-vlan
feature hsrp
feature lacp
feature vpc
!
vlan 10
  name SERVERS
vlan 20
  name SECURE-APP
vlan 100
  name FW-OUTSIDE
!
vpc domain 10
  role priority 10
  peer-keepalive destination 192.168.0.2 source 192.168.0.1 vrf management
  peer-switch
  peer-gateway
  auto-recovery
  ip arp synchronize
!
ip prefix-list FW-NETS seq 5 permit 10.30.20.0/24
route-map FW-NETS permit 10
  match ip address prefix-list FW-NETS
ip route 10.30.20.0/24 10.30.100.4
!
router ospf 1
  router-id 10.255.255.1
  redistribute static route-map FW-NETS
!
interface Ethernet1/53
  description To CORE-1
  no switchport
  ip address 10.255.1.0/31
  ip ospf network point-to-point
  ip router ospf 1 area 0.0.0.0
  no shutdown
interface Ethernet1/54
  description To CORE-2
  no switchport
  ip address 10.255.1.2/31
  ip ospf network point-to-point
  ip router ospf 1 area 0.0.0.0
  no shutdown
interface Ethernet1/48
  description L3 backup to N9K-2
  no switchport
  ip address 10.255.0.0/31
  ip ospf network point-to-point
  ip router ospf 1 area 0.0.0.0
  no shutdown
!
interface Vlan10
  no shutdown
  ip address 10.30.10.2/24
  ip ospf passive-interface
  ip router ospf 1 area 0.0.0.0
  hsrp 10
    priority 110
    ip 10.30.10.1
interface Vlan100
  no shutdown
  ip address 10.30.100.2/29
  ip ospf passive-interface
  ip router ospf 1 area 0.0.0.0
  hsrp 100
    priority 110
    ip 10.30.100.1
!
interface port-channel40
  description FW-A
  switchport mode trunk
  switchport trunk allowed vlan 20,100
  vpc 40
interface Ethernet1/10
  channel-group 40 mode active
interface port-channel41
  description FW-B
  switchport mode trunk
  switchport trunk allowed vlan 20,100
  vpc 41
interface Ethernet1/11
  channel-group 41 mode active
!
interface port-channel1
  description vPC peer-link
  switchport mode trunk
  switchport trunk allowed vlan 10,20,100
  spanning-tree port type network
  vpc peer-link
N9K-2
! as N9K-1, with these differences
vpc domain 10
  role priority 20
  peer-keepalive destination 192.168.0.1 source 192.168.0.2 vrf management
router ospf 1
  router-id 10.255.255.2
interface Ethernet1/53
  ip address 10.255.1.4/31
interface Ethernet1/54
  ip address 10.255.1.6/31
interface Ethernet1/48
  ip address 10.255.0.1/31
interface Vlan10
  ip address 10.30.10.3/24
interface Vlan100
  ip address 10.30.100.3/29
! HSRP priority stays at the default of 100
FW-A (ASA)
interface TenGigabitEthernet0/8
 channel-group 1 mode active
 no shutdown
interface TenGigabitEthernet0/9
 channel-group 1 mode active
 no shutdown
interface Port-channel1
 no nameif
 no security-level
 no ip address
interface Port-channel1.100
 vlan 100
 nameif outside
 security-level 0
 ip address 10.30.100.4 255.255.255.248 standby 10.30.100.5
interface Port-channel1.20
 vlan 20
 nameif inside
 security-level 100
 ip address 10.30.20.1 255.255.255.0 standby 10.30.20.2
route outside 0.0.0.0 0.0.0.0 10.30.100.1 1
! failover and state links not shown

Verify

show
show vpc brief
show ip ospf neighbors
show ip route 10.30.20.0/24
show hsrp brief
show port-channel summary

Prove it before you sign it off

TestExpect
show ip ospf neighbors on N9K-1FULL to both core switches and to N9K-2 over Eth1/48. No neighbours on any VLAN interface.
Shut both uplinks on N9K-1Servers keep working. Traffic hashed to N9K-1 is routed over Eth1/48 to N9K-2. A traceroute shows the extra hop.
Fail FW-AFW-B becomes active and takes 10.30.100.4 and 10.30.20.1. The static routes on the Nexus do not change.
traceroute from a VLAN 20 host to the LAN coreThe first hop is 10.30.20.1, the firewall. There is no path that avoids it.
Fail the peer-link with the keepalive upN9K-2 suspends its vPCs and SVIs. Servers and both firewalls carry on through N9K-1.
07 / Data centre

Double-sided vPC between an aggregation pair and an access pair

NX-OS, Nexus 9000

Two vPC pairs stacked on top of each other, joined by a single port-channel of four links. Every link forwards, and spanning tree has nothing to block.

peer-linkpeer-linkPo100 = vPC 100, both pairsAGG-1domain 10, primaryAGG-2domain 10ACC-1domain 20, primaryACC-2domain 20Four links, one port-channel. Two port-channels would make a loop for spanning tree to block.
Layer 2 trunkPort-channelRoutedBlocked by STPKeepalive, tunnel or out-of-band

The rules

  1. All four links between the pairs are one port-channel, configured as a vPC on both pairs. Build it as two port-channels and spanning tree sees a loop and blocks one.
  2. Different domain IDs on the two pairs. The domain ID becomes the LACP system ID, and two pairs with the same one make the bundle flap.
  3. The aggregation pair is the spanning-tree root for every VLAN, with peer-switch and the same priority on both. Root guard on its vPC towards the access pair keeps it that way.
  4. The access pair is layer 2 only and keeps default spanning-tree priorities. Gateways live on the aggregation pair.
  5. Each pair has its own peer-link and its own keepalive path.
  6. Spanning-tree port type network on the peer-links only. The vPC between the pairs is normal, and host ports are edge.

Addressing

ItemAGG pairACC pairNote
vPC domain1020must differ
vPC system MAC00:23:04:ee:be:0a00:23:04:ee:be:14built from the domain ID
Keepalive (mgmt0)192.168.0.1 and .2192.168.1.1 and .2VRF management
STP priority4096 on bothdefaultroot on aggregation
InterconnectPo100, vPC 100Po100, vPC 100same number both sides, for sanity

Config

AGG-1
feature lacp
feature vpc
!
spanning-tree vlan 1-3967 priority 4096
!
vpc domain 10
  role priority 10
  peer-keepalive destination 192.168.0.2 source 192.168.0.1 vrf management
  peer-switch
  peer-gateway
  auto-recovery
  ip arp synchronize
! peer-link Po1 as in the vPC pair design
!
interface port-channel100
  description To access pair ACC-1 and ACC-2
  switchport mode trunk
  switchport trunk allowed vlan 10,20
  spanning-tree port type normal
  spanning-tree guard root
  vpc 100
interface Ethernet1/1
  description To ACC-1
  channel-group 100 mode active
interface Ethernet1/2
  description To ACC-2
  channel-group 100 mode active
AGG-2
! as AGG-1, with these differences
vpc domain 10
  role priority 20
  peer-keepalive destination 192.168.0.1 source 192.168.0.2 vrf management
ACC-1
feature lacp
feature vpc
!
vpc domain 20
  role priority 10
  peer-keepalive destination 192.168.1.2 source 192.168.1.1 vrf management
  auto-recovery
! peer-link Po1 as in the vPC pair design
!
interface port-channel100
  description To aggregation pair AGG-1 and AGG-2
  switchport mode trunk
  switchport trunk allowed vlan 10,20
  spanning-tree port type normal
  vpc 100
interface Ethernet1/49
  description To AGG-1
  channel-group 100 mode active
interface Ethernet1/50
  description To AGG-2
  channel-group 100 mode active
!
interface Ethernet1/1
  description Server
  switchport access vlan 10
  spanning-tree port type edge
ACC-2
! as ACC-1, with these differences
vpc domain 20
  role priority 20
  peer-keepalive destination 192.168.1.1 source 192.168.1.2 vrf management

Verify

show
show vpc brief
show vpc role
show port-channel summary
show lacp neighbor interface port-channel100
show spanning-tree vlan 10

Prove it before you sign it off

TestExpect
show port-channel summary on ACC-1Po100 (SU) with both members (P).
show vpc role on both pairsTwo different vPC system MACs, ending 0a and 14.
show spanning-tree vlan 10 on ACC-1Po100 is the root port and forwarding. Nothing is blocked.
Reload AGG-1The access pair keeps forwarding through AGG-2. Po100 loses two members and stays up.
Fail ACC-1Servers dual-attached to the access pair carry on through ACC-2.
08 / Management

Out-of-band management in Mgmt-vrf

IOS XE, Catalyst 9000

You want to reach and manage every switch even when the production network is broken, and keep management traffic away from user VLANs.

Gi0/0Gi0/0consoleCAT9KGi0/0 in Mgmt-vrfCAT9KGi0/0 in Mgmt-vrfOOB switch10.250.1.0/24Mgmt FWServicesTACACS+syslogNTPSNMPTFTPConsole serverSeparate path, separate routing table, separate default route
Layer 2 trunkPort-channelRoutedBlocked by STPKeepalive, tunnel or out-of-band

The rules

  1. Gi0/0 on Catalyst 9000 is fixed in Mgmt-vrf. It cannot carry user traffic or join a port-channel, so it is ideal for management and useless for anything else.
  2. Mgmt-vrf has its own default route. The global default route does not apply to it.
  3. Every service needs its VRF or source interface set: TACACS+, syslog, NTP, SNMP and file copies all default to the global table.
  4. The VTY access-class needs vrf-also, or SSH arriving through Mgmt-vrf is refused.
  5. Add a console server on the same out-of-band network for the day the switch will not boot.
  6. Put a firewall between the OOB network and everything else. It is the keys to the building.

Addressing

ItemValueNote
OOB subnet10.250.1.0/24gateway .1 on the management firewall
Switch Gi0/010.250.1.11one address per switch
Services10.250.0.0/24TACACS+ .5, syslog .20, NTP .10, SNMP .30

Config

CAT9K
interface GigabitEthernet0/0
 vrf forwarding Mgmt-vrf
 ip address 10.250.1.11 255.255.255.0
 no shutdown
!
ip route vrf Mgmt-vrf 0.0.0.0 0.0.0.0 10.250.1.1
!
ip access-list standard MGMT-ONLY
 permit 10.250.0.0 0.0.255.255
line vty 0 15
 access-class MGMT-ONLY in vrf-also
 transport input ssh
!
tacacs server TAC1
 address ipv4 10.250.0.5
 key <key>
aaa group server tacacs+ TACACS
 server name TAC1
 ip vrf forwarding Mgmt-vrf
 ip tacacs source-interface GigabitEthernet0/0
!
logging host 10.250.0.20 vrf Mgmt-vrf
logging source-interface GigabitEthernet0/0 vrf Mgmt-vrf
ntp server vrf Mgmt-vrf 10.250.0.10
snmp-server host 10.250.0.30 vrf Mgmt-vrf version 3 priv NMS
ip tftp source-interface GigabitEthernet0/0
ip ssh source-interface GigabitEthernet0/0

Verify

show
show ip route vrf Mgmt-vrf
ping vrf Mgmt-vrf 10.250.0.5
show tacacs
show ntp associations
show logging | include Logging to

Prove it before you sign it off

TestExpect
SSH to 10.250.1.11 from the management networkLogin works with a TACACS+ account.
Shut all production uplinks in a labSSH over Gi0/0 still works. That is the whole point.
test aaa group TACACS <user> <password> legacyUser successfully authenticated.
show loggingShows logging to 10.250.0.20 (vrf Mgmt-vrf) with messages counted.
09 / Campus

Campus with one logical distribution switch and stacked access

IOS XE, current Catalyst access stacks and a distribution pair that supports a virtual switch link

A building, or a few, with layer 2 to the closets and a wireless controller pair in the middle. Instead of two distribution switches with HSRP and spanning tree deciding which uplinks to block, the pair runs as one logical switch, so every uplink forwards and there is no first-hop protocol to keep in step.

SVL, 2 linksCore / WAN edgerouted links onlyDIST, chassis 1one logical switchDIST, chassis 2SSO standbyACCESS-1A stackuplinks on members 3 and 4ACCESS-1B stackVLANs 120, 220WLC pairHA SSO, one LAG eachEvery access uplink forwards. Spanning tree sees one bridge at the top and blocks nothing.
Layer 2 trunkPort-channelRoutedBlocked by STPKeepalive, tunnel or out-of-band

The rules

  1. Pick the shape by size. One closet: a single stack is the whole network. One building: access plus a distribution pair acting as a collapsed core. Three or more distribution blocks: add a core, because a full mesh needs N x (N-1) / 2 links and a core needs 2N.
  2. Run the distribution pair as one logical switch (a virtual switch link, or a stack). The gateway is one SVI, so there is no HSRP or VRRP, and failover is the port-channel losing a member, not a protocol timing out.
  3. Each access stack connects with one LACP port-channel, members on both distribution chassis. Never mode on.
  4. Keep each VLAN inside one closet where you can. Stretch a VLAN only for a real application need, and know you are doing it.
  5. In the access stack, make two members without uplinks the active and standby, and put the uplinks on two others, so losing the active never takes uplinks with it.
  6. Work out the uplink ratio twice: normal running and the worst single failure. Spread access points across stack members, since each can now push several gigabits.
  7. Above about four 10G uplinks per stack, move to 25G rather than add links: a port-channel tops out at eight members, and fibre pairs between rooms are harder to add than optics.
  8. Routed links from distribution to core, with the access subnets summarised at the distribution layer, so a flapping closet does not ripple across the campus.
  9. Wireless clients terminate on the controller pair in the middle (centralised mode) when the site has a distribution layer or more than about 100 access points. Each controller gets one port-channel with members on both chassis.
  10. Queue on the uplinks. At 7:1 or 20:1 there will be bursts, and voice should not be the traffic that drops.

Addressing

ItemValueNote
Closet 1AVLAN 110 data, 210 voice10.1.110.0/24 and 10.1.210.0/24
Closet 1BVLAN 120 data, 220 voice10.1.120.0/24 and 10.1.220.0/24
Wireless clientsVLAN 30010.1.48.0/22, only on the WLC trunks
InfrastructureVLAN 90010.1.0.0/24, switch and WLC management
Distribution to core10.255.1.0/31, 10.255.1.2/31routed port-channel members, OSPF area 1
Summary10.1.0.0/16advertised by distribution into area 0

Config

DIST (both chassis, before reload)
! Run on each chassis, then save and reload.
! Check the platform's StackWise Virtual guide for supported ports.
stackwise-virtual
 domain 10
interface FortyGigabitEthernet1/0/1
 stackwise-virtual link 1
interface FortyGigabitEthernet1/0/2
 stackwise-virtual link 1
interface TenGigabitEthernet1/0/16
 stackwise-virtual dual-active-detection
DIST (one logical switch)
ip routing
vlan 110,120,210,220,300,900
!
interface Vlan110
 ip address 10.1.110.1 255.255.255.0
 ip helper-address 10.250.0.10
interface Vlan120
 ip address 10.1.120.1 255.255.255.0
 ip helper-address 10.250.0.10
!
! Access stack 1A: one member on each chassis
interface range TenGigabitEthernet1/0/11, TenGigabitEthernet2/0/11
 description ACCESS-1A uplinks
 channel-group 11 mode active
interface Port-channel11
 switchport mode trunk
 switchport trunk native vlan 999
 switchport trunk allowed vlan 110,210,900
!
! WLC-1: one port-channel across both chassis
interface range TenGigabitEthernet1/0/20, TenGigabitEthernet2/0/20
 description WLC-1 LAG
 channel-group 20 mode active
interface Port-channel20
 switchport mode trunk
 switchport trunk allowed vlan 300,900
!
! Routed to the core, summarise the campus
interface range TenGigabitEthernet1/0/48, TenGigabitEthernet2/0/48
 no switchport
 channel-group 48 mode active
interface Port-channel48
 no switchport
 ip address 10.255.1.0 255.255.255.254
router ospf 1
 router-id 10.255.255.1
 area 1 range 10.1.0.0 255.255.0.0
 network 10.1.0.0 0.0.255.255 area 1
 network 10.255.1.0 0.0.0.1 area 0
 passive-interface default
 no passive-interface Port-channel48
ACCESS-1A stack
switch 1 priority 15
switch 2 priority 14
vlan 110,210,900
spanning-tree mode rapid-pvst
!
! Uplinks on members 3 and 4, never on active or standby
interface range TenGigabitEthernet3/1/1, TenGigabitEthernet4/1/1
 description Uplink to DIST
 channel-group 11 mode active
interface Port-channel11
 switchport mode trunk
 switchport trunk native vlan 999
 switchport trunk allowed vlan 110,210,900
!
interface range GigabitEthernet1/0/1 - 48
 switchport mode access
 switchport access vlan 110
 switchport voice vlan 210
 spanning-tree portfast
 spanning-tree bpduguard enable
!
interface Vlan900
 ip address 10.1.0.11 255.255.255.0
ip default-gateway 10.1.0.1

Verify

show
show stackwise-virtual
show stackwise-virtual dual-active-detection
show switch
show redundancy
show etherchannel summary
show spanning-tree blockedports
show ip ospf neighbor
show ip route 10.1.0.0 255.255.0.0 longer-prefixes

Prove it before you sign it off

TestExpect
Normal runningEvery port-channel member is (P) and show spanning-tree blockedports lists nothing.
Reload DIST chassis 2Under a second of loss. Every access and WLC port-channel stays up on its chassis 1 member.
Reload the active switch in ACCESS-1AThe standby takes over and Port-channel11 keeps both members, because neither uplink was on the failed switch.
Shut one uplink of ACCESS-1ATraffic continues on the other member. Recalculate the ratio with half the bandwidth and check voice queue drops.
Reload a distribution chassis with a call running over Wi-FiThe call survives and the controllers do not swap roles.
10 / WAN

Broadband sites on a dual-hub DMVPN

IOS XE, ASR 1000 or Catalyst 8000 hubs, ISR spokes

Sites with nothing but an ordinary broadband line, and perhaps a 4G backup, that still need private, encrypted access to the data centre and must survive a whole data centre going dark. Every site builds tunnels to a hub in each of two data centres. Only the hubs need fixed addresses, and branches build tunnels to each other only when they have traffic to send.

Tunnel10Tunnel10on demandDC corecustomer VRFs, BGPHUB-1DC1HUB-2DC2InternetVRF INET on the hubsSPOKE-1broadbandSPOKE-2broadbandSPOKE-3broadband + 4GEvery spoke keeps encrypted tunnels to both hubs. Only two are drawn.
Layer 2 trunkPort-channelRoutedBlocked by STPKeepalive, tunnel or out-of-band

The rules

  1. Two hubs, one in each data centre, on the same mGRE cloud. Every spoke registers with both and keeps both IPsec sessions up all the time, so losing a hub costs a routing reconvergence, not a tunnel build.
  2. Front-door VRF on the hubs: the internet interface and the tunnel transport live in VRF INET, so the internet default never meets customer routes. Keyrings must be defined in that VRF.
  3. One tunnel, one public loopback and one keyring per customer VRF on each hub. Give them one number: Loopback10, Tunnel10, tunnel key 10, NHRP network ID 10.
  4. Phase 3: the hubs send spokes nothing but a default summary and set ip nhrp redirect. Spokes set ip nhrp shortcut and build direct tunnels to each other on demand. Spokes are EIGRP stubs.
  5. The default summary installs a Null0 route on the hub with distance 5. Raise it above the hub's real default (201 beats iBGP's 200).
  6. Spoke routes enter the core through a prefix list, so a spoke can never inject a default or another customer's range.
  7. ip mtu 1400 and MSS 1360 on every tunnel. Spokes on dynamic addresses add registration no-unique and a 600-second hold time.
  8. 4G backup is a second cloud with its own tunnel, key and hub loopbacks. Raise delay on the 4G tunnel at both ends (a tunnel's default is 5000) so it loses in both directions until broadband fails. If both clouds leave by the same interface, mark the IPsec profile shared.
  9. If one hub must be primary, make the backup hub advertise a worse metric (an outbound offset list on its tunnel) and set the return path to match, so traffic never leaves through one data centre and returns through the other.
  10. DH group 14 or better, one pre-shared key per customer, and nothing in the config that another customer's key could unlock.

Addressing

ItemValueNote
Broadband cloudTunnel10, 172.16.10.0/24HUB-1 .1, HUB-2 .2, spokes .11 upwards
4G cloudTunnel20, 172.16.20.0/24HUB-1 .1, HUB-2 .2, spokes .11 upwards
Hub public loopbacks198.51.100.10 and .11 (HUB-1), .20 and .21 (HUB-2)VRF INET, one per customer per cloud
Hub internet links203.0.113.0/30 (HUB-1), 203.0.113.4/30 (HUB-2)VRF INET, default to the provider
Spoke LANs10.1.N.0/24N is the site number
RoutingEIGRP AS 100 on the tunnels, BGP AS 65000 in the coreredistributed through a prefix list

Config

HUB-1
vrf definition INET
 address-family ipv4
!
vrf definition CUST-A
 rd 65000:10
 address-family ipv4
  route-target both 65000:10
!
crypto keyring CUST-A-DMVPN vrf INET
 local-address Loopback10
 pre-shared-key address 0.0.0.0 0.0.0.0 key <CUST-A key>
!
crypto isakmp policy 10
 encryption aes 256
 hash sha256
 authentication pre-share
 group 14
!
crypto ipsec transform-set TS-DMVPN esp-aes 256 esp-sha256-hmac
 mode transport
crypto ipsec profile CUST-A-DMVPN
 set transform-set TS-DMVPN
 set pfs group14
!
interface GigabitEthernet0/0/0
 description Internet
 vrf forwarding INET
 ip address 203.0.113.2 255.255.255.252
!
interface Loopback10
 description CUST-A DMVPN broadband, public
 vrf forwarding INET
 ip address 198.51.100.10 255.255.255.255
!
interface Tunnel10
 description CUST-A DMVPN broadband
 vrf forwarding CUST-A
 ip address 172.16.10.1 255.255.255.0
 no ip redirects
 ip mtu 1400
 ip tcp adjust-mss 1360
 ip nhrp authentication <8 chars>
 ip nhrp network-id 10
 ip nhrp map multicast dynamic
 ip nhrp redirect
 ip summary-address eigrp 100 0.0.0.0 0.0.0.0
 tunnel source Loopback10
 tunnel mode gre multipoint
 tunnel key 10
 tunnel vrf INET
 tunnel protection ipsec profile CUST-A-DMVPN
!
! Loopback11 and Tunnel20 (4G cloud) are built the same way:
! 198.51.100.11, 172.16.20.1, key 20, network-id 20,
! plus delay 7000 so the core's path back to a spoke also prefers broadband
!
ip route vrf INET 0.0.0.0 0.0.0.0 203.0.113.1
!
router eigrp 100
 address-family ipv4 vrf CUST-A autonomous-system 100
  summary-metric 0.0.0.0/0 distance 201
  network 172.16.10.0 0.0.0.255
  network 172.16.20.0 0.0.0.255
  passive-interface default
  no passive-interface Tunnel10
  no passive-interface Tunnel20
 exit-address-family
!
ip prefix-list PL-CUST-A-SITES seq 10 permit 10.1.0.0/16 ge 24 le 24
route-map RM-CUST-A-EIGRP-TO-BGP permit 10
 match ip address prefix-list PL-CUST-A-SITES
!
router bgp 65000
 address-family ipv4 vrf CUST-A
  redistribute eigrp 100 route-map RM-CUST-A-EIGRP-TO-BGP
 exit-address-family
HUB-2
! As HUB-1, with these values:
interface GigabitEthernet0/0/0
 vrf forwarding INET
 ip address 203.0.113.6 255.255.255.252
!
interface Loopback10
 vrf forwarding INET
 ip address 198.51.100.20 255.255.255.255
!
interface Tunnel10
 ip address 172.16.10.2 255.255.255.0
!
interface Loopback11
 vrf forwarding INET
 ip address 198.51.100.21 255.255.255.255
!
interface Tunnel20
 ip address 172.16.20.2 255.255.255.0
!
ip route vrf INET 0.0.0.0 0.0.0.0 203.0.113.5
SPOKE-3
crypto keyring CUST-A-DMVPN
 pre-shared-key address 0.0.0.0 0.0.0.0 key <CUST-A key>
!
crypto isakmp policy 10
 encryption aes 256
 hash sha256
 authentication pre-share
 group 14
!
crypto ipsec transform-set TS-DMVPN esp-aes 256 esp-sha256-hmac
 mode transport
crypto ipsec profile CUST-A-DMVPN
 set transform-set TS-DMVPN
 set pfs group14
!
interface Tunnel10
 description DMVPN broadband cloud
 ip address 172.16.10.13 255.255.255.0
 no ip redirects
 ip mtu 1400
 ip tcp adjust-mss 1360
 ip nhrp authentication <8 chars>
 ip nhrp network-id 10
 ip nhrp holdtime 600
 ip nhrp nhs 172.16.10.1 nbma 198.51.100.10 multicast
 ip nhrp nhs 172.16.10.2 nbma 198.51.100.20 multicast
 ip nhrp registration no-unique
 ip nhrp shortcut
 tunnel source Dialer1
 tunnel mode gre multipoint
 tunnel key 10
 tunnel protection ipsec profile CUST-A-DMVPN
!
interface Tunnel20
 description DMVPN 4G cloud, backup
 ip address 172.16.20.13 255.255.255.0
 no ip redirects
 ip mtu 1400
 ip tcp adjust-mss 1360
 delay 7000
 ip nhrp authentication <8 chars>
 ip nhrp network-id 20
 ip nhrp holdtime 600
 ip nhrp nhs 172.16.20.1 nbma 198.51.100.11 multicast
 ip nhrp nhs 172.16.20.2 nbma 198.51.100.21 multicast
 ip nhrp registration no-unique
 ip nhrp shortcut
 tunnel source Cellular0/2/0
 tunnel mode gre multipoint
 tunnel key 20
 tunnel protection ipsec profile CUST-A-DMVPN
!
interface GigabitEthernet0/1/0
 description LAN
 ip address 10.1.3.1 255.255.255.0
!
router eigrp 100
 network 10.1.3.0 0.0.0.255
 network 172.16.10.0 0.0.0.255
 network 172.16.20.0 0.0.0.255
 passive-interface default
 no passive-interface Tunnel10
 no passive-interface Tunnel20
 eigrp stub connected

Verify

show
show dmvpn
show crypto isakmp sa
show crypto ipsec sa | include peer|encaps|decaps
show ip eigrp neighbors
show ip route 0.0.0.0
show ip route nhrp
show ip nhrp nhs detail

Prove it before you sign it off

TestExpect
show dmvpn on a spokeBoth hubs on Tunnel10 (and both on Tunnel20 if 4G is fitted) in state UP, with the hubs' loopback addresses as the NBMA addresses.
show ip route 0.0.0.0 on a spokeThe default via the hubs on Tunnel10 only. The Tunnel20 paths stay in the topology table as backups.
traceroute from SPOKE-1's LAN to SPOKE-2's LAN, twiceThe first goes through a hub. The second is one hop, and show ip route nhrp lists SPOKE-2's LAN.
Shut HUB-1's internet interfaceSpokes lose one EIGRP neighbour and keep working through HUB-2 within the hold time. Nothing needs to rebuild.
Unplug a spoke's broadbandIts routes move to Tunnel20. The core still reaches its LAN, through the 4G cloud.
show ip route vrf CUST-A 0.0.0.0 on a hubThe real default from the core, not the summary's Null0 route.
11 / WAN

Wholesale broadband straight into customer VRFs

IOS XE, ASR 1000 LNS pair, FreeRADIUS pair

Sites on business broadband bought from a wholesale provider that hands the PPP sessions to you over L2TP instead of to the internet. Each site logs in, RADIUS decides which customer it belongs to, and the session lands straight in that customer's VRF. The site router needs no tunnels and is never on the internet.

SQL replication both waysRADIUSRADIUSL2TPL2TPPPPRADIUS-1FreeRADIUS + SQLRADIUS-2FreeRADIUS + SQLLNS-1DC1LNS-2DC2DC corecustomer VRFsWholesale providerLACsSITE-0042customer ASITE-0043customer ASITE-0107customer BEach LNS can use either RADIUS server. Only the nearest is drawn.
Layer 2 trunkPort-channelRoutedBlocked by STPKeepalive, tunnel or out-of-band

The rules

  1. Two LNSs in two data centres. The provider's LACs keep L2TP tunnels to both, so if an LNS or a whole data centre fails, sites redial and land on the other.
  2. RADIUS decides everything about a session: it checks the CHAP login, gives the site its fixed address (Framed-IP-Address), and puts the session in the customer's VRF. One profile per customer VRF, one user per site.
  3. In the profile, the VRF attribute comes first and the unnumbered loopback second. Moving an interface into a VRF wipes its IP settings.
  4. Every customer VRF has a loopback on both LNSs with the same address, from 100.64.0.0/10. Sessions are unnumbered to it, so every site router is configured identically.
  5. Sites that need more than a default run BGP to that loopback, all with the same private AS number. Filtering lives on the LNS, not the site: a prefix list of the customer's ranges in, default only out, a maximum-prefix limit, one peer group per customer.
  6. Two RADIUS servers on separate hosts, with database replication in both directions so a site added on one exists on both. Each keeps its own log.
  7. Usernames carry a realm per customer, which the wholesale provider uses to route the session to you. Site passwords are generated and kept in the password vault, never in the design document.
  8. Remove Framed-Compression from FreeRADIUS's default PPP reply before the first session. Virtual-access sub-interfaces cannot apply it.
  9. Maintenance by draining: take one RADIUS server out of the group, or shut one LNS's link to the provider so sessions move to the other, before working on it.

Addressing

ItemValueNote
LNS loopback, customer ALoopback3510, 100.64.1.254/32same on both LNSs, and the same address in every customer VRF
Site WAN addresses100.64.20.0/22one /32 per site, given by RADIUS
Site LANs, customer A10.20.N.0/24N is the site number
BGPsites AS 65100, LNS AS 65000the same AS at every site
RADIUS servers10.0.10.11 (DC1), 10.0.20.11 (DC2)UDP 1812 and 1813 from the LNSs only
Usernamesite-0042@cust-a.example.netrealm per customer

Config

LNS-1
aaa new-model
aaa group server radius PPP-RADIUS
 server name RADIUS-1
 server name RADIUS-2
aaa authentication ppp PPP-AUTHEN group PPP-RADIUS
aaa authorization network PPP-AUTHOR group PPP-RADIUS
aaa accounting network PPP-ACCT start-stop group PPP-RADIUS
!
radius server RADIUS-1
 address ipv4 10.0.10.11 auth-port 1812 acct-port 1813
 key <RADIUS key>
radius server RADIUS-2
 address ipv4 10.0.20.11 auth-port 1812 acct-port 1813
 key <RADIUS key>
!
vpdn enable
vpdn-group WHOLESALE
 accept-dialin
  protocol l2tp
  virtual-template 1
 terminate-from hostname <provider LAC name>
 local name lns-1
 l2tp tunnel password <tunnel password>
!
interface Virtual-Template1
 description Wholesale broadband sessions
 no ip address
 no peer default ip address
 ip tcp adjust-mss 1452
 keepalive 20 3
 ppp authentication chap PPP-AUTHEN
 ppp authorization PPP-AUTHOR
 ppp accounting PPP-ACCT
!
vrf definition CUST-A
 rd 65000:3510
 address-family ipv4
  route-target both 65000:3510
!
interface Loopback3510
 description CUST-A PPP unnumbered and BGP
 vrf forwarding CUST-A
 ip address 100.64.1.254 255.255.255.255
!
ip prefix-list PL-CUST-A-SITES seq 10 permit 10.20.0.0/16 ge 24 le 24
ip prefix-list PL-DEFAULT-ONLY seq 10 permit 0.0.0.0/0
!
router bgp 65000
 address-family ipv4 vrf CUST-A
  redistribute connected
  neighbor PG-CUST-A peer-group
  neighbor PG-CUST-A remote-as 65100
  neighbor PG-CUST-A update-source Loopback3510
  neighbor PG-CUST-A prefix-list PL-CUST-A-SITES in
  neighbor PG-CUST-A prefix-list PL-DEFAULT-ONLY out
  neighbor PG-CUST-A maximum-prefix 10
  neighbor 100.64.20.42 peer-group PG-CUST-A
  neighbor 100.64.20.42 description site-0042
  neighbor 100.64.20.42 activate
 exit-address-family
RADIUS profile
# Group (profile) CUST-A: sent with every site in customer A
# Order matters: the VRF first, then the unnumbered loopback
Cisco-AVPair      := "ip:vrf-id=CUST-A"
Cisco-AVPair      += "ip:ip-unnumbered=Loopback3510"
Service-Type       = Framed-User
Framed-Protocol    = PPP
Framed-IP-Netmask  = 255.255.255.255
#
# User site-0042@cust-a.example.net
#   check:  Cleartext-Password := <generated, stored in the vault>
#   reply:  Framed-IP-Address = 100.64.20.42
#   group:  CUST-A
#
# /etc/freeradius/3.0/mods-config/files/authorize
DEFAULT Framed-Protocol == PPP
        Framed-Protocol = PPP
#       Framed-Compression = Van-Jacobson-TCP-IP
SITE-0042
interface GigabitEthernet0/0/0.101
 description FTTC, VLAN 101 to the modem
 encapsulation dot1Q 101
 pppoe enable group global
 pppoe-client dial-pool-number 1
!
interface Dialer1
 ip address negotiated
 mtu 1492
 ip tcp adjust-mss 1452
 encapsulation ppp
 dialer pool 1
 ppp chap hostname site-0042@cust-a.example.net
 ppp chap password <generated>
!
interface GigabitEthernet0/1/0
 description LAN
 ip address 10.20.42.1 255.255.255.0
!
router bgp 65100
 bgp router-id 10.20.42.1
 bgp log-neighbor-changes
 neighbor 100.64.1.254 remote-as 65000
 address-family ipv4
  redistribute connected
  neighbor 100.64.1.254 activate
 exit-address-family

Verify

show
show vpdn tunnel
show vpdn session
show derived-config interface virtual-access 3.1
show ip route vrf CUST-A
show bgp vpnv4 unicast vrf CUST-A summary
show aaa servers
sudo freeradius -X   (on the RADIUS server, service stopped)

Prove it before you sign it off

TestExpect
Connect one siteshow vpdn session lists it, and its /32 appears in show ip route vrf CUST-A as connected.
show derived-config on its virtual-accessvrf forwarding CUST-A and ip unnumbered Loopback3510, and nothing you did not ask RADIUS for.
Remove RADIUS-1 from the group and reconnect a test siteIt authenticates through RADIUS-2. Put RADIUS-1 back.
Add a test user on RADIUS-2It appears on RADIUS-1 within seconds.
Shut LNS-1's link to the providerSessions redial onto LNS-2 within the provider's retry time, and BGP sites come back with the same routes.
Power off one RADIUS server, then power it onLogins work again without anyone touching it.
12 / Campus

Routed access: layer 3 to every access switch

IOS XE, Catalyst 9000

A campus that wants recovery in under a second without spanning tree or HSRP on the uplinks. Each access switch routes for its own VLANs. The price is that a VLAN can never span two access switches.

area 10COREOSPF area 0DIST-1ABR, summarises 10.10/16DIST-2ABR, summarises 10.10/16ACC-1gateway for VLAN 10, 20ACC-2gateway for VLAN 30, 40ACC-3gateway for VLAN 50, 60Area 10 is totally stubby: access switches see their own area and one default route.
Layer 2 trunkPort-channelRoutedBlocked by STPKeepalive, tunnel or out-of-band

The rules

  1. Every access uplink is a routed point-to-point /31 taken from the block. No trunks, no HSRP and no spanning tree on any uplink.
  2. Each access switch (or stack) is the only gateway for its own VLANs. A VLAN never spans two access switches.
  3. Each distribution block is a totally stubby OSPF area. The distribution switches summarise the whole block into area 0 with one area range.
  4. A routed link between the two distribution switches, inside the block's area, so a summary never attracts traffic the switch cannot deliver.
  5. OSPF network type point-to-point on every uplink: no DR election and faster adjacency.
  6. BFD on the uplinks. Cisco's tests took convergence from 5.68 seconds at defaults to 0.24 seconds with SPF and LSA throttles of 10, 100 and 5000 ms. Only tune timers that far once summarisation is in place.
  7. Management on a /32 loopback inside the block summary, not on a management VLAN.
  8. Multicast: PIM sparse mode everywhere, anycast RP on the core pair with MSDP between them, IGMP snooping at the access.

Addressing

UseRangeExample
Block summary10.10.0.0/16advertised into area 0 by both distribution switches
Access VLANs10.10.1.0 to 10.10.199.0, /24 eachACC-1 VLAN 10: 10.10.1.0/24, gateway .1
Loopbacks10.10.254.0/24 as /32DIST-1 .1, DIST-2 .2, ACC-1 .11
Access uplinks10.10.255.0/24 as /31DIST-1 to ACC-1: .0 and .1; DIST-2 to ACC-1: .2 and .3
Distribution link10.10.255.100/31DIST-1 .100, DIST-2 .101, area 10
Core links10.0.255.0/24 as /31area 0

Config

DIST-1
ip routing
interface Loopback0
 ip address 10.10.254.1 255.255.255.255
 ip ospf 1 area 10
!
interface TenGigabitEthernet1/0/1
 description ACC-1
 no switchport
 ip address 10.10.255.0 255.255.255.254
 ip ospf network point-to-point
 ip ospf 1 area 10
 bfd interval 250 min_rx 250 multiplier 3
!
interface TenGigabitEthernet1/1/8
 description DIST-2, inside area 10
 no switchport
 ip address 10.10.255.100 255.255.255.254
 ip ospf network point-to-point
 ip ospf 1 area 10
 bfd interval 250 min_rx 250 multiplier 3
!
interface TenGigabitEthernet1/1/1
 description CORE, area 0
 no switchport
 ip address 10.0.255.0 255.255.255.254
 ip ospf network point-to-point
 ip ospf 1 area 0
 bfd interval 250 min_rx 250 multiplier 3
!
router ospf 1
 router-id 10.10.254.1
 area 10 stub no-summary
 area 10 range 10.10.0.0 255.255.0.0
 timers throttle spf 10 100 5000
 timers throttle lsa 10 100 5000
 timers lsa arrival 80
 passive-interface default
 no passive-interface TenGigabitEthernet1/0/1
 no passive-interface TenGigabitEthernet1/1/1
 no passive-interface TenGigabitEthernet1/1/8
 bfd all-interfaces
ACC-1
ip routing
interface Loopback0
 ip address 10.10.254.11 255.255.255.255
 ip ospf 1 area 10
!
interface TenGigabitEthernet1/1/1
 description DIST-1
 no switchport
 ip address 10.10.255.1 255.255.255.254
 ip ospf network point-to-point
 ip ospf 1 area 10
 bfd interval 250 min_rx 250 multiplier 3
interface TenGigabitEthernet1/1/2
 description DIST-2
 no switchport
 ip address 10.10.255.3 255.255.255.254
 ip ospf network point-to-point
 ip ospf 1 area 10
 bfd interval 250 min_rx 250 multiplier 3
!
interface Vlan10
 ip address 10.10.1.1 255.255.255.0
 ip helper-address 10.0.50.10
 ip ospf 1 area 10
!
router ospf 1
 router-id 10.10.254.11
 area 10 stub
 passive-interface default
 no passive-interface TenGigabitEthernet1/1/1
 no passive-interface TenGigabitEthernet1/1/2
 bfd all-interfaces

Verify

show
show ip ospf neighbor
show ip route ospf
show bfd neighbors
show ip ospf | include Area|stub
! on the core
show ip route 10.10.0.0 255.255.0.0 longer-prefixes

Prove it before you sign it off

TestExpect
show ip route ospf on ACC-1Intra-area routes for the block and a single inter-area default. Nothing from other blocks.
The same command on the coreOne 10.10.0.0/16 summary from each distribution switch and nothing more specific.
Shut ACC-1's uplink to DIST-1BFD drops that adjacency at once and traffic carries on through DIST-2. Users lose a packet or two at most.
Shut DIST-1's link to ACC-2, then send traffic from the core to ACC-2Traffic that arrives at DIST-1 crosses the distribution link to DIST-2 instead of being dropped.
Reload DIST-1The core keeps the summary from DIST-2 and every access switch stays reachable.

Running it on EIGRP instead

Plenty of campuses run EIGRP, and the design works just as well on it. The addressing, the /31 uplinks, the link between the distribution switches and BFD all stay the same. Four things take over the job the totally stubby area does in OSPF.

  1. Every access switch is a stub. eigrp stub connected means it only advertises its own networks and is never used as a path between the distribution switches. It also means they never query it when they lose a route, so a failure is dealt with in the distribution layer instead of spreading to every access switch.
  2. The access layer gets a default route and nothing else. The distribution switches learn the default from the core and filter everything else out with a distribute-list on each access uplink. Don't make the default with ip summary-address eigrp 100 0.0.0.0 0.0.0.0 instead. That summary points at Null0 and stays up while any EIGRP route exists, so a distribution switch that has lost the core keeps offering a default it can only drop.
  3. The block is summarised towards the core. One ip summary-address eigrp on each core link, so the core sees 10.10.0.0/16 and nothing more specific. A change inside the block never reaches the core, and the core has nothing to query the block about.
  4. BFD, not tight hello timers. Cisco's original guide set EIGRP hellos to 1 second and the hold time to 3. BFD on the uplinks finds a dead neighbour faster than that and leaves EIGRP on its default timers.
DIST-1, EIGRP
ip prefix-list DEFAULT-ONLY seq 5 permit 0.0.0.0/0
!
interface TenGigabitEthernet1/1/1
 description CORE
 ip summary-address eigrp 100 10.10.0.0 255.255.0.0
!
router eigrp 100
 eigrp router-id 10.10.254.1
 network 10.0.255.0 0.0.0.255
 network 10.10.0.0 0.0.255.255
 passive-interface default
 no passive-interface TenGigabitEthernet1/0/1
 no passive-interface TenGigabitEthernet1/1/1
 no passive-interface TenGigabitEthernet1/1/8
 ! one line per access uplink, never on the link to DIST-2
 distribute-list prefix DEFAULT-ONLY out TenGigabitEthernet1/0/1
 bfd all-interfaces
ACC-1, EIGRP
router eigrp 100
 eigrp router-id 10.10.254.11
 network 10.10.0.0 0.0.255.255
 passive-interface default
 no passive-interface TenGigabitEthernet1/1/1
 no passive-interface TenGigabitEthernet1/1/2
 eigrp stub connected
 bfd all-interfaces
!
show ip eigrp neighbors detail | include Stub
show ip route eigrp

Details worth adding

  1. Give the summary a fixed cost. area 10 range 10.10.0.0 255.255.0.0 cost 10 on both distribution switches. Without it, the summary's cost follows the routes inside it, so it can change when a link in the block fails and the two distribution switches can end up advertising different costs. A fixed cost keeps the core load-sharing and stops changes inside the block reaching it.
  2. Keep the distribution loopbacks out of area 0. An ABR sends a default into a stub area while it has any interface up in area 0, whether or not it can reach the backbone. A loopback never goes down, so a distribution switch that loses every core link keeps attracting traffic it can only drop, and it can't use its partner's default because an ABR ignores summary routes from a non-backbone area. That's why the config above puts Loopback0 in area 10. The gotcha, and the same fault as a Tick-Tock-TSHOOT ticket.
  3. Damp the uplinks, and check the link-down delay. dampening on each routed uplink holds a flapping link down instead of making the whole block recalculate every time it bounces. Cisco's guide also set carrier-delay msec 0, so the switch acts on a lost link at once. Check what your platform does here, because any delay is added to every failover.
  4. Know what you're buying. In Cisco's tests, a layer 2 access design with HSRP took 800 to 900 ms to recover from an uplink failure. Routed access took under 200 ms.
13 / Data centre

Nexus VXLAN EVPN fabric with an anycast gateway

NX-OS, Nexus 9000

A data centre that has outgrown one vPC pair. Racks need the same VLANs anywhere, routing at the first hop and tenants kept apart, without stretching spanning tree between them.

SPINE-1route reflector, RPSPINE-2route reflector, RPLEAF-1vPC pairLEAF-2vPC pairLEAF-3BORDER-1tenant defaultEDGELEAF-1 and LEAF-2 share one VTEP address for bridged traffic.Every leaf answers on the same gateway IP and MAC.
Layer 2 trunkPort-channelRoutedBlocked by STPKeepalive, tunnel or out-of-band

The rules

  1. Underlay: routed point-to-point links, IP unnumbered from loopback 0, MTU 9216, OSPF point-to-point. Loopback 0 carries the router ID and BGP; loopback 1 is the VTEP.
  2. Overlay: iBGP L2VPN EVPN with both spines as route reflectors. Spines need no VXLAN configuration unless they are also borders.
  3. Broadcast and unknown unicast: a multicast underlay with both spines as anycast RP, or ingress replication if that traffic is light. Every VTEP uses the same mode and the same VNI-to-group mapping.
  4. Tenants: one L3 VNI per VRF, one L2 VNI per VLAN, and a distributed anycast gateway, so every leaf answers on the same gateway IP and MAC.
  5. ARP suppression on each L2 VNI. Some platforms need TCAM carving and a reload first.
  6. vPC leaf pairs: a shared secondary address on loopback 1 for bridged routes, with advertise-pip and advertise virtual-rmac so routed traffic reaches the leaf that actually has the route.
  7. Border leaf: no host /32 routes out to the edge, a default route injected into each tenant VRF, and that default filtered so it does not leak back out.

Addressing

UseRangeExample
Loopback 0, router ID and BGP10.254.0.0/24 as /32SPINE-1 .1, SPINE-2 .2, LEAF-3 .13
Loopback 1, VTEP10.254.1.0/24 as /32LEAF-3 .13; LEAF-1 and LEAF-2 share .112
Anycast RP10.254.2.1/32loopback 254 on both spines
Fabric linksIP unnumbered from loopback 0MTU 9216
Multicast groups239.1.1.0/24VNI 30010 uses 239.1.1.10
VRF TENANT-AL3 VNI 50001 on VLAN 3001no address on VLAN 3001
VLAN 10L2 VNI 30010, 10.10.10.0/24gateway 10.10.10.1 on every leaf

Config

SPINE-1
nv overlay evpn
feature ospf
feature bgp
feature pim
!
interface loopback0
  ip address 10.254.0.1/32
  ip router ospf UNDERLAY area 0.0.0.0
  ip pim sparse-mode
interface loopback254
  description Anycast RP, same on SPINE-2
  ip address 10.254.2.1/32
  ip router ospf UNDERLAY area 0.0.0.0
  ip pim sparse-mode
ip pim rp-address 10.254.2.1 group-list 239.1.1.0/24
ip pim anycast-rp 10.254.2.1 10.254.0.1
ip pim anycast-rp 10.254.2.1 10.254.0.2
!
interface Ethernet1/1
  description LEAF-1
  no switchport
  mtu 9216
  medium p2p
  ip unnumbered loopback0
  ip ospf network point-to-point
  ip router ospf UNDERLAY area 0.0.0.0
  ip pim sparse-mode
  no shutdown
router ospf UNDERLAY
  router-id 10.254.0.1
!
router bgp 65000
  router-id 10.254.0.1
  template peer LEAVES
    remote-as 65000
    update-source loopback0
    address-family l2vpn evpn
      send-community
      send-community extended
      route-reflector-client
  neighbor 10.254.0.11
    inherit peer LEAVES
  neighbor 10.254.0.12
    inherit peer LEAVES
  neighbor 10.254.0.13
    inherit peer LEAVES
LEAF-3
nv overlay evpn
feature ospf
feature bgp
feature pim
feature interface-vlan
feature vn-segment-vlan-based
feature nv overlay
fabric forwarding anycast-gateway-mac 0000.5e00.5310
ip pim rp-address 10.254.2.1 group-list 239.1.1.0/24
!
vlan 10
  vn-segment 30010
vlan 3001
  vn-segment 50001
vrf context TENANT-A
  vni 50001
  rd auto
  address-family ipv4 unicast
    route-target both auto
    route-target both auto evpn
!
interface Vlan10
  no shutdown
  vrf member TENANT-A
  ip address 10.10.10.1/24
  fabric forwarding mode anycast-gateway
interface Vlan3001
  no shutdown
  mtu 9216
  vrf member TENANT-A
  ip forward
!
interface loopback0
  ip address 10.254.0.13/32
  ip router ospf UNDERLAY area 0.0.0.0
  ip pim sparse-mode
interface loopback1
  ip address 10.254.1.13/32
  ip router ospf UNDERLAY area 0.0.0.0
  ip pim sparse-mode
! fabric uplinks as on the spine
!
interface nve1
  no shutdown
  host-reachability protocol bgp
  source-interface loopback1
  member vni 30010
    suppress-arp
    mcast-group 239.1.1.10
  member vni 50001 associate-vrf
evpn
  vni 30010 l2
    rd auto
    route-target import auto
    route-target export auto
!
router bgp 65000
  router-id 10.254.0.13
  neighbor 10.254.0.1
    remote-as 65000
    update-source loopback0
    address-family l2vpn evpn
      send-community
      send-community extended
  neighbor 10.254.0.2
    remote-as 65000
    update-source loopback0
    address-family l2vpn evpn
      send-community
      send-community extended
  vrf TENANT-A
    address-family ipv4 unicast
      advertise l2vpn evpn
LEAF-1 (vPC pair additions)
interface loopback1
  ip address 10.254.1.11/32
  ip address 10.254.1.112/32 secondary
!
vpc domain 10
  peer-switch
  peer-gateway
  ip arp synchronize
  delay restore 150
  auto-recovery
!
router bgp 65000
  address-family l2vpn evpn
    advertise-pip
interface nve1
  advertise virtual-rmac

Verify

show
show nve peers
show nve vni
show bgp l2vpn evpn summary
show l2route evpn mac all
show ip route vrf TENANT-A
show ip mroute

Prove it before you sign it off

TestExpect
show nve peers on LEAF-3LEAF-1 and LEAF-2 appear once, as their shared VTEP address, plus BORDER-1. All Up.
Ping a VLAN 10 host on LEAF-3 from one on LEAF-1It works. show l2route evpn mac all lists the remote MAC against LEAF-3's VTEP.
Move a virtual machine from LEAF-1 to LEAF-3The MAC mobility sequence number rises, the gateway does not change and traffic resumes within seconds.
Reload SPINE-1Every leaf keeps its routes through SPINE-2. Tenant traffic sees a brief blip, not an outage.
show ip route on the edge routerTenant prefixes or summaries only, with no host /32 routes.
14 / Data centre

EVPN Multi-Site between two data centres

NX-OS, Nexus 9000

Two data centres that need layer 2 and layer 3 between them without becoming one failure domain. Each site stays its own fabric, and border gateways join them.

DCIDCIFABRIC AAS 65001BGW-A1VIP 10.1.100.1BGW-A2VIP 10.1.100.1BGW-B1VIP 10.2.100.1BGW-B2VIP 10.2.100.1FABRIC BAS 65002Dashed: eBGP EVPN sessions between gateway loopbacks, full mesh across sites.
Layer 2 trunkPort-channelRoutedBlocked by STPKeepalive, tunnel or out-of-band

The rules

  1. Each site is a complete fabric with its own AS, its own replication mode and its own failure domain.
  2. The border gateways in a site share a Multi-Site virtual IP on a loopback, so the other site sees one next hop per site.
  3. Track both sides of every gateway: fabric-tracking on links into the local fabric, dci-tracking on links to the other site. A gateway that loses either side stops advertising.
  4. eBGP EVPN between sites from loopbacks, with peer-type fabric-external and rewrite-evpn-rt-asn, because each site's automatic route targets contain its own AS.
  5. A delay-restore on each gateway (300 seconds in Cisco's example) so a rebooted gateway does not attract traffic before it has converged.
  6. Between sites, broadcast and unknown unicast use ingress replication per VNI, whatever each site uses inside.
  7. Advertise only the gateway loopbacks into the inter-site underlay, by tag.

Addressing

ItemSite ASite B
Fabric AS6500165002
Gateway loopback 0, BGP10.1.254.31 and .3210.2.254.41 and .42
Gateway loopback 1, own VTEP10.1.255.31 and .3210.2.255.41 and .42
Loopback 100, Multi-Site VIP10.1.100.1 on both10.2.100.1 on both
DCI links10.255.0.0/31 (A1 to B1)10.255.0.2/31 (A2 to B2)
Shared VNIsL2 30010, L3 50001the same

Config

BGW-A1
nv overlay evpn
feature bgp
feature nv overlay
!
evpn multisite border-gateway 100
  delay-restore time 300
!
interface loopback0
  ip address 10.1.254.31/32 tag 54321
interface loopback1
  ip address 10.1.255.31/32 tag 54321
interface loopback100
  description Multi-Site VIP, same on BGW-A2
  ip address 10.1.100.1/32 tag 54321
!
interface nve1
  no shutdown
  host-reachability protocol bgp
  source-interface loopback1
  multisite border-gateway interface loopback100
  member vni 30010
    multisite ingress-replication
    mcast-group 239.1.1.10
  member vni 50001 associate-vrf
!
interface Ethernet1/1
  description SPINE-A1
  evpn multisite fabric-tracking
interface Ethernet1/49
  description DCI to BGW-B1
  no switchport
  mtu 9216
  ip address 10.255.0.0/31
  evpn multisite dci-tracking
  no shutdown
!
route-map RM-BGW-LOOPBACKS permit 10
  match tag 54321
router bgp 65001
  router-id 10.1.254.31
  address-family ipv4 unicast
    redistribute direct route-map RM-BGW-LOOPBACKS
  neighbor 10.255.0.1
    remote-as 65002
    address-family ipv4 unicast
  neighbor 10.2.254.41
    remote-as 65002
    update-source loopback0
    ebgp-multihop 5
    peer-type fabric-external
    address-family l2vpn evpn
      send-community
      send-community extended
      rewrite-evpn-rt-asn
! repeat for 10.2.254.42; fabric-side underlay and iBGP as on any leaf

Verify

show
show nve interface nve1 detail
show nve multisite fabric-links
show nve multisite dci-links
show nve peers
show bgp l2vpn evpn summary

Prove it before you sign it off

TestExpect
show nve interface nve1 detail on each gatewayMulti-Site state up, with fabric and DCI tracking both up.
show nve peers on BGW-A1Site B appears by its Multi-Site virtual address.
Shut every DCI link on BGW-A1BGW-A1 withdraws itself as a gateway and traffic to site B carries on through BGW-A2.
Reload BGW-A1It stays out of the path until the 300-second delay-restore has expired.
Break the underlay inside site BSite A's fabric is unaffected apart from the loss of reachability to site B.
15 / Data centre

ACI Multi-Pod across two rooms or sites

ACI, with Nexus 9000 as the inter-pod network

One ACI fabric spread across two rooms or two sites, with one policy domain. The inter-pod network carries VXLAN between the pods, and the APIC cluster spans both.

VLAN 4VLAN 4IPN-1preferred RP pathIPN-2backup RP pathSPINE-1APod 1SPINE-1BPod 1SPINE-2APod 2SPINE-2BPod 2APIC-1, APIC-2Pod 1APIC-3, standby APICPod 2APICs attach to leaves in each pod (leaves not shown).
Layer 2 trunkPort-channelRoutedBlocked by STPKeepalive, tunnel or out-of-band

The rules

  1. Inter-pod network MTU at least 50 bytes above the largest endpoint frame. The control-plane MTU on APIC defaults to 9000.
  2. Spines connect to the IPN with VLAN 4 sub-interfaces. The IPN runs OSPF with the spines (eBGP from 5.2(3)) and relays DHCP to the APICs, so new pods can be discovered.
  3. PIM Bidir in the IPN carries flooded traffic for bridge domains stretched between pods. Use a phantom RP: an address nobody owns, inside a /30 on one IPN router and a /29 on the other.
  4. Up to 50 ms round trip between pods.
  5. Three APICs: two in Pod 1, one in Pod 2, plus a standby APIC in Pod 2 for the loss of Pod 1. With five or more, never more than two in one pod.
  6. Lower the fabric-wide IS-IS metric for redistributed routes below 63 before the first upgrade.
  7. Keep external traffic local: an L3Out in each pod, with host-route advertisement or local preference per bridge domain. By default every pod's border leaves look equal.
  8. Two pods back to back with no IPN is supported from 5.2(3), but rules out Multi-Site, Remote Leaf and APIC over a routed network.

Addressing

ItemPod 1Pod 2
TEP pool10.1.0.0/1610.2.0.0/16
Data-plane TEP on the spines10.1.255.254/3210.2.255.254/32
IPN links on VLAN 410.255.1.0/24 as /3010.255.2.0/24 as /30
Phantom RP10.255.255.1: IPN-1 has the /30, IPN-2 the /29the same
Bridge-domain multicast225.0.0.0/15 (default)the same
APICsAPIC-1, APIC-2APIC-3, standby APIC

Config

IPN-1
feature ospf
feature pim
feature dhcp
feature lldp
service dhcp
ip dhcp relay
!
interface Ethernet1/1
  description SPINE-1A
  mtu 9216
  no shutdown
interface Ethernet1/1.4
  description SPINE-1A on VLAN 4
  mtu 9216
  encapsulation dot1q 4
  ip address 10.255.1.1/30
  ip ospf network point-to-point
  ip router ospf IPN area 0.0.0.0
  ip pim sparse-mode
  ip dhcp relay address 10.1.0.1
  ip dhcp relay address 10.1.0.2
  ip dhcp relay address 10.1.0.3
  no shutdown
!
interface loopback1
  description Phantom RP: /30 here, /29 on IPN-2
  ip address 10.255.255.2/30
  ip ospf network point-to-point
  ip router ospf IPN area 0.0.0.0
  ip pim sparse-mode
ip pim rp-address 10.255.255.1 group-list 225.0.0.0/15 bidir
ip pim rp-address 10.255.255.1 group-list 239.255.255.240/28 bidir
!
router ospf IPN
  router-id 10.255.0.1
APIC settings
Pod Fabric Setup Policy
  Pod 1 TEP pool                         10.1.0.0/16
  Pod 2 TEP pool                         10.2.0.0/16
Multi-Pod L3Out (tenant infra)
  Spine sub-interfaces                   VLAN 4, OSPF area 0, point-to-point
  Data-plane TEP, Pod 1                  10.1.255.254/32
  Data-plane TEP, Pod 2                  10.2.255.254/32
System Settings > ISIS Policy
  ISIS metric for redistributed routes   32
System Settings > Control Plane MTU      9000
! menu paths vary by APIC release

Verify

show
show ip ospf neighbors
show ip pim rp
show ip mroute
ping 10.255.1.2 packet-size 9150 df-bit
! on an APIC
acidiag avread

Prove it before you sign it off

TestExpect
acidiag avread on each APICAll three active APICs are fully fit and agree on the cluster.
show ip pim rp on both IPN routersBoth use 10.255.255.1, reached through IPN-1's /30.
A 9150-byte ping with DF set across every IPN linkReplies everywhere. A link with a smaller MTU shows up here, not in production.
Shut IPN-1IPN-2's /29 becomes the path to the RP and flooded traffic between pods continues.
Cut Pod 2 off from the IPNPod 1 keeps the APIC majority and policy can still be changed there. Pod 2 forwards on what it already has.
16 / Campus

SD-Access fabric site with a fusion pair for shared services

IOS XE, Catalyst 9000, Catalyst Center

A campus moving to SD-Access, where segmentation follows the user rather than the VLAN. Catalyst Center provisions most of the fabric. What goes wrong is role placement, the handoff to shared services and the move to default deny.

VLAN per VNSHARED SERVICESDHCP, DNS, ISE, WLCFUSIONStackWise Virtual pairWAN AND INTERNETBORDER-1border and control planeBORDER-2border and control planeEDGE-1EDGE-2EDGE-3
Layer 2 trunkPort-channelRoutedBlocked by STPKeepalive, tunnel or out-of-band

The rules

  1. Pick the site model by size: Fabric in a Box (every role on one switch, stack or pair) for under about 1,000 endpoints and 50 APs; a collapsed core with access for under about 10,000.
  2. Co-locate the control plane with the border for the simplest design. Use dedicated control-plane nodes where users roam a lot, and no more than two control-plane nodes when they are co-located with fabric wireless.
  3. Routed underlay (IS-IS from LAN automation, or OSPF) with ECMP, BFD and NSF with SSO. The underlay is IPv4 only; the overlay can be dual stack. VXLAN cannot be fragmented, so raise the MTU end to end.
  4. Shared services stay outside the fabric. A VRF-aware fusion pair (StackWise Virtual or vPC) with each border connected to both members, one sub-interface and BGP session per virtual network, and leaking by prefix list and route-map.
  5. The WLC sits in the shared-services block with its management address in the global table. Fabric APs live in INFRA_VN, so AP join needs no leaking.
  6. Configure a critical VLAN, so new hosts get limited access when ISE cannot be reached.
  7. Before default deny, turn off TrustSec enforcement on underlay links and on AP and extended-node VLANs.
  8. Several sites: an SD-Access transit with dedicated transit control-plane nodes, using LISP Pub/Sub.

Addressing

UseRangeExample
Underlay loopbacks10.200.0.0/24 as /32BORDER-1 .1, EDGE-1 .11
Underlay links10.200.255.0/24 as /31LAN automation can allocate these
Border to fusion10.200.250.0/24 as /30, one VLAN per VNCORP on VLAN 3001, INFRA_VN on 3002
CORP pool10.101.0.0/16user subnets allocated by Catalyst Center
GUEST pool10.102.0.0/16handed to the guest firewall
Shared services10.50.0.0/24DHCP .5, DNS .6, ISE .21 and .22, WLC .30
Fabric MTU9100end to end, including the borders

Config

FUSION
vrf definition CORP
 rd 65100:101
 address-family ipv4
  import ipv4 unicast map SHARED-TO-CORP
  export ipv4 unicast map CORP-TO-GLOBAL
!
interface TenGigabitEthernet1/1/1.3001
 description BORDER-1, CORP
 encapsulation dot1Q 3001
 vrf forwarding CORP
 ip address 10.200.250.2 255.255.255.252
interface TenGigabitEthernet1/1/1.3002
 description BORDER-1, INFRA_VN in the global table
 encapsulation dot1Q 3002
 ip address 10.200.250.6 255.255.255.252
!
ip prefix-list SHARED-SERVICES seq 5 permit 10.50.0.0/24
ip prefix-list CORP-POOLS seq 5 permit 10.101.0.0/16 le 32
route-map SHARED-TO-CORP permit 10
 match ip address prefix-list SHARED-SERVICES
route-map CORP-TO-GLOBAL permit 10
 match ip address prefix-list CORP-POOLS
!
router bgp 65100
 bgp router-id 10.200.0.21
 neighbor 10.200.250.5 remote-as 65001
 address-family ipv4
  network 10.50.0.0 mask 255.255.255.0
  neighbor 10.200.250.5 activate
 address-family ipv4 vrf CORP
  neighbor 10.200.250.1 remote-as 65001
  neighbor 10.200.250.1 activate
Fabric nodes, before default deny
! Catalyst Center 2.3.7 and later does this for new links
interface range TenGigabitEthernet1/1/1 - 2
 description Underlay uplinks
 no cts role-based enforcement
!
! detect a dead ISE quickly, so the critical VLAN takes over
radius-server dead-criteria time 5 tries 3
radius-server deadtime 5

Verify

show
show lisp session
show ip route vrf CORP
show bgp vpnv4 unicast all summary
show cts role-based permissions
show cts interface brief

Prove it before you sign it off

TestExpect
show lisp session on an edge nodeSessions up to both control-plane nodes.
From a CORP host, reach DHCP and DNSWorks through a border and the fusion pair. The fusion shows the CORP pool in the global table and 10.50.0.0/24 in VRF CORP, nothing else.
Reload BORDER-1Edges use BORDER-2 for external routes, and their LISP sessions to the second control-plane node stay up.
Block RADIUS to ISE, then connect a new hostIt lands in the critical pool with limited access instead of being denied.
Turn on default deny at a lab site firstUnderlay adjacencies and BFD stay up. Only user traffic without a permit is blocked.
17 / WAN

SD-WAN controllers that survive losing a data centre

Catalyst SD-WAN, IOS XE SD-WAN

A WAN with controllers in two data centres or cloud regions, where losing a whole site must not take the branches with it. The defaults look resilient and are not quite.

TLOC extVALIDATORSone name, two regionsMANAGERcluster in one DCCONTROLLERS, DC1group 1CONTROLLERS, DC2group 2MPLSINTERNETEDGE-1VRRP activeEDGE-2Dashed: control connections
Layer 2 trunkPort-channelRoutedBlocked by STPKeepalive, tunnel or out-of-band

The rules

  1. By default each edge builds two control connections per transport and two OMP sessions in total, one per controller however many transports reach it. An edge below that count holds a standing connection to the Validator.
  2. Put the controllers in groups by data centre or region. Give each site a controller-group-list with its local group first, and keep the same number of controllers in every group.
  3. Check on paper that every site still reaches two allowed controllers with either data centre gone.
  4. If every controller is lost, edges keep forwarding on their last known state for the OMP graceful-restart timer, 12 hours by default. The OMP hold time is 60 seconds.
  5. Several Validators behind one DNS name, in different regions. A Manager cluster scales management but is not disaster recovery, and must not be stretched: its members need 4 ms or less between them.
  6. Controllers in a colocation site behind a hub edge: the hub's implicit ACL drops branch control traffic, so permit the DTLS and TLS ports explicitly on the hub tunnel interface.
  7. Port hopping off at data centres, hubs and on private transports.
  8. Dual-router branches: VRRP tracks a prefix list, not OMP, and tloc-change increase-pref pulls return traffic to the VRRP active router.

Addressing

ItemDC1DC2Branch
Site ID1002001101
Controller group12list 1 then 2
System IPs10.255.0.1, .210.255.0.3, .410.255.1.11, .12
Transportsmpls, biz-internetmpls, biz-internetmpls on EDGE-1, biz-internet on EDGE-2
Validatorvalidator.example.netthe samethe same

Config

Controller in DC1
system
 system-ip           10.255.0.1
 site-id             100
 controller-group-id 1
 organization-name   "EXAMPLE-ORG"
 vbond validator.example.net
EDGE-1
system
 system-ip             10.255.1.11
 site-id               1101
 organization-name     "EXAMPLE-ORG"
 vbond validator.example.net
 controller-group-list 1 2
 max-omp-sessions      2
!
omp
 no shutdown
 graceful-restart
 timers
  holdtime               60
  graceful-restart-timer 43200
!
sdwan
 interface GigabitEthernet1
  tunnel-interface
   encapsulation ipsec
   color mpls restrict
   max-control-connections 2
   no port-hop

Verify

show
show sdwan control connections
show sdwan control local-properties
show sdwan omp peers
show sdwan bfd sessions

Prove it before you sign it off

TestExpect
show sdwan control connections on EDGE-1Two control connections on its transport, both to controllers in group 1.
show sdwan omp peersTwo OMP peers, both in DC1.
Block DC1's controllersThe edges connect to group 2. User traffic keeps flowing on the last known state while they do.
show sdwan control local-properties after recoveryNo standing connection to the Validator, so the edge is back in equilibrium.
Power off EDGE-1EDGE-2 takes the LAN gateway in seconds, not after the 60-second OMP hold time.
18 / Security

Firewall cluster on a Nexus vPC pair

ASA, Firepower 4100 and 9300, Nexus 9000

One firewall pair can no longer carry the throughput or the connection count. A cluster scales out, but only if the switches and the cluster control link are built for it, and by less than the data sheet suggests.

peer-linkN9K-1vPC primaryN9K-2vPC secondaryFW-1control nodeFW-2data nodeFW-3data nodeThick: one spanned EtherChannel across every member. Dashed: each member's own cluster control link.
Layer 2 trunkPort-channelRoutedBlocked by STPKeepalive, tunnel or out-of-band

The rules

  1. Expect partial scaling. Cisco's figures: throughput at 70 to 80 percent of the sum, concurrent connections at about 60 percent, new connections per second at about 50 percent.
  2. Some features stay on the control node (site-to-site VPN on most platforms, several inspection engines, non-per-session PAT), and their failover is not seamless.
  3. Cluster control link: dedicated interfaces on every member, never shared. A per-member LACP EtherChannel sized to that member's forwarding capacity, split across both switches, on an isolated VLAN, never cabled back to back.
  4. Control link MTU at least 100 bytes above the largest data MTU, at most 10 ms one way, and no loss or reordering.
  5. Data: one spanned EtherChannel across every member (the only mode on Firepower 4100 and 9300), with a fixed virtual MAC on it.
  6. The same EtherChannel hash on every switch connected to the cluster, so both directions of a flow land on the same member. On ASA appliances, turn off LACP graceful convergence on the Nexus side.
  7. Tune the health-check hold time, leave management interfaces out of interface monitoring, and set automatic rejoin after cluster, data and system failures.
  8. Clustering between sites is possible, with up to 10 ms one way, but avoid it unless there is no alternative.

Addressing

ItemValueNote
Cluster control link10.99.99.0/24 on VLAN 999isolated: no gateway, never routed
Control link addressesFW-1 .1, FW-2 .2, FW-3 .3
Inside10.0.10.1/24 on Port-channel10.100one address for the whole cluster
Outside203.0.113.10/24 on Port-channel10.200
Data EtherChannelvPC 10 on the Nexus pairspanned across every member
MTUinside 9084, control link 9184control link 100 bytes larger

Config

FW-1 (ASA)
cluster interface-mode spanned force
!
interface TenGigabitEthernet0/6
 channel-group 48 mode active
 no shutdown
interface TenGigabitEthernet0/7
 channel-group 48 mode active
 no shutdown
!
cluster group FW-CLUSTER
 local-unit FW-1
 cluster-interface Port-channel48 ip 10.99.99.1 255.255.255.0
 priority 1
 key <shared-secret>
 health-check holdtime 3
 no health-check monitor-interface Management0/0
 health-check data-interface auto-rejoin 3 5 2
 health-check cluster-interface auto-rejoin unlimited 5 1
 enable
!
! the rest is configured on the control node and replicates
interface TenGigabitEthernet0/8
 channel-group 10 mode active
 no shutdown
interface TenGigabitEthernet0/9
 channel-group 10 mode active
 no shutdown
interface Port-channel10
 port-channel span-cluster
 mac-address 0000.5e00.5320
interface Port-channel10.100
 vlan 100
 nameif inside
 security-level 100
 ip address 10.0.10.1 255.255.255.0
interface Port-channel10.200
 vlan 200
 nameif outside
 security-level 0
 ip address 203.0.113.10 255.255.255.0
mtu inside 9084
mtu cluster 9184
N9K-1
vlan 999
  name FW-CCL
!
interface port-channel10
  description Firewall data, spanned across every member
  switchport mode trunk
  switchport trunk allowed vlan 100,200
  mtu 9216
  no lacp graceful-convergence
  vpc 10
interface port-channel11
  description FW-1 cluster control link
  switchport access vlan 999
  mtu 9216
  vpc 11
interface port-channel12
  description FW-2 cluster control link
  switchport access vlan 999
  mtu 9216
  vpc 12
! port-channel13 for FW-3 the same; N9K-2 mirrors this
!
interface Ethernet1/10
  description FW-1 data
  switchport mode trunk
  switchport trunk allowed vlan 100,200
  mtu 9216
  channel-group 10 mode active
interface Ethernet1/20
  description FW-1 cluster control link
  switchport access vlan 999
  mtu 9216
  channel-group 11 mode active

Verify

show
show cluster info
show cluster info health
show cluster info conn-distribution
show port-channel summary
! on the Nexus
show vpc brief
show port-channel summary

Prove it before you sign it off

TestExpect
show cluster infoOne control node and every other member in the cluster as a data node.
show cluster info conn-distribution under real loadConnections spread roughly evenly across members.
Pull one cluster control link cable from FW-2FW-2 stays in the cluster on its other link.
Power off FW-3Its flows continue on the other members and the cluster carries on.
A large file transfer through the clusterNo stalls. The control link counters show no drops.
19 / Security

ISE deployment that survives a node failure

ISE, IOS XE access switches

802.1X and MAB for a campus or several sites, where ISE nodes, profiling probes and the switches' RADIUS settings have to ride out a failure without overloading anything or locking users out.

replicationRADIUSRADIUSPAN-1admin and monitoring, primaryPAN-2admin and monitoring, standbyPSN-1node group SITE-APSN-2node group SITE-AACCESS-1PSN-1 firstACCESS-2PSN-2 first
Layer 2 trunkPort-channelRoutedBlocked by STPKeepalive, tunnel or out-of-band

The rules

  1. Size from the current data sheets. Capacity depends on persona layout (standalone, hybrid or dedicated), and every dedicated TACACS+ node reduces the RADIUS node count. Run device administration on at least two nodes.
  2. Every switch has two policy nodes, the nearest first, with dead-criteria, deadtime and an automated test user so a dead node is noticed and retested without user traffic.
  3. Behind a load balancer: keep each client on one node (persist on Calling-Station-ID or Audit Session ID), send DHCP copies to the same virtual address, fail the health probe over before the switch's RADIUS timeout, reassemble fragmented RADIUS, and return web redirects to the node that handled the session.
  4. Profiling: DHCP helpers and URL redirects rather than SPAN. Avoid SNMP traps and NetFlow probes, poll SNMP no more than every 8 hours from the nearest node, and run pxGrid on two nodes at most.
  5. Node groups, so policy nodes in one place share endpoint ownership.
  6. Critical authentication when every node is dead: new and re-authenticating hosts go to a limited critical VLAN, and are re-initialised with a recovery delay when a node returns.
  7. Policy nodes keep authenticating while the primary admin node is down. Only changes wait for it, or for the standby to be promoted.

Addressing

NodeAddressRole
PAN-110.50.0.11primary admin and monitoring
PAN-210.50.0.12secondary admin and monitoring
PSN-110.50.0.21policy service, node group SITE-A
PSN-210.50.0.22policy service, node group SITE-A
DHCP server10.50.0.5
Critical VLAN999DHCP, DNS and the path to ISE only

Config

ACCESS-1
aaa new-model
!
radius server ISE-PSN-1
 address ipv4 10.50.0.21 auth-port 1812 acct-port 1813
 key <shared-secret>
 automate-tester username radius-probe probe-on
radius server ISE-PSN-2
 address ipv4 10.50.0.22 auth-port 1812 acct-port 1813
 key <shared-secret>
 automate-tester username radius-probe probe-on
aaa group server radius ISE
 server name ISE-PSN-1
 server name ISE-PSN-2
!
radius-server dead-criteria time 5 tries 3
radius-server deadtime 5
aaa authentication dot1x default group ISE
aaa authorization network default group ISE
aaa accounting dot1x default start-stop group ISE
aaa server radius dynamic-author
 client 10.50.0.21 server-key <shared-secret>
 client 10.50.0.22 server-key <shared-secret>
dot1x system-auth-control
authentication critical recovery delay 1000
dot1x critical eapol
!
interface GigabitEthernet1/0/10
 switchport mode access
 switchport access vlan 10
 authentication event server dead action authorize vlan 999
 authentication event server alive action reinitialize
 authentication host-mode multi-auth
 authentication port-control auto
 mab
 dot1x pae authenticator
 spanning-tree portfast
!
interface Vlan10
 ip helper-address 10.50.0.5
 ip helper-address 10.50.0.21
ISE settings
Deployment
  PAN-1   primary admin, primary monitoring
  PAN-2   secondary admin, secondary monitoring
  PSN-1   policy service, node group SITE-A
  PSN-2   policy service, node group SITE-A
Profiling probes on PSN-1 and PSN-2
  RADIUS, DHCP, HTTP              on
  SNMP query                      every 8 hours or more
  SPAN, NetFlow, SNMP trap        off
pxGrid                            two nodes at most
Network device: ACCESS-1          shared secret, CoA port 1700

Verify

show
show aaa servers
test aaa group ISE radius-probe <password> new-code
show access-session interface GigabitEthernet1/0/10 details
show authentication sessions

Prove it before you sign it off

TestExpect
show aaa serversBoth policy nodes UP, with the automated test user probing each.
Stop PSN-1ACCESS-1 marks it dead within the dead-criteria time and new authentications go to PSN-2.
Block RADIUS to both policy nodes, then connect a new hostIt lands in VLAN 999 with limited access. Existing sessions stay as they are.
Bring PSN-1 backHosts in the critical VLAN are re-authenticated after the recovery delay, not all at once.
Power off PAN-1Users still authenticate. Admin changes wait until PAN-1 returns or PAN-2 is promoted.
20 / WAN

Replacing the WAN after a run of acquisitions

Catalyst SD-WAN (IOS XE edges), Catalyst 9000 core

Sixty-odd sites, many of them bought in, with clashing LAN ranges, every internet packet hairpinning through one colocation suite, and the main application about to move to SaaS. The case behind it: a veterinary group with 64 practices and two 24-hour hospitals, a five-person IT team, an 18-month deadline to integrate the acquisitions and a board target to cut WAN cost by a fifth. Practices can work on paper for four hours; the hospitals cannot be down for more than 15 minutes.

broadband4G/5G2 carriers + cellularDIA x 2SD-WAN overlay tunnels to both hubsSAAS PMSinternet only, TLSCLOUD SECURITYweb traffic from sitesPAYMENT PROVIDERcard terminals onlyINTERNETPRACTICE x 64two underlays, two providersstaff, voice, payments VRFHOSPITAL x 2diverse entries15-minute outage limitHUB-1 / HUB-2colocation: imaging,identity, core
Internet or routed linkSD-WAN overlay tunnel

The rules

  1. Plan one address block for every site before the first migration: 10.100.0.0/16, a /22 per practice. Renumber each acquired practice in its own migration window. Temporary NAT only for sites that must reach the centre before their turn, removed afterwards.
  2. Two internet underlays from different providers at every practice, one fixed and one cellular. No MPLS: the main application is SaaS and only reachable over the internet.
  3. Break out SaaS and cloud telephony locally. Send other web traffic through the cloud security service. Only traffic for systems that live in the colocation suite goes to the hubs.
  4. Card terminals in their own service VRF that can reach only the payment provider. It keeps the rest of the practice out of the payment card scope.
  5. Hospitals get two fixed circuits from different carriers with separate building entries, plus cellular. A four-hour repair time is not a 15-minute outage limit.
  6. eBGP between the hubs and the core, one summary in each direction. No redistribution into the IGP and no static route per site.
  7. Cloud-hosted SD-WAN management, with every alert sent to whoever is on call together with a written action. No controllers to run in a suite that is shrinking.
  8. Migrate each site alongside its old service. Keep the old firewall and line for a week as the rollback, then remove them.

Addressing

RangeUsed forSegmentNotes
10.100.0.0/16All practicessummaryThe only practice route the core sees
10.100.68.0/22Practice 17 (site number x 4)per siteSame pattern at every practice
10.100.68.0/24Staff, VLAN 10service VPN 10DHCP from the colocation server
10.100.69.0/24Voice, VLAN 20service VPN 10Cloud telephony breaks out locally
10.100.70.0/26Card terminals, VLAN 30service VPN 30Static addresses, payment provider only
10.100.71.0/24Guest Wi-Fi, VLAN 40service VPN 40Internet only
10.101.0.0/21The two hospitalssummaryA /22 each
10.110.0.0/30, 10.110.0.4/30Core to HUB-1, core to HUB-2transitCore .1 and .5
10.120.0.0/16Colocation servicessummaryImaging, identity, DHCP
192.168.1.0/24 as 10.199.17.0/24Practice 17 before it migratestemporary NATOn its old firewall and IPsec tunnel, gone at migration
203.0.113.64/27Payment provider (example)internetUse the provider's published ranges

Config

PRACTICE-17 edge (service side)
vrf definition 10
 rd 1:10
 address-family ipv4
 exit-address-family
vrf definition 30
 rd 1:30
 address-family ipv4
 exit-address-family
!
interface GigabitEthernet0/0/1.10
 description Staff
 encapsulation dot1Q 10
 vrf forwarding 10
 ip address 10.100.68.1 255.255.255.0
 ip helper-address 10.120.0.10
interface GigabitEthernet0/0/1.20
 description Voice
 encapsulation dot1Q 20
 vrf forwarding 10
 ip address 10.100.69.1 255.255.255.0
 ip helper-address 10.120.0.10
interface GigabitEthernet0/0/1.30
 description Card terminals
 encapsulation dot1Q 30
 vrf forwarding 30
 ip address 10.100.70.1 255.255.255.192
 ip access-group PAYMENTS-ONLY in
!
! VPN 30 has its own local internet exit and no route to anything else
ip access-list extended PAYMENTS-ONLY
 remark card terminals reach the payment provider and nothing else
 permit tcp 10.100.70.0 0.0.0.63 203.0.113.64 0.0.0.31 eq 443
 deny   ip any any
HUB-1 (service VPN 10)
router bgp 65020
 address-family ipv4 vrf 10
  neighbor 10.110.0.1 remote-as 65010
  neighbor 10.110.0.1 description CORE
  neighbor 10.110.0.1 activate
  redistribute omp
  aggregate-address 10.100.0.0 255.255.0.0 summary-only
  aggregate-address 10.101.0.0 255.255.248.0 summary-only
 exit-address-family
!
! carry the colocation routes learned from the core into the overlay
sdwan
 omp
  address-family ipv4 vrf 10
   advertise bgp
! HUB-2 identical, neighbour 10.110.0.5
CORE (colocation)
router bgp 65010
 bgp log-neighbor-changes
 neighbor 10.110.0.2 remote-as 65020
 neighbor 10.110.0.2 description HUB-1
 neighbor 10.110.0.6 remote-as 65020
 neighbor 10.110.0.6 description HUB-2
 address-family ipv4
  network 10.120.0.0 mask 255.255.0.0
  neighbor 10.110.0.2 activate
  neighbor 10.110.0.2 prefix-list FROM-SDWAN in
  neighbor 10.110.0.2 prefix-list TO-SDWAN out
  neighbor 10.110.0.6 activate
  neighbor 10.110.0.6 prefix-list FROM-SDWAN in
  neighbor 10.110.0.6 prefix-list TO-SDWAN out
!
ip prefix-list FROM-SDWAN seq 10 permit 10.100.0.0/16
ip prefix-list FROM-SDWAN seq 20 permit 10.101.0.0/21
ip prefix-list TO-SDWAN seq 10 permit 10.120.0.0/16
!
! anchor so the network statement has an exact match
ip route 10.120.0.0 255.255.0.0 Null0

Verify

show
show sdwan control connections
show sdwan bfd sessions
show sdwan omp routes vpn 10
! on the core
show ip bgp summary
show ip route 10.100.0.0 255.255.0.0

Prove it before you sign it off

TestExpect
Unplug the fixed line at a practiceTraffic moves to cellular within seconds. The PMS stays usable and calls in progress continue or reconnect.
From a card terminal, try any address other than the payment providerBlocked. A test payment still completes.
From a staff PC, open a test page in a blocked categoryThe cloud security service's block page appears. The PMS goes direct.
Shut HUB-1Practices still reach imaging through HUB-2. The core keeps one route to 10.100.0.0/16.
show ip route on the coreOne route each for 10.100.0.0/16 and 10.101.0.0/21, not 64 separate /22s.
Pull one carrier at a hospitalTraffic moves in seconds, well inside the 15-minute limit.
21 / Security

Separating operational technology from IT with a DMZ between them

IOS XE routers, Catalyst switches, any firewall vendor

SCADA servers, PLCs and remote outstations sharing a network with corporate IT, so anything that compromises IT can reach the plant. The case behind it: a water company with six treatment works and 380 remote sites, a regulatory audit in nine months, budget for one firewall pair this year, and a board instruction that if the corporate network is compromised the water must keep flowing.

OT WANIPsec over two private APNsOT linkCORPORATE ITusers, financereportingFWIT/OT DMZhistorian copy, jump hostsremote access, sensorsOT FW x 2OT ZONESCADA servershistorianDR CONTROL CENTREwarm-standby SCADAinterim ACLs this yearOUTSTATIONS x 380dual-SIM routersDNP3 and ModbusTREATMENT WORKSPLCs on managedindustrial switchesNothing passes straight between corporate IT and the OT zone. Everything they share is in the DMZ.
Routed, through a firewall where shownIPsec tunnel

The rules

  1. Three zones: corporate IT, a DMZ, operational technology. Nothing passes straight from IT to OT or back. Every service the two share lives in the DMZ.
  2. Data leaves OT one way. The historian replicates out to a copy in the DMZ, and reporting reads only the copy.
  3. Remote access lands in the DMZ: multi-factor authentication, jump hosts, recorded sessions and access approved for a set time. No VPN into the plant network and no vendor remote tools on operator screens.
  4. Outstations use public cellular with private APNs from two operators, and IPsec with certificates from each site router to both control centres. Tunnels end in the OT zone, never on the corporate WAN.
  5. Keep the OT firewall pair together at the main control centre. A pair split across two sites leaves each with one firewall and puts failover traffic on the WAN.
  6. Build the rules from recorded flows. Watch for a few weeks, log before you block, then enforce.
  7. Until the DR control centre has its own firewalls, apply strict access lists on its router and record the gap and its end date in the risk register.
  8. Replace unmanaged switches at the treatment works. Lock PLC ports with port security set to restrict, so an unknown device is logged and dropped without stopping the plant.
  9. Watch OT with passive monitoring that understands DNP3 and Modbus, fed from mirror ports. Never scan PLCs actively.

Addressing

FromToAllowedWhy
OT historian (10.200.10.20)DMZ historian copy (10.150.0.30)Replication, outbound onlyReporting data
Corporate reportingDMZ historian copySQL, read onlyFive-minute finance reports
Engineers (anywhere)DMZ remote access gateway (10.150.0.10)HTTPS with MFAOut-of-hours access
DMZ jump hosts (10.150.0.21, .22)SCADA and PLCs (10.200.10.0/24, 10.200.20.0/22)RDP and the PLC vendor's tool ports, approved sessionsEngineering work
OT monitoring sensorDMZ collector (10.150.0.40)Syslog and HTTPSSecurity alerts
Outstations (10.210.0.0/16)SCADA (10.200.10.0/24)DNP3 TCP 20000, Modbus TCP 502, inside IPsecTelemetry and control
Corporate IT (10.0.0.0/12)OT zone (10.200.0.0/16, DR 10.201.0.0/16)NothingThe point of the design

Config

DR-ROUTER (interim, until its firewalls arrive)
ip access-list extended CORP-IN
 remark only the DMZ jump hosts reach DR SCADA from the corporate side
 permit tcp host 10.150.0.21 10.201.10.0 0.0.0.255 eq 3389
 permit tcp host 10.150.0.22 10.201.10.0 0.0.0.255 eq 3389
 deny   ip any any
ip access-list extended CORP-OUT
 permit tcp 10.201.10.0 0.0.0.255 eq 3389 host 10.150.0.21 established
 permit tcp 10.201.10.0 0.0.0.255 eq 3389 host 10.150.0.22 established
 deny   ip any any
!
interface GigabitEthernet0/0/1
 description To corporate WAN
 ip access-group CORP-IN in
 ip access-group CORP-OUT out
OT-CORE (mirror for passive monitoring)
monitor session 1 source vlan 110 both
monitor session 1 source vlan 120 both
monitor session 1 destination interface GigabitEthernet1/0/48
!
interface GigabitEthernet1/0/48
 description OT monitoring sensor (receive only)
WORKS-SW1 (PLC access ports)
interface range GigabitEthernet1/0/1 - 12
 description PLC ports
 switchport mode access
 switchport access vlan 120
 switchport port-security
 switchport port-security maximum 1
 switchport port-security mac-address sticky
 ! restrict, not shutdown: log the stranger, keep the plant running
 switchport port-security violation restrict
 spanning-tree portfast
 spanning-tree bpduguard enable
 no cdp enable

Verify

show
show access-lists CORP-IN
show monitor session 1
show port-security
show port-security interface GigabitEthernet1/0/1
show crypto session

Prove it before you sign it off

TestExpect
From a corporate PC, try to reach a SCADA server or PLC on any portNo response. Nothing in IT reaches OT.
Run the finance reportIt reads the DMZ copy, with data no more than five minutes old.
An engineer logs in from homeMFA prompt, approval needed, session recorded, access ends at the approved time.
Pull one operator's SIM at a test outstationTelemetry carries on over the second operator with no gap longer than the polling interval.
Plug a laptop into a PLC portPort security logs the new MAC and drops its traffic. The PLC keeps running.
Send a test DNP3 write from an unexpected addressThe passive monitoring raises an alert in the security team's console.
22 / Data centre

Disaster recovery between two data centres without stretching a VLAN

IOS XE data centre cores (NX-OS has the same building blocks), SD-WAN to the sites

Two data centres, an application that must be back within an hour with no more than 15 minutes of data lost, and a request to stretch VLANs between the sites so servers keep their addresses. The case behind it: a logistics firm with 14 warehouses whose disaster recovery test took nine hours, because the database restore was slow, the second site's firewall rules were two years old, DNS answers were cached for a day and the runbook named servers that no longer existed.

DCI A: carrier 1DCI B: carrier 2, own routeactivestandbyDC1 (ACTIVE)WMS and primary databaseVlan50 upadvertises 10.50.10.0/24DC2 (STANDBY)replica databaseVlan50 shutadvertises only its own rangeWITNESSthird site, in the cloudWAREHOUSES x 14SD-WAN to both data centresFailover moves the route, not the servers' addresses. Only one site ever advertises the service range.
RoutedStandby path, unused until failoverWitness connection

The rules

  1. No stretched layer 2. Each data centre is its own failure domain, and the service moves by routing.
  2. Give the application its own service range. Only the active site has that VLAN up, so only that site advertises it. Failover means changing which site advertises it.
  3. Keep the DNS time-to-live at a few minutes as a second safeguard, not the main mechanism.
  4. Use continuous asynchronous database replication: seconds of lag against a 15-minute RPO, with nothing added to each write. Use synchronous only if the business asks for zero loss and accepts the extra latency.
  5. Two interconnect paths on physically separate routes, from different carriers, with the routes in writing.
  6. A witness in a third location, so a broken interconnect never produces two primary databases.
  7. Active/standby, because the database accepts writes in one place. Use the standby for reporting, testing and a failover practice every quarter.
  8. Build both sites' firewall and network configuration from one source, and check the standby in every change.
  9. Runbook order: confirm the primary is really lost and not just cut off, promote the database, start the application, move the route, test one warehouse, then release all of them.

Addressing

RangeWhereNotes
10.50.10.0/24WMS service range, VLAN 50Vlan50 up at the active site only
10.50.10.20WMS service addressThe same in both sites, live in one at a time
10.51.0.0/16DC1, everything elseAlways advertised
10.52.0.0/16DC2, everything elseAlways advertised
10.53.0.0/30, 10.53.0.4/30DCI paths A and BRouted, no VLANs across
wms.example.netDNS nameA record 10.50.10.20, time-to-live 300 seconds

Config

DC1-CORE
vlan 50
 name WMS-SERVICE
interface Vlan50
 description WMS service range - up only where WMS is active
 ip address 10.50.10.1 255.255.255.0
 no shutdown
!
router bgp 65101
 neighbor 10.51.255.2 remote-as 65200
 neighbor 10.51.255.2 description SD-WAN hub DC1
 address-family ipv4
  network 10.50.10.0 mask 255.255.255.0
  network 10.51.0.0 mask 255.255.0.0
  neighbor 10.51.255.2 activate
!
ip route 10.51.0.0 255.255.0.0 Null0
DC2-CORE
vlan 50
 name WMS-SERVICE
interface Vlan50
 description WMS service range - no shutdown only in the failover runbook
 ip address 10.50.10.1 255.255.255.0
 shutdown
!
router bgp 65102
 neighbor 10.52.255.2 remote-as 65200
 neighbor 10.52.255.2 description SD-WAN hub DC2
 address-family ipv4
  network 10.50.10.0 mask 255.255.255.0
  network 10.52.0.0 mask 255.255.0.0
  neighbor 10.52.255.2 activate
  neighbor 10.52.255.2 route-map DC2-OUT out
!
! belt and braces if both sites ever advertise the range at once.
! If your SD-WAN redistributes BGP into its overlay, check the prepend
! survives, or set the preference in the SD-WAN policy instead.
ip prefix-list WMS seq 10 permit 10.50.10.0/24
route-map DC2-OUT permit 10
 match ip address prefix-list WMS
 set as-path prepend 65102 65102
route-map DC2-OUT permit 20
!
ip route 10.52.0.0 255.255.0.0 Null0

Verify

show
show interfaces Vlan50
show ip bgp 10.50.10.0
show ip route 10.50.10.0
! on a warehouse SD-WAN edge
show sdwan omp routes 10.50.10.0/24

Prove it before you sign it off

TestExpect
Fail DCI path AReplication carries on over path B. Nothing changes at the warehouses.
Fail both DCI paths with both sites runningThe witness keeps DC1 primary. DC2 does not promote. The warehouses are unaffected.
Run the failover runbook in a planned windowThe WMS is working from DC2 inside one hour, with replication lag at the moment of failover in seconds.
Check a warehouse's route to 10.50.10.0/24Via DC2 only. The DNS answer has not changed.
Compare the two sites' firewall policiesNo differences apart from site-specific objects.
Fail backThe same steps in reverse, in a planned window.
23 / Campus and WAN

Two sites: a three-tier HQ, a collapsed-core branch, two ISPs and GRE over IPsec

Catalyst 9500 core, 9300 distribution, 9200 access, ISR 4000 or Catalyst 8200 edge (IOS XE)

A classic brief: 250 staff at HQ (Sales, IT, HR and executives) and 50 at a branch (Sales and Support), all in 10.10.0.0/16, with three tiers at HQ, a collapsed core at the branch, two ISPs at HQ tracked with IP SLA, GRE over IPsec between the sites, OSPF areas 0, 10 and 20, HSRP, port security and DHCP snooping. Department sizes are assumed (Sales 110, IT 60, HR 50, executives 30; branch Sales 35, Support 15), and every subnet is sized for 20 percent growth plus its gateway addresses.

Po1, layer 2area 20GRE over IPsec x 2ISP1ISP2BRANCH ISPHQ-EDGEIP SLA, NAT, 2 tunnelsCORE-1CORE-2DIST-1active 10, 30, 50DIST-2active 20, 40, 99ACCESS x 6BR-R1ABR, area 0 and 20BR-SW1collapsed coreSVIs 110, 120, 199
Routed, OSPF area 0 unless markedPort-channel, layer 2Layer 2 trunkGRE over IPsec

The rules

  1. Put the gateways and HSRP on the distribution pair, where the access VLANs end, and keep the core routed only. The brief asked for HSRP on the core; in a three-tier design that would stretch every access VLAN through the distribution layer and make it pointless.
  2. Split the VLANs: DIST-1 is spanning-tree root and HSRP active for 10, 30 and 50, DIST-2 for 20, 40 and 99. Root and active gateway on the same switch for every VLAN.
  3. Size each subnet from head count plus 20 percent plus its gateway addresses, and keep each site in one block that summarises: HQ LAN 10.10.0.0/22 (area 10), branch 10.10.8.0/24 (area 20), links and loopbacks 10.10.254.0/23. The rest of the /16 stays free.
  4. OSPF area 0 holds the core, the edge, the distribution uplinks and both tunnels. The ABRs summarise their areas. Use passive-interface default and the same reference bandwidth on every router. The two distribution switches also peer in area 10 over VLAN 99, so the area cannot split behind the summary.
  5. Track ISP1 with an IP SLA probe to an address beyond the ISP, pinned to ISP1 with a host route. ISP2 is a floating default at distance 250. NAT uses one route-map per ISP, so traffic is translated to the address of the link it actually leaves by.
  6. Two GRE tunnels protected by IKEv2 and IPsec in transport mode, one from each HQ ISP to the branch, with OSPF cost 10 and 1000. The backup tunnel only comes up once traffic is leaving through ISP2, so expect failover in tens of seconds. If you need both tunnels up all the time, give each ISP its own front-door VRF.
  7. The branch breaks out to the internet locally. Its static default beats the OSPF default from HQ, so the tunnels carry only company traffic. Branch DHCP is local, so it keeps working when the tunnels are down.
  8. Access ports: DHCP snooping with only the uplinks trusted and option 82 insertion turned off (the distribution relay would drop it), port security with a maximum of two addresses set to restrict, BPDU guard, and no DTP.
  9. Set ip mtu 1400 and MSS 1360 on both tunnels, which leaves room for GRE and IPsec.

Addressing

SubnetUseNeeded with growthGateway and notes
10.10.0.0/24VLAN 10 Sales (HQ)132 + 3VIP .1, DIST-1 .2, DIST-2 .3
10.10.1.0/25VLAN 20 IT72 + 3VIP .1, .2, .3
10.10.1.128/25VLAN 30 HR60 + 3VIP .129, .130, .131 (a /26 would be one short)
10.10.2.0/26VLAN 40 Executives36 + 3VIP .1, .2, .3
10.10.2.64/27VLAN 50 Servers24 + 3VIP .65; DHCP and DNS at .70
10.10.2.96/27VLAN 99 HQ management15 + 3VIP .97; area 10 link between the distribution pair
10.10.2.128/25, 10.10.3.0/24HQ spareInside the area 10 summary
10.10.8.0/26VLAN 110 Branch Sales42 + 1Gateway .1 on BR-SW1
10.10.8.64/27VLAN 120 Branch Support18 + 1Gateway .65
10.10.8.96/29VLAN 199 Branch management5 + 1Gateway .97
10.10.8.104/30BR-R1 to BR-SW12BR-R1 .105, BR-SW1 .106, area 20
10.10.254.0/30 to .24/30HQ point-to-point links2 eachEDGE-CORE1 .0, EDGE-CORE2 .4, CORE1-CORE2 .8, CORE1-DIST1 .12, CORE1-DIST2 .16, CORE2-DIST1 .20, CORE2-DIST2 .24
10.10.254.28/30, .32/30Tunnel0 and Tunnel12 eachHQ-EDGE .29 and .33, BR-R1 .30 and .34
10.10.255.0/24Loopbacks, /32 eachEDGE .1, CORE1 .2, CORE2 .3, DIST1 .4, DIST2 .5, BR-R1 .11, BR-SW1 .12
203.0.113.0/30, 198.51.100.0/30HQ ISP1 and ISP2 linksISP .1, HQ-EDGE .2 (documentation addresses)
192.0.2.0/30Branch ISP linkISP .1, BR-R1 .2

Config

DIST-1 (gateway, HSRP, OSPF ABR)
spanning-tree mode rapid-pvst
spanning-tree vlan 10,30,50 priority 4096
spanning-tree vlan 20,40,99 priority 8192
!
vlan 10
 name SALES
vlan 20
 name IT
vlan 30
 name HR
vlan 40
 name EXEC
vlan 50
 name SERVERS
vlan 99
 name MGMT
!
interface range TenGigabitEthernet1/1/3 - 4
 channel-group 1 mode active
interface Port-channel1
 description Layer 2 to DIST-2
 switchport mode trunk
 switchport nonegotiate
 switchport trunk allowed vlan 10,20,30,40,50,99
!
interface Loopback0
 ip address 10.10.255.4 255.255.255.255
interface TenGigabitEthernet1/1/1
 description CORE-1
 no switchport
 ip address 10.10.254.14 255.255.255.252
 ip ospf network point-to-point
interface TenGigabitEthernet1/1/2
 description CORE-2
 no switchport
 ip address 10.10.254.22 255.255.255.252
 ip ospf network point-to-point
!
interface Vlan10
 ip address 10.10.0.2 255.255.255.0
 ip helper-address 10.10.2.70
 standby version 2
 standby 10 ip 10.10.0.1
 standby 10 priority 110
 standby 10 preempt delay minimum 60
interface Vlan20
 ip address 10.10.1.2 255.255.255.128
 ip helper-address 10.10.2.70
 standby version 2
 standby 20 ip 10.10.1.1
 standby 20 preempt delay minimum 60
! Vlan30 and Vlan50 as Vlan10 (active here)
! Vlan40 and Vlan99 as Vlan20 (standby here)
!
router ospf 1
 router-id 10.10.255.4
 auto-cost reference-bandwidth 100000
 passive-interface default
 no passive-interface TenGigabitEthernet1/1/1
 no passive-interface TenGigabitEthernet1/1/2
 no passive-interface Vlan99
 network 10.10.254.12 0.0.0.3 area 0
 network 10.10.254.20 0.0.0.3 area 0
 network 10.10.255.4 0.0.0.0 area 0
 network 10.10.0.0 0.0.3.255 area 10
 area 10 range 10.10.0.0 255.255.252.0
ACC-1 (port security, DHCP snooping)
ip dhcp snooping
ip dhcp snooping vlan 10,20,30,40
no ip dhcp snooping information option
!
interface range GigabitEthernet1/0/1 - 46
 switchport mode access
 switchport access vlan 10
 switchport nonegotiate
 switchport port-security
 switchport port-security maximum 2
 switchport port-security mac-address sticky
 switchport port-security violation restrict
 spanning-tree portfast
 spanning-tree bpduguard enable
 ip dhcp snooping limit rate 15
!
interface range TenGigabitEthernet1/1/1 - 2
 description Uplinks to DIST-1 and DIST-2
 switchport mode trunk
 switchport nonegotiate
 switchport trunk allowed vlan 10,20,30,40,99
 ip dhcp snooping trust
!
interface Vlan99
 ip address 10.10.2.110 255.255.255.224
ip default-gateway 10.10.2.97
HQ-EDGE (dual ISP, NAT, GRE over IPsec)
interface Loopback0
 ip address 10.10.255.1 255.255.255.255
interface GigabitEthernet0/0/0
 description ISP1
 ip address 203.0.113.2 255.255.255.252
 ip nat outside
interface GigabitEthernet0/0/1
 description ISP2
 ip address 198.51.100.2 255.255.255.252
 ip nat outside
interface GigabitEthernet0/0/2
 description CORE-1
 ip address 10.10.254.1 255.255.255.252
 ip nat inside
 ip ospf network point-to-point
interface GigabitEthernet0/0/3
 description CORE-2
 ip address 10.10.254.5 255.255.255.252
 ip nat inside
 ip ospf network point-to-point
!
! --- ISP1 health and the default routes ---
ip sla 1
 icmp-echo 203.0.113.250 source-interface GigabitEthernet0/0/0
 frequency 5
ip sla schedule 1 life forever start-time now
track 1 ip sla 1 reachability
 delay down 10 up 30
! pin the probe to ISP1; use a stable address beyond the ISP
ip route 203.0.113.250 255.255.255.255 203.0.113.1
ip route 0.0.0.0 0.0.0.0 203.0.113.1 track 1 name ISP1
ip route 0.0.0.0 0.0.0.0 198.51.100.1 250 name ISP2-BACKUP
!
! --- translate to the link the traffic leaves by ---
ip access-list standard NAT-USERS
 permit 10.10.0.0 0.0.255.255
route-map NAT-ISP1 permit 10
 match ip address NAT-USERS
 match interface GigabitEthernet0/0/0
route-map NAT-ISP2 permit 10
 match ip address NAT-USERS
 match interface GigabitEthernet0/0/1
ip nat inside source route-map NAT-ISP1 interface GigabitEthernet0/0/0 overload
ip nat inside source route-map NAT-ISP2 interface GigabitEthernet0/0/1 overload
!
! --- IKEv2 and IPsec protecting GRE ---
crypto ikev2 proposal P-AES256
 encryption aes-cbc-256
 integrity sha256
 group 19
crypto ikev2 policy POL-1
 proposal P-AES256
crypto ikev2 keyring KR-BRANCH
 peer BRANCH
  address 192.0.2.2
  pre-shared-key <long random key>
crypto ikev2 profile IKEV2-BRANCH
 match identity remote address 192.0.2.2 255.255.255.255
 authentication remote pre-share
 authentication local pre-share
 keyring local KR-BRANCH
crypto ipsec transform-set TS-GRE esp-aes 256 esp-sha256-hmac
 mode transport
crypto ipsec profile PROT-GRE
 set transform-set TS-GRE
 set ikev2-profile IKEV2-BRANCH
!
interface Tunnel0
 description BR-R1 via ISP1 (primary)
 ip address 10.10.254.29 255.255.255.252
 ip mtu 1400
 ip tcp adjust-mss 1360
 ip ospf network point-to-point
 ip ospf cost 10
 tunnel source GigabitEthernet0/0/0
 tunnel destination 192.0.2.2
 tunnel protection ipsec profile PROT-GRE
interface Tunnel1
 description BR-R1 via ISP2 (backup)
 ip address 10.10.254.33 255.255.255.252
 ip mtu 1400
 ip tcp adjust-mss 1360
 ip ospf network point-to-point
 ip ospf cost 1000
 tunnel source GigabitEthernet0/0/1
 tunnel destination 192.0.2.2
 tunnel protection ipsec profile PROT-GRE
!
router ospf 1
 router-id 10.10.255.1
 auto-cost reference-bandwidth 100000
 passive-interface default
 no passive-interface GigabitEthernet0/0/2
 no passive-interface GigabitEthernet0/0/3
 no passive-interface Tunnel0
 no passive-interface Tunnel1
 network 10.10.254.0 0.0.0.7 area 0
 network 10.10.254.28 0.0.0.7 area 0
 network 10.10.255.1 0.0.0.0 area 0
 default-information originate
BR-R1 (branch edge, ABR)
interface Loopback0
 ip address 10.10.255.11 255.255.255.255
interface GigabitEthernet0/0/0
 description Internet
 ip address 192.0.2.2 255.255.255.252
 ip nat outside
interface GigabitEthernet0/0/1
 description BR-SW1
 ip address 10.10.8.105 255.255.255.252
 ip nat inside
 ip ospf network point-to-point
! local breakout: this static default beats the OSPF default from HQ
ip route 0.0.0.0 0.0.0.0 192.0.2.1
ip access-list standard NAT-BRANCH
 permit 10.10.8.0 0.0.0.255
ip nat inside source list NAT-BRANCH interface GigabitEthernet0/0/0 overload
!
! same proposal, policy and transform-set as HQ-EDGE
crypto ikev2 keyring KR-HQ
 peer HQ-ISP1
  address 203.0.113.2
  pre-shared-key <long random key>
 peer HQ-ISP2
  address 198.51.100.2
  pre-shared-key <long random key>
crypto ikev2 profile IKEV2-HQ
 match identity remote address 203.0.113.2 255.255.255.255
 match identity remote address 198.51.100.2 255.255.255.255
 authentication remote pre-share
 authentication local pre-share
 keyring local KR-HQ
crypto ipsec profile PROT-GRE
 set transform-set TS-GRE
 set ikev2-profile IKEV2-HQ
!
interface Tunnel0
 ip address 10.10.254.30 255.255.255.252
 ip mtu 1400
 ip tcp adjust-mss 1360
 ip ospf network point-to-point
 ip ospf cost 10
 tunnel source GigabitEthernet0/0/0
 tunnel destination 203.0.113.2
 tunnel protection ipsec profile PROT-GRE
interface Tunnel1
 ip address 10.10.254.34 255.255.255.252
 ip mtu 1400
 ip tcp adjust-mss 1360
 ip ospf network point-to-point
 ip ospf cost 1000
 tunnel source GigabitEthernet0/0/0
 tunnel destination 198.51.100.2
 tunnel protection ipsec profile PROT-GRE
!
router ospf 1
 router-id 10.10.255.11
 auto-cost reference-bandwidth 100000
 passive-interface default
 no passive-interface Tunnel0
 no passive-interface Tunnel1
 no passive-interface GigabitEthernet0/0/1
 network 10.10.254.28 0.0.0.7 area 0
 network 10.10.255.11 0.0.0.0 area 0
 network 10.10.8.104 0.0.0.3 area 20
 area 20 range 10.10.8.0 255.255.255.0
BR-SW1 (collapsed core, two-member stack)
ip routing
vlan 110
 name SALES
vlan 120
 name SUPPORT
vlan 199
 name MGMT
!
interface Loopback0
 ip address 10.10.255.12 255.255.255.255
interface GigabitEthernet1/1/1
 description BR-R1
 no switchport
 ip address 10.10.8.106 255.255.255.252
 ip ospf network point-to-point
interface Vlan110
 ip address 10.10.8.1 255.255.255.192
interface Vlan120
 ip address 10.10.8.65 255.255.255.224
interface Vlan199
 ip address 10.10.8.97 255.255.255.248
!
! local DHCP keeps the branch working without the tunnels
ip dhcp excluded-address 10.10.8.1 10.10.8.5
ip dhcp excluded-address 10.10.8.65 10.10.8.69
ip dhcp pool SALES
 network 10.10.8.0 255.255.255.192
 default-router 10.10.8.1
 dns-server 10.10.2.70
ip dhcp pool SUPPORT
 network 10.10.8.64 255.255.255.224
 default-router 10.10.8.65
 dns-server 10.10.2.70
ip dhcp snooping
ip dhcp snooping vlan 110,120
! access ports as ACC-1
!
router ospf 1
 router-id 10.10.255.12
 auto-cost reference-bandwidth 100000
 passive-interface default
 no passive-interface GigabitEthernet1/1/1
 network 10.10.8.0 0.0.0.255 area 20
 network 10.10.255.12 0.0.0.0 area 20

Verify

show
show standby brief
show spanning-tree root
show ip ospf neighbor
show ip route ospf
show track 1
show ip sla statistics 1
show crypto ikev2 sa
show crypto ipsec sa | include peer|encaps|decaps
show ip dhcp snooping binding
show port-security

Prove it before you sign it off

TestExpect
Compare show spanning-tree root and show standby brief on both distribution switchesFor every VLAN, the root bridge and the HSRP active router are the same switch.
Reload DIST-1DIST-2 takes over VLANs 10, 30 and 50 after the hold time. When DIST-1 returns, it takes them back only after the 60-second preempt delay.
Block the probe target at ISP1, or unplug ISP1Track 1 goes down after 10 seconds. The default moves to ISP2, users are translated to 198.51.100.2, and Tunnel1 comes up. The branch reaches HQ again within a minute.
Restore ISP1After 30 seconds the default and NAT move back, Tunnel0 returns, and OSPF prefers it again on cost.
show ip route on BR-SW1One route for 10.10.0.0/22 for the whole HQ LAN, not one per VLAN, plus the default from BR-R1.
Plug a rogue DHCP server into an access portIts offers are dropped. Clients still get addresses from 10.10.2.70.
Connect a third device through a small switch on one access portPort security drops the third address and logs it. The port stays up for the other two.
24 / Data centre

Routing that follows an active/passive firewall pair across two EVPN sites

Nexus 9000 border gateways (NX-OS), EVPN Multi-Site, any active/passive firewall pair (shown with Palo Alto)

Two VXLAN EVPN fabrics joined by EVPN Multi-Site, and one active/passive firewall pair with a member in each data centre, inspecting traffic between the APP and DB VRFs. Hosts in both sites must always send that traffic to whichever firewall is active, and swap sites when the firewall fails over. The trap is that a passive firewall often looks perfectly healthy to the switch beside it.

DCI, Multi-SiteAPP and DB transitHA1 and HA2DC1 SPINESAS 65100DC2 SPINESAS 65200LEAF x 2LEAF x 2BGW-DC1tracked staticsBGW-DC2tracked staticsFW-01activeFW-02passiveHA1 BACKUPvia managementOnly the site with the active firewall keeps its tracked routes. The other site follows over EVPN.
Routed: DCI and firewall transitFabric linksFirewall HA links

The rules

  1. The firewall pair is the only path between the APP and DB VRFs. Each border gateway holds static routes in each VRF pointing at the firewall's address on that VRF's transit subnet: in APP, the DB prefixes; in DB, the APP prefixes.
  2. Track the firewall's data address with an IP SLA probe, not the interface. A passive firewall may keep its links up (Palo Alto's passive link state "auto", or any virtual lab), so the switch sees up/up whichever unit is active. Only the active unit answers on the shared address.
  3. The transit subnets are local to each border gateway: the same addressing at both sites, never stretched across the DCI and never advertised into EVPN. The probe can then only succeed through the local firewall.
  4. Redistribute the tracked statics into BGP in each VRF, and from there into EVPN as type 5 routes. The active site advertises them; the passive site's statics are withdrawn, so it learns the same prefixes from the other site over Multi-Site.
  5. Set route targets by hand in each VRF. The sites use different AS numbers, and automatic route targets include the AS, so they would never match.
  6. Keep the firewall HA links off the DCI, on their own path, with a backup heartbeat over management. If the DCI and HA links fail together, both firewalls go active and both sites advertise the same routes.
  7. Delay the track coming back up (30 seconds here) so the routes do not return before the newly active firewall has its sessions and routes in place.
  8. Expect traffic between sites to cross the DCI twice when a host and the active firewall are in different data centres. Size the DCI for it, or keep each application's tiers in the same site as the active firewall.

Addressing

RangeUseWhereNotes
10.10.0.0/16APP VRF hosts (L3 VNI 50010)Both sitesAnycast gateway on every leaf
10.20.0.0/16DB VRF hosts (L3 VNI 50020)Both sitesAnycast gateway on every leaf
172.16.10.0/29APP transit, VLAN 2010Local to each BGWFirewall .1 (follows the active unit), BGW .2
172.16.20.0/29DB transit, VLAN 2020Local to each BGWFirewall .1, BGW .2
65100, 65200Fabric AS numbersDC1, DC2Different AS per site
65000:50010, 65000:50020Route targets for APP and DBBoth sitesSet by hand, identical in both sites

Config

BGW-DC1 (NX-OS)
feature sla sender
!
vlan 2010
  name APP-FW-TRANSIT
vlan 2020
  name DB-FW-TRANSIT
!
interface Vlan2010
  no shutdown
  vrf member APP
  ip address 172.16.10.2/29
interface Vlan2020
  no shutdown
  vrf member DB
  ip address 172.16.20.2/29
!
! probe the firewall's data address, not the link
ip sla 10
  icmp-echo 172.16.10.1 source-interface Vlan2010
    vrf APP
    frequency 5
ip sla schedule 10 life forever start-time now
ip sla 20
  icmp-echo 172.16.20.1 source-interface Vlan2020
    vrf DB
    frequency 5
ip sla schedule 20 life forever start-time now
track 10 ip sla 10 reachability
  delay up 30 down 5
track 20 ip sla 20 reachability
  delay up 30 down 5
!
vrf context APP
  vni 50010
  ip route 10.20.0.0/16 172.16.10.1 track 10
  rd auto
  address-family ipv4 unicast
    route-target both 65000:50010
    route-target both 65000:50010 evpn
vrf context DB
  vni 50020
  ip route 10.10.0.0/16 172.16.20.1 track 20
  rd auto
  address-family ipv4 unicast
    route-target both 65000:50020
    route-target both 65000:50020 evpn
!
ip prefix-list FW-DB-ROUTES seq 10 permit 10.20.0.0/16
ip prefix-list FW-APP-ROUTES seq 10 permit 10.10.0.0/16
route-map RM-FW-APP permit 10
  match ip address prefix-list FW-DB-ROUTES
route-map RM-FW-DB permit 10
  match ip address prefix-list FW-APP-ROUTES
!
router bgp 65100
  vrf APP
    address-family ipv4 unicast
      redistribute static route-map RM-FW-APP
      advertise l2vpn evpn
  vrf DB
    address-family ipv4 unicast
      redistribute static route-map RM-FW-DB
      advertise l2vpn evpn
BGW-DC2 (NX-OS)
! identical to BGW-DC1, including the transit addresses
! and the route targets, except:
router bgp 65200
! the transit VLANs 2010 and 2020 are NOT mapped to VNIs
! and NOT carried across the DCI
FW pair (settings to check)
HA mode:              active/passive
HA1 and HA2:          dedicated links on their own path, not the DCI
HA1 backup:           over the management network
Link monitoring:      both data interfaces
Path monitoring:      the local BGW transit address (.2) in each zone
Passive link state:   shutdown on hardware; in a virtual lab expect
                      the links to stay up and rely on the probes
Preemption:           off, so a recovered unit does not flap traffic
                      between sites a second time

Verify

show
show track brief
show ip sla statistics 10
show ip route vrf APP 10.20.0.0/16
show bgp l2vpn evpn 10.20.0.0
show bgp vrf APP ipv4 unicast 10.20.0.0/16
! on the firewall pair
show high-availability state

Prove it before you sign it off

TestExpect
Baseline, FW-01 activeBGW-DC1 has static routes in both VRFs, tracks up. BGW-DC2 has its tracks down and learns 10.20.0.0/16 and 10.10.0.0/16 over EVPN from DC1.
Ping from an APP host in DC2 to a DB host in DC2The traffic crosses the DCI to FW-01 and back. Firewall logs show the session on FW-01.
Suspend FW-01 (or fail it over)Within the probe and down-delay time, BGW-DC1 withdraws its statics and BGW-DC2's tracks come up. Every host now reaches the other VRF through FW-02.
Check the route on a DC1 leaf after failoverThe APP to DB route now points across Multi-Site to DC2.
Restore FW-01 as passiveNothing moves. With preemption off, FW-02 stays active and the routes stay in DC2.
Fail the DCI while both firewalls stay healthyThe HA links on their own path keep one firewall active, and routing in the passive site stops at its own BGW. Record which hosts lose service: that is the cost of splitting the pair across sites.
25 / WAN

Three-hub internet overlay: IPsec tunnels, BGP route reflectors and BFD

IOS XE: Catalyst 8200/8300 or ISR 4000 at branches and data centre hubs, Catalyst 8000V as the cloud hub

Twenty to a hundred sites on ordinary internet circuits, two data centres and a cloud region, and no appetite for an SD-WAN platform. Every branch has to survive losing any one hub or any one tunnel without anybody noticing, and you want config you can read line by line and generate from a list of sites. This is hub-and-spoke done properly: three hubs, a tunnel from every branch to every hub, BGP choosing the path, and BFD spotting a dead path in about three seconds.

Tunnel1Tunnel3Tunnel2INTERNETevery tunnel rides ithub mesh: iBGP between the three reflectorsHUB-1DC1, route reflector10.1.0.0/16 behind itHUB-3cloud 8000V, reflector10.3.0.0/16 behind itHUB-2DC2, route reflector10.2.0.0/16 behind itBR-1210.20.12.0/24local internet breakoutBR-1310.20.13.0/24local internet breakoutBR-4010.20.40.0/24local internet breakoutEvery branch has a tunnel to every hub. BGP picks the path; BFD spots a dead one in about 3 seconds.
IPsec tunnel (VTI) with iBGP and BFD inside

The rules

  1. Three hubs in three places: one in each data centre and one in the cloud. Each hub is a BGP route reflector, and the three hubs peer with each other in a full iBGP mesh over their own tunnels.
  2. Every branch builds a tunnel to every hub and runs iBGP over each one. Losing any hub, or any single tunnel, still leaves the branch two working paths.
  3. Static IPsec tunnel interfaces (VTIs) with IKEv2, and a /31 per tunnel worked out from the site: third octet is the hub, fourth is twice the branch number. Anyone can work out a tunnel address from a site number, and so can a template.
  4. Hubs set next-hop-self all towards the branches and towards each other. Plain next-hop-self leaves reflected routes alone, so branches would learn each other's prefixes with next hops they can never reach.
  5. The branch decides the path. A data centre's own prefixes, tagged with that hub's community, get local preference 200 from that hub. Everything else gets 150 from HUB-1, 140 from HUB-2 and 130 from HUB-3. Traffic for a data centre goes straight to its door; branch-to-branch traffic uses HUB-1 and falls back in order.
  6. BFD on every tunnel at 1 second x 3, echo off, with BGP timers of 10/30 as a backstop. Internet paths jitter: timers that suit dark fibre flap here and take the BGP session down with them.
  7. Branches break out to the internet locally and accept only 10.0.0.0/8 from the overlay: never a default route, never a public address. Host routes pin the hub addresses to the internet, so a tunnel can never be routed through itself.
  8. ip mtu 1400 and adjust-mss 1360 on every tunnel. That covers IPsec with AES-GCM and NAT-T, even on a PPPoE circuit.
  9. Hubs accept only the branch ranges from a branch and cap each one at 20 prefixes. A mistake at one branch cannot flood the others.
  10. Each data centre's hub is that data centre's only door into the overlay. If losing the hub router must not cut the data centre off, give it two (see How to grow it).

Addressing

RangeUsed forWhereNotes
198.51.100.10, .20 and 203.0.113.30Public addresses of HUB-1, HUB-2 and HUB-3InternetHUB-3's is a 1:1 NAT in front of its private address
192.0.2.12 (and so on)Branch public addressInternetMust be static for static VTIs
10.1.0.0/16, 10.2.0.0/16DC1 and DC2Behind HUB-1, HUB-2Originated with communities 65000:101 and 65000:102
10.3.0.0/16Cloud VPCBehind HUB-3Community 65000:103
10.20.N.0/24Branch N LAN (up to 127 branches)Each branch10.20.12.0/24 for branch 12
10.254.0.0/29Hub mesh tunnelsHubsHUB-1/2 .0/31, HUB-1/3 .2/31, HUB-2/3 .4/31
10.254.H.(2N)/31Tunnel from branch N to hub HHub .even, branch .oddBR-12 to HUB-2 is 10.254.2.24/31
10.255.0.H/32, 10.255.1.N/32Hub and branch loopbacksRouter ID and managementBranch loopbacks are advertised to the hubs only
AS 65000Whole overlay, iBGPEverywhereHubs are reflectors, branches are clients

Config

HUB-1 (DC1)
ip bgp-community new-format
!
crypto ikev2 proposal OVERLAY
 encryption aes-gcm-256
 prf sha384
 group 19
crypto ikev2 policy OVERLAY
 proposal OVERLAY
crypto ikev2 keyring OVERLAY
 peer HUB-2
  address 198.51.100.20
  pre-shared-key <unique-key>
 peer HUB-3
  address 203.0.113.30
  pre-shared-key <unique-key>
 peer BR-12
  address 192.0.2.12
  pre-shared-key <unique-key>
crypto ikev2 profile OVERLAY
 match identity remote address 0.0.0.0
 authentication remote pre-share
 authentication local pre-share
 keyring local OVERLAY
 dpd 10 3 on-demand
!
crypto ipsec transform-set OVERLAY esp-gcm 256
 mode tunnel
crypto ipsec profile OVERLAY
 set transform-set OVERLAY
 set ikev2-profile OVERLAY
!
interface Loopback0
 ip address 10.255.0.1 255.255.255.255
interface GigabitEthernet0/0/0
 description INTERNET
 ip address 198.51.100.10 255.255.255.248
interface GigabitEthernet0/0/1
 description DC1 core
 ip address 10.1.255.1 255.255.255.252
!
interface Tunnel902
 description HUB-2 (hub mesh)
 bandwidth 100000
 ip address 10.254.0.0 255.255.255.254
 ip mtu 1400
 ip tcp adjust-mss 1360
 bfd interval 1000 min_rx 1000 multiplier 3
 no bfd echo
 tunnel source GigabitEthernet0/0/0
 tunnel mode ipsec ipv4
 tunnel destination 198.51.100.20
 tunnel protection ipsec profile OVERLAY
interface Tunnel903
 description HUB-3 (hub mesh)
 bandwidth 100000
 ip address 10.254.0.2 255.255.255.254
 ip mtu 1400
 ip tcp adjust-mss 1360
 bfd interval 1000 min_rx 1000 multiplier 3
 no bfd echo
 tunnel source GigabitEthernet0/0/0
 tunnel mode ipsec ipv4
 tunnel destination 203.0.113.30
 tunnel protection ipsec profile OVERLAY
interface Tunnel1012
 description BR-12
 bandwidth 50000
 ip address 10.254.1.24 255.255.255.254
 ip mtu 1400
 ip tcp adjust-mss 1360
 bfd interval 1000 min_rx 1000 multiplier 3
 no bfd echo
 tunnel source GigabitEthernet0/0/0
 tunnel mode ipsec ipv4
 tunnel destination 192.0.2.12
 tunnel protection ipsec profile OVERLAY
!
ip route 0.0.0.0 0.0.0.0 198.51.100.9
ip route 10.1.0.0 255.255.0.0 10.1.255.2
!
ip prefix-list BRANCH-IN seq 10 permit 10.20.0.0/16 ge 24 le 24
ip prefix-list BRANCH-IN seq 20 permit 10.255.1.0/24 ge 32
route-map FROM-BRANCH permit 10
 match ip address prefix-list BRANCH-IN
route-map DC1-ORIGIN permit 10
 set community 65000:101
!
router bgp 65000
 bgp router-id 10.255.0.1
 bgp log-neighbor-changes
 neighbor HUBS peer-group
 neighbor HUBS remote-as 65000
 neighbor HUBS fall-over bfd
 neighbor HUBS timers 10 30
 neighbor BRANCHES peer-group
 neighbor BRANCHES remote-as 65000
 neighbor BRANCHES fall-over bfd
 neighbor BRANCHES timers 10 30
 neighbor 10.254.0.1 peer-group HUBS
 neighbor 10.254.0.3 peer-group HUBS
 neighbor 10.254.1.25 peer-group BRANCHES
 !
 address-family ipv4
  network 10.1.0.0 mask 255.255.0.0 route-map DC1-ORIGIN
  neighbor HUBS send-community
  neighbor HUBS next-hop-self all
  neighbor BRANCHES route-reflector-client
  neighbor BRANCHES send-community
  neighbor BRANCHES next-hop-self all
  neighbor BRANCHES route-map FROM-BRANCH in
  neighbor BRANCHES maximum-prefix 20 80 restart 5
  neighbor 10.254.0.1 activate
  neighbor 10.254.0.3 activate
  neighbor 10.254.1.25 activate
 exit-address-family
BR-12
ip bgp-community new-format
!
! same IKEv2 proposal, policy, profile and IPsec profile as the hubs,
! with keyring peers HUB-1, HUB-2 and HUB-3
!
interface Loopback0
 ip address 10.255.1.12 255.255.255.255
interface GigabitEthernet0/0/0
 description INTERNET
 ip address 192.0.2.12 255.255.255.248
 ip nat outside
interface GigabitEthernet0/0/1
 description LAN
 ip address 10.20.12.1 255.255.255.0
 ip nat inside
!
interface Tunnel1
 description HUB-1
 bandwidth 50000
 ip address 10.254.1.25 255.255.255.254
 ip mtu 1400
 ip tcp adjust-mss 1360
 bfd interval 1000 min_rx 1000 multiplier 3
 no bfd echo
 tunnel source GigabitEthernet0/0/0
 tunnel mode ipsec ipv4
 tunnel destination 198.51.100.10
 tunnel protection ipsec profile OVERLAY
! Tunnel2: 10.254.2.25/31 to 198.51.100.20
! Tunnel3: 10.254.3.25/31 to 203.0.113.30
!
ip route 0.0.0.0 0.0.0.0 192.0.2.9
! the hubs are always reached over the internet, never the overlay
ip route 198.51.100.10 255.255.255.255 192.0.2.9
ip route 198.51.100.20 255.255.255.255 192.0.2.9
ip route 203.0.113.30 255.255.255.255 192.0.2.9
!
ip access-list standard NAT-LAN
 permit 10.20.12.0 0.0.0.255
ip nat inside source list NAT-LAN interface GigabitEthernet0/0/0 overload
!
ip prefix-list OVERLAY-IN seq 10 permit 10.0.0.0/8 le 24
ip prefix-list OWN seq 10 permit 10.20.12.0/24
ip prefix-list OWN seq 20 permit 10.255.1.12/32
ip community-list standard SITE-HUB1 permit 65000:101
ip community-list standard SITE-HUB2 permit 65000:102
ip community-list standard SITE-HUB3 permit 65000:103
!
route-map FROM-HUB1 permit 10
 match ip address prefix-list OVERLAY-IN
 match community SITE-HUB1
 set local-preference 200
route-map FROM-HUB1 permit 20
 match ip address prefix-list OVERLAY-IN
 set local-preference 150
route-map FROM-HUB2 permit 10
 match ip address prefix-list OVERLAY-IN
 match community SITE-HUB2
 set local-preference 200
route-map FROM-HUB2 permit 20
 match ip address prefix-list OVERLAY-IN
 set local-preference 140
route-map FROM-HUB3 permit 10
 match ip address prefix-list OVERLAY-IN
 match community SITE-HUB3
 set local-preference 200
route-map FROM-HUB3 permit 20
 match ip address prefix-list OVERLAY-IN
 set local-preference 130
route-map TO-HUBS permit 10
 match ip address prefix-list OWN
!
router bgp 65000
 bgp router-id 10.255.1.12
 bgp log-neighbor-changes
 neighbor HUBS peer-group
 neighbor HUBS remote-as 65000
 neighbor HUBS fall-over bfd
 neighbor HUBS timers 10 30
 neighbor 10.254.1.24 peer-group HUBS
 neighbor 10.254.2.24 peer-group HUBS
 neighbor 10.254.3.24 peer-group HUBS
 !
 address-family ipv4
  network 10.20.12.0 mask 255.255.255.0
  network 10.255.1.12 mask 255.255.255.255
  neighbor 10.254.1.24 activate
  neighbor 10.254.1.24 route-map FROM-HUB1 in
  neighbor 10.254.1.24 route-map TO-HUBS out
  neighbor 10.254.2.24 activate
  neighbor 10.254.2.24 route-map FROM-HUB2 in
  neighbor 10.254.2.24 route-map TO-HUBS out
  neighbor 10.254.3.24 activate
  neighbor 10.254.3.24 route-map FROM-HUB3 in
  neighbor 10.254.3.24 route-map TO-HUBS out
 exit-address-family
HUB-3 (cloud 8000V), differences from HUB-1
interface GigabitEthernet1
 description VPC subnet, public 203.0.113.30 by 1:1 NAT
 ip address 10.3.255.10 255.255.255.240
! tunnels use GigabitEthernet1 as the source; IKEv2 moves
! to UDP 4500 (NAT-T) on its own because of the cloud NAT
!
ip route 0.0.0.0 0.0.0.0 10.3.255.1
ip route 10.3.0.0 255.255.0.0 10.3.255.1
route-map CLOUD-ORIGIN permit 10
 set community 65000:103
router bgp 65000
 bgp router-id 10.255.0.3
 address-family ipv4
  network 10.3.0.0 mask 255.255.0.0 route-map CLOUD-ORIGIN
!
! in the cloud console, not on the router:
! - security group: UDP 500 and 4500 in, from the hub and branch addresses only
! - turn off source/destination checking on the 8000V's interface
! - VPC route table: 10.0.0.0/8 to the 8000V's interface

Verify

show
show crypto ikev2 sa
show crypto ipsec sa | include interface|encaps|decaps
show bfd neighbors
show bgp ipv4 unicast summary
! on BR-12: three paths, best via HUB-1 at local-pref 200
show bgp ipv4 unicast 10.1.0.0/16
! branch to branch: best via HUB-1 at 150, next hop 10.254.1.24
show bgp ipv4 unicast 10.20.13.0/24
! on a hub: what a branch is sending
show bgp ipv4 unicast neighbors 10.254.1.25 routes

Prove it before you sign it off

TestExpect
Baseline, all upOn every branch: three IKEv2 SAs, three BFD sessions, three BGP sessions. DC1, DC2 and cloud prefixes each go to their own hub at local-pref 200. Other branches go via HUB-1.
Pull HUB-1's internet cable during a continuous ping between BR-12 and BR-13About 3 seconds of loss. BFD drops the HUB-1 sessions on every branch, and branch-to-branch moves to HUB-2. DC2 and cloud traffic never moves. DC1 is unreachable from the branches: write that down, it is the price of one door.
Shut only Tunnel1 on BR-12BR-12 reaches DC1 through HUB-2 and across the hub mesh. No other branch notices anything.
Add 150 ms of jitter and 2% loss on one branch circuit for an hour (a WAN emulator, or a lab router in the path)No BFD or BGP flaps. If there are any, the timers are too tight for that circuit.
Leave it running past an IPsec rekey (one hour by default)No BFD or BGP flap in the log during the rekey.
Advertise a default route and a 10.20.99.0/24 from a test router behind BR-12The hubs drop the default and the off-plan /24. The branches never install a default from the overlay. 21 prefixes from one branch trips maximum-prefix.
From a branch PC, ping a DC server with DF set at 1372 bytes, then 14001372 works, 1400 fails cleanly with a fragmentation message. A large file copy does not stall.

Failover, second by second

WhenWhat happens
0 sHUB-1's internet circuit fails. Anything sent towards HUB-1 is lost.
1 to 3 sEach branch misses three BFD packets in a row on Tunnel1, as do HUB-2 and HUB-3 on their mesh tunnels to HUB-1.
+ a few msBFD tells BGP. Every session to HUB-1 drops, and every path learnt through it is withdrawn.
about 3 sBranches use the next best path: other branches via HUB-2 at 140. Traffic to DC2 and the cloud never moved.
Without BFDYou wait for IPsec dead peer detection or the BGP hold timer: 30 seconds with the timers here, three minutes with the defaults. Traffic is dropped the whole time.

What it is good for

  • Twenty to about a hundred sites on ordinary internet circuits, with a small team and no SD-WAN budget.
  • Leaving MPLS without buying a new platform. It runs on the ISR 4000 and Catalyst 8000 routers you probably already have.
  • Making the cloud a proper hub, not a VPN bolted onto one data centre.
  • Teams that want to read every line of config, and generate it from a list of sites.

When to use something else

  • A lot of branch-to-branch traffic, such as site-to-site video. It all goes through a hub. DMVPN phase 3 or SD-WAN builds direct paths.
  • Branches on dynamic addresses or behind carrier NAT. Static tunnels need fixed peers (see dynamic VTIs below).
  • Well over a hundred sites. Every hub carries one tunnel interface per branch, and that gets unwieldy.
  • Choosing a circuit per application by measured loss and delay. That is what SD-WAN is for.

Why this, and not something else

OptionChoose it whenWhat it costs you
This design: static VTIs, BGP, BFDFixed branch addresses, up to about 100 sites, you want plain standard configBranch-to-branch traffic goes through a hub
DMVPN phase 3Lots of branch-to-branch traffic, or branches on dynamic addressesmGRE and NHRP to learn and troubleshoot
FlexVPN with dynamic VTIsMany branches, one hub config, dynamic branch addressesVirtual templates and dynamic BGP neighbours
Catalyst SD-WANApplication-aware paths, central policy, zero-touch buildsLicences, controllers and a new platform to run
Carrier MPLSYou need an SLA on latency and lossPrice, lead times and one carrier's reach

How to grow it

  1. A second circuit at each branch. Add three more tunnels from the second circuit to the same three hubs, and lower their local preference by 50 so they carry traffic only when the first circuit fails. Put each internet interface in its own front-door VRF (vrf forwarding on the WAN interface, tunnel vrf on the tunnel) so each tunnel always leaves by its own circuit. Do this from day one if a second circuit is likely, because it also takes away any chance of recursive routing.
  2. Two hubs in a data centre that cannot be cut off. Add HUB-1B on its own circuit, run OSPF or iBGP from both hubs to the data centre core, and give the branches a fourth tunnel. Both DC1 hubs originate 10.1.0.0/16 with the same community.
  3. Direct paths between branches. Keep the hubs for everything else and add DMVPN phase 3 for branch-to-branch traffic, or give a few large sites direct tunnels and peer them over BGP with a local preference above the hubs.
  4. Dynamic VTIs on the hubs. Replace the per-branch tunnels with an IKEv2 profile pointing at a virtual template, and use bgp listen range with a peer group so branches can come and go. Branches can then be on dynamic addresses.
  5. Segmentation. For two or three VRFs, run one tunnel per VRF per hub. Beyond that, run MPLS over the tunnels and use VPNv4 between hubs and branches, so one set of tunnels carries every VRF.
  6. QoS per branch. Shape each branch tunnel at the hub to that branch's circuit speed with a child LLQ policy, so a 1 Gbps hub cannot flood a 50 Mbps branch. Mark at the branch LAN edge; the tunnel policy sees the inner DSCP.
  7. IPv6. Switch the tunnels to GRE over IPsec (tunnel mode gre ip with tunnel protection) so they carry both protocols, and add an IPv6 address family to BGP with the same policy.
  8. Generate it rather than type it. Keep one record per site: number, public address, LAN, circuit speed. A template renders the hub and branch config from it, because every tunnel address and route-map follows from the site number. Check the rendered config into git and diff it against the device before each push.
  9. Watch it. Send BFD and BGP adjacency changes to your syslog collector and alert on any flap, not just on long outages. Add an IP SLA probe from each branch to each hub loopback to build a history of delay and loss per circuit.