For Ethernet, Fast Ethernet, Gigabit Ethernet, 10-Gigabit Ethernet,
and logical interfaces, you can configure the Virtual Router Redundancy
Protocol (VRRP) or VRRP for IPv6. VRRP enables hosts on a LAN to make
use of redundant routing platforms on that LAN without requiring more
than the static configuration of a single default route on the hosts.
The VRRP routing platforms share the IP address corresponding to the
default route configured on the hosts. At any time, one of the VRRP
routing platforms is the master (active) and the others are backups.
If the master fails, one of the backup routers or switches becomes
the new master router, providing a virtual default routing platform
and enabling traffic on the LAN to be routed without relying on a
single routing platform. Using VRRP, a backup router can take over
a failed default router within a few seconds. This is done with minimum
VRRP traffic and without any interaction with the hosts.
Routers or running VRRP dynamically elect master and backup
routers. You can also force assignment of master and backup routers
using priorities from 1 through 255, with 255 being the highest priority.
In VRRP operation, the default master router sends advertisements
to backup routers at regular intervals. The default interval is 1
second. If a backup router does not receive an advertisement for a
set period, the backup router with the next highest priority takes
over as master and begins forwarding packets.
Configure one master (Router A) and one backup (Router B) routing
platform. The address configured in the virtual-address statements differs from the addresses configured in the address statements. When you configure multiple VRRP groups on an interface,
you configure one to be the master virtual router for that group.
On Router A
[edit interfaces]
ge-0/0/0 {unit 0 {family inet {address 192.168.1.20/24 {vrrp-group 27 {virtual-address 192.168.1.15;priority 254;authentication-type simple;authentication-key booJUM;}}}}}
On Router B
[edit interfaces]
ge-4/2/0 {unit 0 {family inet {address 192.168.1.24/24 {vrrp-group 27 {virtual-address 192.168.1.15;priority 200;authentication-type simple;authentication-key booJUM;}}}}}
Configuring One Router to Be the Master Virtual Router for
the Group
[edit interfaces]
ge-0/0/0 {unit 0 {family inet {address 192.168.1.20/24 {vrrp-group 2 {virtual-address 192.168.1.20;priority 255;advertise-interval 3;preempt;}vrrp-group 10 {virtual-address 192.168.1.55;priority 201;advertise-interval 3;}vrrp-group 1 {virtual-address 192.168.1.54;priority 22;advertise-interval 4;}}}}}
Configuring VRRP and MAC Source Address Filtering
The VRRP group number is the decimal equivalent of the
last byte of the virtual MAC address.
[edit interfaces]
ge-5/2/0 {gigether-options {source-filtering;source-address-filter {00:00:5e:00:01:0a; # Virtual
MAC address}}unit 0 {family inet {address 192.168.1.10/24 {vrrp-group 10; # VRRP group
numbervirtual-address 192.168.1.10;priority 255;preempt;}}}}