VRRP is a standards-based first hop redundancy protocol. * VRRP = virtual router redundancy protocol * VRID = virtual router ID * The virtual IP MAC is 00:00:5e:00:01:VRID (in our example, 00:00:5e:00:01:0a) * Priority is 0-254, highest wins
The master transmits VRRP advertisments at at the configured interval (default 3 seconds) to the multicast address of 126.96.36.199. In event of a failover event, the backup misses 3 VRRP advertisements (188.8.131.52) and the backup with the highest priority becomes the master, takes over master duties, and sends a gratuitous ARP. Now, the former backup, now master, sends out the VRRP advertisements.
- In preempt mode, a router will take over the master role if it has a higher priority. It will send a message to the backup router informing it of the preemption.
- In nonpreempt mode, a router with a higher priority will not preempt during failback.
- If the virtual IP is assigned to one one of the routers as its interface address, that router will be considered the “owner” and will automatically preempt during failback, no matter what setting is set.
- By default, AOS-Switches use preempt mode.
You first need to enable VRRP globally.
switch(config)# router vrrp ipv4 enable switch(config)# router vrrp virtual-ip-ping
Now, you configure it per VLAN interface.
switch-1(config)# vlan 10 switch-1(vlan-10)# ip address 10.10.10.2/24 switch-1(vlan-10)# vrrp vrid 10 switch-1(vlan10-vrrid-10)# virtual-ip-address 10.10.10.1 switch-1(vlan10-vrrid-10)# priority 254 switch-1(vlan10-vrrid-10)# enable switch-2(config)# vlan 10 switch-2(vlan-10)# ip address 10.10.10.3/24 switch-2(vlan-10)# vrrp vrid 10 switch-2(vlan10-vrrid-10)# virtual-ip-address 10.10.10.1 switch-2(vlan10-vrrid-10)# enable