The Virtual Router Redundancy Protocol (VRRP) is a Redundancy protocol that dynamically assigns responsibility for one or more virtual routers to the VRRP routers on a LAN, allowing several routers on a multiaccess link to utilize the same virtual IP address. In a VRRP configuration, one router is elected as the virtual router master, with the other routers acting as backups in case the virtual router master fails.

Configuration for VRRP

Configuration on INBSW1 (Master)

INBSW1(config)#interface f0/0

INBSW1 (config-if)#ip address

INBSW1 (config-if)#no shutdown

INBSW1 (config-if)#vrrp 1 ip

INBSW1 (config-if)#vrrp 1 preempt

Configuration on INBSW2 (Backup)

INBSW2(config)#interface f0/0

INBSW2(config-if)#ip address

INBSW2(config-if)#no shutdown

INBSW2(config-if)#vrrp 1 ip

INBSW2config-if)#vrpp 1 priority 90

Configuration on INBSW3 (Backup)

INBSW3(config)#interface f0/0

INBSW3(config-if)#ip address

INBSW3(config-if)#no shutdown

INBSW3(config-if)#vrrp 1 ip

INBSW3config-if)#vrpp 1 priority 80

As per the above configuration, INBSW1 will be master Switch in VRRP group 1. When INBSW1 fails INBSW2 will take over as it has Higher priority between INBSW2 and INBSW3.

Preempt statement in the first switch is used to make sure it will take control as master when it came alive after fail.

Commands to Verify VRRP:

show vrrp [ interface type interface-path-id[vrid] ] [ brief | detail | statistics[all] ]

VRRP Command Syntax and details


 Command or ActionPurpose
Step 1enable

Example:Router> enable 
Enables privileged EXEC mode.Enter your password if prompted. 
Step 2configure terminal

Example:Router# configure terminal 
Enters global configuration mode. 
Step 3interface type number

Example:Router(config)# interface GigabitEthernet 0/0/0 
Enters interface configuration mode. 
Step 4ip address ip-address mask

Example:Router(config-if)# ip address 
Configures an IP address for an interface. 
Step 5vrrp group description text

Example:Router(config-if)# vrrp 10 description working-group 
Assigns a text description to the VRRP group. 
Step 6vrrp group priority level

Example:Router(config-if)# vrrp 10 priority 110 
Sets the priority level of the router within a VRRP group.The default priority is 100. 
Step 7vrrp group preempt [delay minimum seconds]

Example:Router(config-if)# vrrp 10 preempt delay minimum 380 
Configures the router to take over as virtual router master for a VRRP group if it has a higher priority than the current virtual router master.The default delay period is 0 seconds.The router that is IP address owner will preempt, regardless of the setting of this command. 
Step 8vrrp group timers advertise [sec] interval

Example:Router(config-if)# vrrp 10 timers advertise 110 
Configures the interval between successive advertisements by the virtual router master in a VRRP group.The unit of the interval is in seconds unless the sec keyword is specified. The default interval value is 1 second.Note   All routers in a VRRP group must use the same timer values. If the same timer values are not set, the routers in the VRRP group will not communicate with each other and any misconfigured router will change its state to master. 
Step 9vrrp group timers learn

Example:Router(config-if)# vrrp 10 timers learn 
Configures the router, when it is acting as virtual router backup for a VRRP group, to learn the advertisement interval used by the virtual router master. 
Step 10exit

Example:Router(config-if)# exit 
Exits interface configuration mode.