28.06.2014 Views

Discussion

Discussion

Discussion

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Solution<br />

Use the Virtual Router Redundancy Protocol (VRRP) to set up a master and a<br />

backup gateway. First set up the master gateway on one router:<br />

[edit interfaces fe-1/0/0 unit 0 family inet address 10.0.2.2/24]<br />

aviva@RouterJ# set vrrp-group 1 virtual-address 10.0.2.100<br />

aviva@RouterJ# set vrrp-group 1 priority 254<br />

aviva@RouterJ# set vrrp-group 1 authentication-type md5<br />

aviva@RouterJ# set vrrp-group 1 authentication-key $1991poPPi<br />

Then set up the backup gateway on a second router:<br />

[edit interfaces fe-1/0/0 unit 1 family inet address 10.0.2.1/24]<br />

aviva@RouterH# set vrrp-group 1 virtual-address 10.0.2.100<br />

aviva@RouterH# set vrrp-group 1 authentication-type md5<br />

aviva@RouterH# set vrrp-group 1 authentication-key $1991poPPi<br />

<strong>Discussion</strong><br />

With VRRP, you create a master default gateway router, which is active, on the LAN<br />

and one or more backup gateways that can take over automatically if the master goes<br />

down. The master and backup gateways share the same virtual IP address, which is<br />

the address that is advertised to the hosts on the LAN. If one of the backups takes<br />

over, the hosts on the LAN can still reach the default gateway without needing to be<br />

reconfigured.<br />

This recipe sets up VRRP group 1 that has one backup gateway. The shared virtual<br />

address is 10.0.2.100. The priority value (a value from 1 to 255, with a default of<br />

100) determines which router is the master and the order in which the backups take<br />

over. The router with the highest priority becomes the master. Notice that the backups<br />

must be on different routers than the master and than each other.<br />

To check the configuration, use the show vrrp detail command. The following output<br />

shows that RouterJ is the master:<br />

aviva@RouterJ> show vrrp<br />

Interface Unit Group Type Address Int state VR state Timer<br />

fe-1/0/0 0 1 lcl 10.0.2.2 up master A 0.736<br />

vip 10.0.2.100<br />

RouterH is the backup:<br />

aviva@RouterH> show vrrp<br />

Interface Unit Group Type Address Int state VR state Timer<br />

fe-1/0/0 0 1 lcl 10.0.2.1 up backup D 3.443<br />

vip 10.0.2.100<br />

mas 10.0.2.2<br />

The output on both routers shows the real (local) IP address and the virtual address<br />

(VIP). The backup’s output also shows the real IP address of the master.<br />

Using VRRP on Ethernet Interfaces | 221<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!