VRRP
VRRP
Description
The Virtual Router Redundancy Protocol (VRRP) is a standards-based alternative to HSRP, defined in IETF standard RFC 2338. This section is brief, highlighting only the differences between HSRP and VRRP.
VRRP provides one redundant gateway address from a group of routers. The active router is called the master router , whereas all others are in the backup state . The master router is the one with the highest router priority in the VRRP group.
VRRP group numbers range from 0 to 255; router priorities range from 1 to 254. (254 is the highest, 100 is the default.)
The virtual router MAC address is of the form 0000.5e00.01xx, where xx is a two-digit hex VRRP group number.
VRRP advertisements are sent at 1-second intervals. Backup routers optionally can learn the advertisement interval from the master router.
By default, all VRRP routers are configured to preempt the current master router if their priorities are greater.
VRRP sends its advertisements to the multicast destination address 224.0.0.18 (VRRP), using IP protocol 112.
VRRP vs HSRP
VRRP | HSRP | |
---|---|---|
MAC | 0000.5e00.01xx | 0000.0c07.acxx |
Multicast Address | 224.0.0.18 | 224.0.0.2 |
IP Protocol | 112 | UDP(1985) |
Active Router Name | Master | Active |
Allow Standby IP Adderss Same as the Interface | Yes* | No |
Default Preemption | Yes | No |
Tracking Not Allowed on the Address Owner | Yes | No |
* The router with standby IP address same as the interface IP address will set its priority to 255 automatically and always be the master router whenever possible.
Gateway Addressing
Switch(config-if)# vrrp group ip ip-address [secondary]
Authentication
Switch(config-if)# vrrp group authentication string
Show Command
Switch# show vrrp [ brief ]
Switch-A# show vrrp brief
Interface Grp Pri Time Own Pre State Master addr Group addr
Vlan50 1 200 3218 Y Master 192.168.1.10 192.168.1.1
Vlan50 2 100 3609 Backup 192.168.1.11 192.168.1.2
Switch-A#
Switch-B# show vrrp brief
Interface Grp Pri Time Own Pre State Master addr Group addr
Vlan50 1 100 3609 Backup 192.168.1.10 192.168.1.1
Vlan50 2 200 3218 Y Master 192.168.1.11 192.168.1.2
Switch-B#
Switch-A# show vrrp
Switch-A# show vrrp
Vlan50 - Group 1
State is Master
Virtual IP address is 192.168.1.1
Virtual MAC address is 0000.5e00.0101
Advertisement interval is 1.000 sec
Preemption is enabled
min delay is 0.000 sec
Priority is 200
Authentication is enabled
Master Router is 192.168.1.10 (local), priority is 200
Master Advertisement interval is 1.000 sec
Master Down interval is 3.218 sec
Vlan50 - Group 2
State is Backup
Virtual IP address is 192.168.1.2
Virtual MAC address is 0000.5e00.0102
Advertisement interval is 1.000 sec
Preemption is disabled
Priority is 100
Authentication is enabled
Master Router is 192.168.1.11, priority is 200
Master Advertisement interval is 1.000 sec
Master Down interval is 3.609 sec (expires in 2.977 sec)
Switch-A#
Switch# show vrrp brief all
Switch# show vrrp interface type member/module/number
Properties
Per-interface Properties
priority
Description: Priority
Values: 1 to 254
Default: 100
Command:
Switch(config-if)# vrrp group priority level
timers
Description: Advertisement timer
Values:
Default: 1 second
Command:
Switch(config-if)# vrrp group timers advertise [ msec ] interval
A router can also be set to learn the advertisement interval from the master router by the following command.
Switch(config-if)# vrrp group timers learn
preempting
Description: Preempting
Values: [Enabled | Disabled]
Default: Enabled
Command:
Switch(config-if)# vrrp group preempt [delay seconds]
track
Description: Track an object
Values:
Default:
Command:
Switch(config-if)# vrrp group track object-number [decrement priority]
Example
Configuring Load Balancing with VRRP
Switch-A(config)# interface vlan 50
Switch-A(config-if)# ip address 192.168.1.10 255.255.255.0
Switch-A(config-if)# vrrp 1 priority 200
Switch-A(config-if)# vrrp 1 ip 192.168.1.1
Switch-A(config-if)# vrrp 2 priority 100
Switch-A(config-if)# no vrrp 2 preempt
Switch-A(config-if)# vrrp 2 ip 192.168.1.2
Switch-B(config)# interface vlan 50
Switch-B(config-if)# ip address 192.168.1.11 255.255.255.0
Switch-B(config-if)# vrrp 1 priority 100
Switch-B(config-if)# no vrrp 1 preempt
Switch-B(config-if)# vrrp 1 ip 192.168.1.1
Switch-B(config-if)# vrrp 2 priority 200
Switch-B(config-if)# vrrp 2 ip 192.168.1.2