OcNOS-SP : Layer 3 Guide : Virtual Router Redundancy Protocol Configuration Guide : VRRP Configuration : Redundancy Using VRRP and OSPF: Two Virtual Routers
Redundancy Using VRRP and OSPF: Two Virtual Routers
This example illustrates a configuration of two routers between two end-hosts. R1 and R2 are two virtual routers functioning as backups for each other, with VRRP running on the 10.10.12.0/24 network (LAN), and OSPF running on the 10.10.10.0/24 network (ISP).
Topology
Figure 1-179: Redundancy Using VRRP and OSPF
R3 is an OSPF router representing an OSPF network to an ISP.
R1 is the VRRP Master/OSPF router.
R2 is the VRRP Backup/OSPF router.
Host 1 is an end-host.
VRRP handles any failure of the Master’s link to the LAN. Failures in the OSPF network that could cause the Master to lose routing information would cause packets from Host 1 that are targeted for R3 to be dropped. Running VRRP on the OSPF network to create redundancy is undesirable, because doing so would cause erroneous VRRP packets to be sent to the ISP.
An alternative method to achieve redundancy is to run OSPF on the LAN side. By running OSPF on the LAN, any routing information lost by the Master would be regained from the Backup on the LAN interface, resulting in ICMP redirects to R2 for traffic received from Host 1. To reduce OSPF control traffic, R1 and R2 are configured as Area Border Routers (ABR), and the LAN is configured as a stub network to reduce LSA advertisement traffic on the LAN. Before enabling OSPF on the LAN, verify that VRRP is running with R1 as the Master and R2 as the Backup.
R1#sh vrrp
VRRP Version: 3
VMAC enabled
Backward Compatibility disabled
 
Address family IPv4
VRRP Id: 1 on interface: vlan1.1000
State: AdminUp - Master
Virtual IP address: 10.1.1.2 (Owner)
Virtual MAC address is 0000.5e00.0101
Operational primary IP address: 10.1.1.2
Operational master IP address: 10.1.1.2
Priority is 255
Advertisement interval: 100 centi sec
Master Advertisement interval: 100 centi sec
Virtual router uptime: 0 hours 1 minutes 11 seconds (7100 centi sec)
Master uptime: 0 hours 1 minutes 11 seconds (7100 centi sec)
Accept mode: TRUE
Preempt mode: TRUE
Multicast membership on IPv4 interface vlan1.1000: JOINED
V2-Compatible: FALSE
 
R2#sh vrrp
VRRP Version: 3
VMAC enabled
Backward Compatibility disabled
 
Address family IPv4
VRRP Id: 1 on interface: vlan1.1000
State: AdminUp - Backup
Virtual IP address: 10.1.1.2 (Not-owner)
Virtual MAC address is 0000.5e00.0101
Operational primary IP address: 10.1.1.3
Operational master IP address: 10.1.1.2
Priority is 100
Advertisement interval: 100 centi sec
Master Advertisement interval: 100 centi sec
Virtual router uptime: 0 hours 0 minutes 38 seconds (3800 centi sec)
Skew time: 60 centi sec
Master Down Interval: 360 centi sec
Accept mode: TRUE
Preempt mode: TRUE
Multicast membership on IPv4 interface vlan1.1000: JOINED
V2-Compatible: FALSE
 
Steps to configure OSPF on the LAN are given below.
R3
 
#configure terminal
Enter the Configure mode.
(config)#router ospf 1
Configure the routing process and specify the process ID (1). The process ID should be a unique integer.
(config-router)#ospf router-id 10.10.10.181
Specify the OSPF router ID.
(config-router)#timers spf exp 0 0
Set timers to minimum time for quick convergence.
(config-router)#network 10.10.10.0/24 area 0
Define one interface (10.10.10.0/24) on which OSPF runs and associate the area ID (0).
(config-router)#commit
Commit the candidate configuration to the running configuration.
(config-router)#exit
Exit router VRRP mode.
R1
 
#configure terminal
Enter the Configure mode.
(config)#router ospf 1
Configure the routing process and specify the process ID (1). The process ID should be a unique integer.
(config-router)#ospf router-id 10.10.12.6
Specify the OSPF router ID.
(config-router)#area 1 stub
Define area 1 as a stub network.
(config-router)#network 10.10.10.0/24 area 0
Define one interface (10.10.10.0/24) on which OSPF runs and associate the area ID (0).
(config-router)#network 10.10.12.0/24 area 1
Define the other interface (10.10.12.0/24) on which OSPF runs and associate the area ID (1)
(config-router)#commit
Commit the candidate configuration to the running configuration.
(config-router)#exit
Exit router VRRP mode.
R2
 
#configure terminal
Enter the Configure mode.
(config)#router ospf 1
Configure the routing process, and specify the process ID (1). The process ID should be a unique integer
(config-router)#ospf router-id 10.10.12.251
Specify the OSPF router ID.
(config-router)#area 1 stub
Define area 1 as a stub network.
(config-router)#network 10.10.10.0/24 area 0
Define one interface (10.10.10.0/24) on which OSPF runs and associate the area ID (0).
(config-router)#network 10.10.12.0/24 area 1
Define the other interface (10.12.10.0/24) on which OSPF runs and associate the area ID (1)
(config-router)#commit
Commit the candidate configuration to the running configuration.
(config-router)#exit
Exit router VRRP mode.
Verification
1. Set gateway on the end-host (statically):
(root@host1)#route add -net 10.10.10.0 netmask 255.255.255.0 gw 10.10.12.6
2. Verify end-host reachability via traceroute:
(root@host1)#traceroute 10.10.10.181
traceroute to 10.10.10.181 (10.10.10.181), 30 hops max, 38 byte packets
1 10.10.12.6 (10.10.12.6) 0.835 ms 0.350 ms 0.341 ms
2 10.10.10.181 (10.10.10.181) 9.557 ms 0.572 ms 0.545 ms
3. Bring down eth2 of R1:
[root@r1 sbin]#ifconfig eth2 down
4. Verify end-host reachability via traceroute:
(root@host1)#traceroute 10.10.10.181
traceroute to 10.10.10.181 (10.10.10.181), 30 hops max, 38 byte packets
1 10.10.12.6 (10.10.12.6) 0.461 ms 0.352 ms 0.334 ms
2 10.10.12.251 (10.10.12.251) 0.425 ms 0.432 ms 0.410 ms
3 10.10.10.181 (10.10.10.181) 0.691 ms 0.639 ms 0.607 ms
5. Bring up eth2 of R1:
[root@r1 sbin]#ifconfig eth2 up
6. Verify end-host reachability via traceroute:
(root@host1)#traceroute 10.10.10.181
traceroute to 10.10.10.181 (10.10.10.181), 30 hops max, 38 byte packets
1 10.10.12.6 (10.10.12.6) 0.457 ms 0.356 ms 0.443 ms
2 10.10.10.181 (10.10.10.181) 0.698 ms 0.642 ms 0.618 ms
Last modified date: 08/28/2023