Using VRRP on Ethernet Interfaces


You want to set up a router to be a backup default gateway to provide redundancy in case the primary default gateway router goes down.


Use the Virtual Router Redundancy Protocol ( VRRP) to set up a master and a backup gateway. First set up the master gateway on one router:

	[edit interfaces fe-1/0/0 unit 0 family inet address]
	aviva@RouterJ# set vrrp-group 1 virtual-address
	aviva@RouterJ# set vrrp-group 1 priority 254
	aviva@RouterJ# set vrrp-group 1 authentication-type md5
	aviva@RouterJ# set vrrp-group 1 authentication-key $1991poPPi

Then set up the backup gateway on a second router:

	[edit interfaces fe-1/0/0  unit 1 family inet address] 
	aviva@RouterH# set vrrp-group 1 virtual-address 
	aviva@RouterH# set vrrp-group 1 authentication-type md5 
	aviva@RouterH# set vrrp-group 1 authentication-key $1991poPPi 



With VRRP, you create a master default gateway router, which is active, on the LAN and one or more backup gateways that can take over automatically if the master goes down. The master and backup gateways share the same virtual IP address, which is the address that is advertised to the hosts on the LAN. If one of the backups takes over, the hosts on the LAN can still reach the default gateway without needing to be reconfigured.

This recipe sets up VRRP group 1 that has one backup gateway. The shared virtual address is The priority value (a value from1 to 255, with a default of 100) determines which router is the master and the order in which the backups take over. The router with the highest priority becomes the master. Notice that the backups must be on different routers than the master and than each other.

To check the configuration, use the show vrrp detail command. The following output shows that RouterJ is the master:

	aviva@RouterJ> show vrrp
	Interface Unit Group Type Address Int state VR state Timer
	fe-1/0/0 0 1 lcl up master A 0.736

RouterH is the backup:

	aviva@RouterH> show vrrp
	Interface Unit Group Type Address Int state VR state Timer
	fe-1/0/0 0 1 lcl up backup D 3.443

The output on both routers shows the real (local) IP address and the virtual address (VIP). The backup's output also shows the real IP address of the master.

The show vrrp extensive command displays the protocol exchanges and master-backup transitions among the VRRP group. Here's the output on the current master:

show vrrp extensive
	Interface: fe-1/0/0.0, Interface index: 68, Groups: 1, Active : 1
	 Interface VRRP PDU statistics
	 Advertisement sent : 392
	 Advertisement received : 0
	 Packets received : 0
	 No group match received : 0
	 Interface VRRP PDU error statistics
	 Invalid IPAH next type received : 0
	 Invalid VRRP TTL value received : 0
	 Invalid VRRP version received : 0
	 Invalid VRRP PDU type received : 0
	 Invalid VRRP authentication type received: 0
	 Invalid VRRP IP count received : 0
	 Invalid VRRP checksum received : 0

	Physical interface: fe-1/0/0, Unit: 0, Address:
	 Index: 68, SNMP ifIndex: 42, VRRP-Traps: disabled
	 Interface state: up, Group: 1, State: master
	 Priority: 254, Advertisement interval: 1, Authentication type: md5
	 Preempt: yes, Accept-data mode: no, VIP count: 1, VIP:
	 Advertisement timer: 0.658s, Master router:
	 Virtual router uptime: 00:08:22, Master router uptime: 00:08:19
	 Virtual MAC: 00:00:5e:00:01:01
	 Tracking: disabled
	 Group VRRP PDU statistics
	 Advertisement sent : 392
	 Advertisement received : 0
	Group VRRP PDU error statistics
	 Bad authentication type received: 0
	 Bad password received : 0
	 Bad MD5 digest received : 0
	 Bad advertisement timer received: 0
	 Bad VIP count received : 0
	 Bad VIPADDR received : 0
	Group state transition statistics
	 Idle to master transitions : 0
	 Idle to backup transitions : 1
	 Backup to master transitions : 1
	 Master to backup transitions : 0

Router Configuration and File Management

Basic Router Security and Access Control





Router Interfaces

IP Routing

Routing Policy and Firewall Filters







IP Multicast

JUNOS Cookbook
Junos Cookbook (Cookbooks (OReilly))
ISBN: 0596100140
EAN: 2147483647
Year: 2007
Pages: 290
Authors: Aviva Garrett © 2008-2020.
If you may any questions please contact us: