VRRP Track Configuration Example [Step by Step]

VRRP Track Configuration Example [Step by Step]

I- Topology



II- VRRP Initial Configuration (without Tracking)

  • R1 configuration:
interface Ethernet0/0
 ip address 172.16.1.252 255.255.255.0
 half-duplex
 vrrp 10 ip 172.16.1.254
 vrrp 10 priority 150

!
interface Ethernet0/1
 ip address 10.10.1.2 255.255.255.252
 ip ospf 10 area 0
 half-duplex


router ospf 10
 log-adjacency-changes
 network 172.16.1.0 0.0.0.255 area 0


  • R2 configuration:
interface Ethernet0/0
 ip address 172.16.1.253 255.255.255.0
 half-duplex
 vrrp 10 ip 172.16.1.254
!
interface Ethernet0/1
 ip address 10.10.1.6 255.255.255.252
 ip ospf 10 area 0
 half-duplex

!
router ospf 10
 log-adjacency-changes
 network 172.16.1.0 0.0.0.255 area 0



At this point, The router R1 is the VRRP Master (Priority=150) and the router R2 is the VRRP Backup:

  • Verification on router R1 (Master):
R1#show vrrp
Ethernet0/0 - Group 10
  State is Master
  Virtual IP address is 172.16.1.254
  Virtual MAC address is 0000.5e00.010a
  Advertisement interval is 1.000 sec
  Preemption enabled
  Priority is 150
  Master Router is 172.16.1.252 (local), priority is 150
  Master Advertisement interval is 1.000 sec
  Master Down interval is 3.414 sec
  • Verification on router R2 (Backup):
R2#show vrrp
Ethernet0/0 - Group 10
  State is Backup
  Virtual IP address is 172.16.1.254
  Virtual MAC address is 0000.5e00.010a
  Advertisement interval is 1.000 sec
  Preemption enabled
  Priority is 100
  Master Router is 172.16.1.252, priority is 150
  Master Advertisement interval is 1.000 sec
  Master Down interval is 3.609 sec (expires in 3.181 sec)




III- VRRP Track Configuration

We will track the uplink interfaces on routers R1 and R2, Ethernet0/1 on both routers. Once the uplink interface goes down, we will decrement the VRRP priority on the Master router:

VRRP Track configuration on router R1

R1(config)#track 1 interface e0/1 ?
  ip             IP parameters
  line-protocol  Track interface line-protocol
R1(config)#track 1 interface e0/1 line-protocol

line-protocol: Tracks if the interface state is up.

IP, Tracks if:

  • IP routing is enabled.
  • An IP address is configured on the interface, and the interface state is up.

R1(config)#int Ethernet0/0
R1(config-if)#vrrp 10 track 1 decrement 60
R1(config-if)#vrrp 10 preempt



VRRP Track configuration on router R2


R2(config)#track 1 interface e0/1 line-protocol

R2(config-track)#int e0/0
R2(config-if)#vrrp 10 track 1 decrement 60
R2(config-if)#vrrp 10 preempt




IV- VRRP Track Verification

Uplink Interface E0/1 on Router R1 State Down

  • We will test the track by disabling the uplink interface on the VRRP Master router:
R1(config)#int ethernet 0/1
R1(config-if)#shutdown
R1(config-if)#
*Mar  1 01:11:13.311: %OSPF-5-ADJCHG: Process 10, Nbr 10.10.1.1 on Ethernet0/1 from FULL to DOWN, Neighbor Down: Interface down or detached
R1(config-if)#
*Mar  1 01:11:15.307: %LINK-5-CHANGED: Interface Ethernet0/1, changed state to administratively down
*Mar  1 01:11:16.307: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/1, changed state to down
R1(config-if)#
*Mar  1 01:11:16.407: %VRRP-6-STATECHANGE: Et0/0 Grp 10 state Master -> Backup
R1(config-if)#


  • Verification:

We can see in the log that the router R1 switched to the state Master -> Backup:

R1#show vrrp
Ethernet0/0 - Group 10
  State is Backup
  Virtual IP address is 172.16.1.254
  Virtual MAC address is 0000.5e00.010a
  Advertisement interval is 1.000 sec
  Preemption enabled
  Priority is 90  (cfgd 150)
    Track object 1 state Down decrement 60
  Master Router is 172.16.1.253, priority is 100
  Master Advertisement interval is 1.000 sec
  Master Down interval is 3.414 sec (expires in 2.874 sec)


We can see in the log that the router R1 switched to the state Backup -> Master:

R2#
*Mar  1 01:11:17.347: %VRRP-6-STATECHANGE: Et0/0 Grp 10 state Backup -> Master
R2#show vrrp
Ethernet0/0 - Group 10
  State is Master
  Virtual IP address is 172.16.1.254
  Virtual MAC address is 0000.5e00.010a
  Advertisement interval is 1.000 sec
  Preemption enabled
  Priority is 100
    Track object 1 state Up decrement 60
  Master Router is 172.16.1.253 (local), priority is 100
  Master Advertisement interval is 1.000 sec
  Master Down interval is 3.609 sec




Uplink Interface E0/1 on Router R1 State UP

When The router R1 Uplink interface E0/1 comes back up again, R1 will reclaim its Master role.

  • On Router R1:
*Mar  1 01:24:08.591: %SYS-5-CONFIG_I: Configured from console by console
R1#
*Mar  1 01:24:09.143: %LINK-3-UPDOWN: Interface Ethernet0/1, changed state to up
*Mar  1 01:24:10.143: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/1, changed state to up
R1#
*Mar  1 01:24:10.211: %VRRP-6-STATECHANGE: Et0/0 Grp 10 state Backup -> Master
R1#
*Mar  1 01:24:12.435: %OSPF-5-ADJCHG: Process 10, Nbr 10.10.1.1 on Ethernet0/1 from LOADING to FULL, Loading Done

R1#show vrrp
Ethernet0/0 - Group 10
  State is Master
  Virtual IP address is 172.16.1.254
  Virtual MAC address is 0000.5e00.010a
  Advertisement interval is 1.000 sec
  Preemption enabled
  Priority is 150
    Track object 1 state Up decrement 60
  Master Router is 172.16.1.252 (local), priority is 150
  Master Advertisement interval is 1.000 sec
  Master Down interval is 3.414 sec



  • On Router R2:

R2#
*Mar  1 01:24:11.211: %VRRP-6-STATECHANGE: Et0/0 Grp 10 state Master -> Backup
R2#show vrr
R2#show vrrp
Ethernet0/0 - Group 10
  State is Backup
  Virtual IP address is 172.16.1.254
  Virtual MAC address is 0000.5e00.010a
  Advertisement interval is 1.000 sec
  Preemption enabled
  Priority is 100
    Track object 1 state Up decrement 60
  Master Router is 172.16.1.252, priority is 150
  Master Advertisement interval is 1.000 sec
  Master Down interval is 3.609 sec (expires in 3.165 sec)

R2#

Bilel-A

Enthusiastic Network Engineer specializing in Cisco ACI, passionate about solving challenges. A lifelong learner who loves gaining and sharing knowledge. Profile: https://www.linkedin.com/in/bilel-ameur-71116b2b5
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x