Capstone: a resilient branch with OSPF, static backups and a shared gateway
Task
Build a branch that keeps working when a link fails. Two branch routers share the users' default gateway with HSRP. Both run OSPF in area 0 with the head office router over point-to-point links, and both send internet traffic to head office with a static default route backed by a floating static route across the branch LAN. You make two of the domain's classic mistakes on purpose, a network statement one block off and a backup route with the wrong distance, and find each from show commands. Then you fail a WAN link and a LAN link in turn and read, in the routing tables and the HSRP status, exactly how the branch kept forwarding. It draws on lessons 13 to 16.
Topology
Devices
| Device | Model | Role |
|---|---|---|
| R1 | ISR4331 | branch router, intended HSRP active |
| R2 | ISR4331 | branch router, intended HSRP standby |
| R3 | ISR4331 | head office router |
| S1 | 2960-24TT | branch access switch |
| PC1 | PC-PT | branch user |
| PC2 | PC-PT | branch user |
| Server1 | Server-PT | head office server |
Links
| From | To |
|---|---|
| R1 G0/0/0 | R3 G0/0/0 |
| R2 G0/0/0 | R3 G0/0/1 |
| R3 G0/0/2 | Server1 Fa0 |
| R1 G0/0/1 | S1 G0/1 |
| R2 G0/0/1 | S1 G0/2 |
| PC1 Fa0 | S1 Fa0/1 |
| PC2 Fa0 | S1 Fa0/2 |
Addressing
| Device | Interface | Address | Default gateway |
|---|---|---|---|
| R1 | G0/0/0 | 10.0.13.1/30 | none |
| R1 | G0/0/1 | 192.168.10.2/24 | none |
| R2 | G0/0/0 | 10.0.23.1/30 | none |
| R2 | G0/0/1 | 192.168.10.3/24 | none |
| R1 | HSRP group 10 virtual IP | 192.168.10.1 | none |
| R3 | G0/0/0 | 10.0.13.2/30 | none |
| R3 | G0/0/1 | 10.0.23.2/30 | none |
| R3 | G0/0/2 | 10.30.0.1/24 | none |
| R3 | Loopback1 | 203.0.113.1/24 | none |
| PC1 | NIC | 192.168.10.10/24 | 192.168.10.1 |
| PC2 | NIC | 192.168.10.11/24 | 192.168.10.1 |
| Server1 | NIC | 10.30.0.10/24 | 10.30.0.1 |
Steps
- Drag each device from the Topology onto the workspace and set its display name (click the device, Config tab, Display Name) to the name in the Devices table. Cable the ports the Links table lists: Packet Tracer's automatic connection type picks the right cable, or use a copper cross-over between two routers or between a router and a PC or server. If a router asks whether to enter the initial configuration dialog, answer
no. Name S1 at its prompt (hostname S1); it needs nothing else. - Address head office, R3, with its loopback standing in for the internet. Give Server1 its address and gateway (Desktop > IP Configuration).
Router> enable
Router# configure terminal
Router(config)# hostname R3
R3(config)# interface g0/0/0
R3(config-if)# ip address 10.0.13.2 255.255.255.252
R3(config-if)# no shutdown
R3(config-if)# interface g0/0/1
R3(config-if)# ip address 10.0.23.2 255.255.255.252
R3(config-if)# no shutdown
R3(config-if)# interface g0/0/2
R3(config-if)# ip address 10.30.0.1 255.255.255.0
R3(config-if)# no shutdown
R3(config-if)# interface loopback1
R3(config-if)# ip address 203.0.113.1 255.255.255.0
R3(config-if)# end
- Address the branch routers. R2's LAN interface gets OSPF priority 0, so it can never become DR on the branch LAN; set it now, before OSPF starts, so the election result is fixed. Give PC1 and PC2 their addresses with 192.168.10.1 as the gateway.
Router> enable
Router# configure terminal
Router(config)# hostname R1
R1(config)# interface g0/0/0
R1(config-if)# ip address 10.0.13.1 255.255.255.252
R1(config-if)# no shutdown
R1(config-if)# interface g0/0/1
R1(config-if)# ip address 192.168.10.2 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# end
Router> enable
Router# configure terminal
Router(config)# hostname R2
R2(config)# interface g0/0/0
R2(config-if)# ip address 10.0.23.1 255.255.255.252
R2(config-if)# no shutdown
R2(config-if)# interface g0/0/1
R2(config-if)# ip address 192.168.10.3 255.255.255.0
R2(config-if)# ip ospf priority 0
R2(config-if)# no shutdown
R2(config-if)# end
- OSPF on R3. Work out each wildcard first. The server LAN is passive, and both WAN links are point-to-point:
R3# configure terminal
R3(config)# router ospf 1
R3(config-router)# router-id 10.255.255.3
R3(config-router)# network 10.0.13.0 0.0.0.3 area 0
R3(config-router)# network 10.0.23.0 0.0.0.3 area 0
R3(config-router)# network 10.30.0.0 0.0.0.255 area 0
R3(config-router)# passive-interface g0/0/2
R3(config-router)# exit
R3(config)# interface g0/0/0
R3(config-if)# ip ospf network point-to-point
R3(config-if)# interface g0/0/1
R3(config-if)# ip ospf network point-to-point
R3(config-if)# end
- OSPF on R1. The branch LAN is not passive here: R1 and R2 are both routers on it, and their adjacency across it is a second path to head office.
R1# configure terminal
R1(config)# router ospf 1
R1(config-router)# router-id 10.255.255.1
R1(config-router)# network 10.0.13.0 0.0.0.3 area 0
R1(config-router)# network 192.168.10.0 0.0.0.255 area 0
R1(config-router)# exit
R1(config)# interface g0/0/0
R1(config-if)# ip ospf network point-to-point
R1(config-if)# end
- Break and fix: OSPF on R2, with the WAN statement typed one block too late, the lesson's wildcard slip. Type it exactly as shown:
R2# configure terminal
R2(config)# router ospf 1
R2(config-router)# router-id 10.255.255.2
R2(config-router)# network 10.0.23.4 0.0.0.3 area 0
R2(config-router)# network 192.168.10.0 0.0.0.255 area 0
R2(config-router)# exit
R2(config)# interface g0/0/0
R2(config-if)# ip ospf network point-to-point
R2(config-if)# end
R2# show ip ospf neighbor
R2# show ip protocols
R2 has one neighbor, R1 on the LAN, and none on GigabitEthernet0/0/0. Nothing else complains, and R2 even learns head office's routes through R1: a quiet failure. show ip protocols lists 10.0.23.4 0.0.0.3 area 0 under the networks; that block runs .4 to .7, and R2's WAN address is 10.0.23.1. Fix it:
R2# configure terminal
R2(config)# router ospf 1
R2(config-router)# no network 10.0.23.4 0.0.0.3 area 0
R2(config-router)# network 10.0.23.0 0.0.0.3 area 0
R2(config-router)# end
R2# show ip ospf neighbor
R2 now lists 10.255.255.3 as FULL/ - on GigabitEthernet0/0/0 and 10.255.255.1 as FULL/DR on GigabitEthernet0/0/1. 7. Read the tables in lesson 13's order:
R1# show ip ospf neighbor
R1# show ip route
R3# show ip route
R1 sees R2 as FULL/DROTHER, priority 0. R1 reaches 10.30.0.0/24 as [110/2] via 10.0.13.2: cost 1 across the WAN plus 1 for the server LAN. R3 has two equal paths to the branch, O 192.168.10.0/24 [110/2] via 10.0.13.1 and via 10.0.23.1, so it load-shares replies to the users. 8. Break and fix: static defaults on R1. The primary is fully specified, the safe form on Ethernet, so it leaves the table when the WAN interface goes down. Type the backup without a distance first:
R1# configure terminal
R1(config)# ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0/0 10.0.13.2
R1(config)# ip route 0.0.0.0 0.0.0.0 192.168.10.3
R1(config)# do show ip route
The S* 0.0.0.0/0 entry has two [1/0] via lines: equal distances, so R1 load-shares half the internet traffic through R2 even with its own WAN healthy. A backup needs a distance above the primary's 1. Fix it:
R1(config)# no ip route 0.0.0.0 0.0.0.0 192.168.10.3
R1(config)# ip route 0.0.0.0 0.0.0.0 192.168.10.3 5
R1(config)# end
Give R2 the mirror image, correct first time:
R2# configure terminal
R2(config)# ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0/0 10.0.23.2
R2(config)# ip route 0.0.0.0 0.0.0.0 192.168.10.2 5
R2(config)# end
- HSRP version 2 on both branch routers, R1 at priority 110, both preempting:
R1# configure terminal
R1(config)# interface g0/0/1
R1(config-if)# standby version 2
R1(config-if)# standby 10 ip 192.168.10.1
R1(config-if)# standby 10 priority 110
R1(config-if)# standby 10 preempt
R1(config-if)# end
R2# configure terminal
R2(config)# interface g0/0/1
R2(config-if)# standby version 2
R2(config-if)# standby 10 ip 192.168.10.1
R2(config-if)# standby 10 preempt
R2(config-if)# end
R1# show standby brief
- Test the healthy branch end to end:
C:\> ping 10.30.0.10
C:\> ping 203.0.113.1
C:\> tracert 10.30.0.10
The trace should show 192.168.10.2 (R1, answering for the gateway), then 10.0.13.2, then 10.30.0.10. 11. Failure 1, the WAN: shut head office's end of R1's link, then read R1.
R3# configure terminal
R3(config)# interface g0/0/0
R3(config-if)# shutdown
R1# show standby brief
R1# show ip route
C:\> ping 203.0.113.1
C:\> tracert 10.30.0.10
R1 is still HSRP Active, because nothing told HSRP the uplink failed. Traffic still flows because of the routing table: the primary default left with GigabitEthernet0/0/0 and S* 0.0.0.0/0 [5/0] via 192.168.10.3 floated in, and OSPF now reaches 10.30.0.0/24 via 192.168.10.3 across the LAN. The trace gains a hop through R2 (192.168.10.3). Restore the link:
R3(config-if)# no shutdown
R3(config-if)# end
- Failure 2, the LAN: shut the switch port facing R1.
S1> enable
S1# configure terminal
S1(config)# interface g0/1
S1(config-if)# shutdown
R1# show standby brief
R2# show standby brief
C:\> ping 10.30.0.10
R1 shows Init. After the 10-second hold time R2 is Active with the standby unknown, and the ping works through R2. Restore the port and watch R1 preempt back to Active:
S1(config-if)# no shutdown
S1(config-if)# end
R1# show standby brief
Verify
R1# show standby brief
R1# show ip route
R3# show ip route
R2# show ip ospf neighbor
C:\> tracert 10.30.0.10
Expected output: R1's HSRP row reads Active, local and 192.168.10.3. R1's table has a line beginning S* 0.0.0.0/0 [1/0] via 10.0.13.2 and no default via 192.168.10.3, and O 10.30.0.0/24 [110/2] via 10.0.13.2. R3's table has O 192.168.10.0/24 [110/2] with two next hops, 10.0.13.1 and 10.0.23.1. R2 lists 10.255.255.3 as FULL/ - and 10.255.255.1 as FULL/DR. PC1's trace lists 192.168.10.2, 10.0.13.2 and 10.30.0.10, in that order.
Save your work
Save the topology as ccna-cap3-branch-routing.pkt (File > Save As). The domain 5 capstone opens this file and adds monitoring to it.
Notes
Failure 1 shows a design gap rather than a fault: R1 kept the gateway role with no uplink, and only the floating static route kept users online. Lesson 16's standby 10 track with a decrement is the other answer, moving the gateway itself to R2. It is left out of the lab because Packet Tracer's support for tracking objects is not dependable. If both WAN links failed at once, the two floating defaults would point at each other; real designs avoid that with tracking or a dynamic default route.
This is an independent study companion for the Cisco CCNA 200-301 v2.0 exam and is not produced by or endorsed by Cisco. Cisco, CCNA and IOS are trademarks of Cisco Systems, Inc.
This is an independent study companion for Cisco CCNA 200-301 and is not produced by or endorsed by CompTIA.