Vous êtes sur la page 1sur 12

White Paper

Virtual Router
Redundancy Protocol
(VRRP)
The Virtual Router Redundancy Protocol (VRRP)

transfers the responsibility of routing from one router

to another if the original router goes down. This white

paper discusses how the Virtual Router Redundancy

Protocol (VRRP) works. It first gives a general introduction

to VRRP, then it gets into a detailed discussion about

how it works, illustrated with examples. Finally, there is

information on how to configure VRRP on an Passport*

routing switch.
Introduction to VRRP
VRRP transfers the responsibility of routing from one
router to another if the original router goes down. In
other words, it provides backup for a router connecting
a network to the outside world.

Routers are smart machines that are capable of making


routing decisions (assuming that some type of dynamic
routing is enabled) if there are any changes in the
topology. On the other hand, hosts cannot make routing
decisions on their own, even if there are such changes.

2 Virtual Router Redundancy Protocol (VRRP) White Paper


Hosts have a default gateway router IP address owned by Passport A. If the See Figure 1. This is a LAN with an IP
configured, and that router is the virtual router's IP address is not owned address of 200.1.1.0/24. There are multiple
connection between them and the outside by any of the VRRP routing switches, hosts on this LAN and the LAN is connected
world. Hosts on one network can then the routing switches compare their to two Passport routing switches, RS1
communicate with hosts on any other priorities and the higher priority owner and RS2. These Passport routing switches
network, provided there is a route becomes the master. If the priorities are connect to router R, which allows them
between them. identical, then the higher IP address wins. to go to the Internet. It is up to the network
Everything seems to work well as long For example, assume that A becomes manager to decide which one of these two
as the default gateway for the hosts on the master. In this case, B becomes the routing switches should be the default
the LAN is up and running. But what backup routing switch and waits to hear gateway for these hosts. In other words,
happens if the default gateway goes down? advertisements from A, which confirm which route should be taken up by the
All hosts that have this router configured that A is alive. If routing switch A goes traffic going out of the LAN? (How the
as the default gateway lose connectivity down, its responsibilities are transferred traffic should flow out of that LAN would
to the outside world. to routing switch B, without making any depend on many factors, but that is
change on the hosts. In case A comes up, beyond the scope of this discussion).
There is a possibility that there is another
the responsibility of the master goes back Assume that in this case the network
router that has a connection to this LAN
to A. Thus, with VRRP enabled on your manager decides that RS1 will be the
and to the rest of the network. Can this
Passport routing switches, you can trans- default gateway for the hosts on LAN
working router take the responsibilities
fer the responsibility of routing from one 200.1.1.0/24. Thus, all the hosts on LAN
of the router that went down? It can, but
routing switch to the other without making 200.1.1.0/24 have RS1 configured as the
only if you change the default gateway
any changes to the host configuration. default gateway. Once RS1 is configured
on the hosts. When a host needs to
for VRRP, it looks at the IP address of the
communicate with a host on a different
virtual router and compares it with the
LAN, it sends the information to the Detailed description
IP addresses of its own interface that is
default gateway IP address. If that address of VRRP configured for VRRP. As routing switch
is down, then the connection is lost. To An example of VRRP is presented,
1 owns the virtual router's IP address,
transfer the responsibilities of this router including the VRRP packet formation
it declares itself the master and sends
to the working router, you need to point and its contents. There are different cases
out an advertisement to all the other
the traffic to the IP address of the working where VRRP routers go through the
VRRP routers.
router. This means that you need to process of deciding their roles as masters
change the default gateway on the hosts, and backups.
and the connection will be resumed.
You need to keep in mind that it will take Figure 1: How VRRP works on a LAN.
a long time to reconfigure the default
gateway on a large number of hosts.
VRRP provides a solution for a situation
like this one. Assume, for example, that
Host A
there are two Passport routing switches: 200.1.1.12/24

A and B. Once VRRP is enabled on these Routing Switch 1


200.1.1.1/24
Passport switches, they go through the Master Internet
process of deciding who will be the master.
Router R
Host B
200.1.1.11/24
First, both the Passport routing switches
will look at the virtual router's IP address, Routing Switch 2
200.1.1.2/24
and the one that owns it becomes the Backup

master. Thus, if the network administra- Host C


200.1.1.10/24
tor wants A to be the master, one way to
accomplish this is to define the virtual
router's IP address to be the same as the

Virtual Router Redundancy Protocol (VRRP) White Paper 3


It is not necessary for the virtual IP address Figure 2: Contents of a VRRP Packet.
to be owned by one of the routing switches 0 4 8 16 18 24 31
connecting the LAN to the outside world. VERS | HLEN | SERVICE TYPE | TOTAL LENGTH
The routing switches can back up a IDENTIFICATION | FLAGS | FRAGMENT OFFSET
different virtual router's IP address as TIME TO LIVE | PROTOCOL | HEADER CHECKSUM
SOURCE IP ADDRESS
well. In this case, however, the process of
DESTINATION IP ADDRESS
deciding which is the master is different.
IP OPTIONS ONLY | PADDING
As mentioned earlier, this process involves VERS | TYPE | VRID | PRIORITY | Count IP Addresses
comparing two things. First, the priority; AUTH TYPE | Advertisement Inter | CHECKSUM
the higher priority wins. If the priority is IP ADDRESS (1)
the same, then the higher IP address wins. :
In the previous example, we assumed that :
the network administrator decided to IP ADDRESS (n)
AUTHENTICATION DATA (1)
configure the IP address of the interface of
AUTHENTICATION DATA (2)
routing switch 1 as the virtual router's IP
address. This way, when routing switch 1
looks at the virtual router's IP address, it Time To Live (TTL): This is an 8-bit field; specifies the master has stopped working,
realizes that it is the owner of this address, the value in this field must be equal to and the backup router needs to transition
and declares itself as the master. If neither 255. Any VRRP packet received with to master state.
of the two own the virtual router's IP TTL not equal to 255 is discarded. Count IP Address: This 8-bit field specifies
address, then they compare the priorities,
Note: The router does not forward a the number of IP addresses contained in
and if the priorities are the same, then the
datagram with VRRP multicast destination this VRRP advertisement.
IP addresses are compared.
address, regardless of its TTL. Authentication Type: This 8-bit field
Here, you need to stop and analyze what
Protocol: This is an 8-bit field that specifies the authentication type being
the VRRP advertisement packet looks like
specifies the protocol being used. The used. The only option available in Passport
before proceeding any further.
IP protocol number assigned by IANA routing switches is no authentication.
VRRP packets are sent encapsulated in for VRRP is 112. Advertisement Interval: This 8-bit
the IP packets. Figure 2 shows what the
The following fields are in the VRRP field specifies the time interval between
packet's IP header —combined with the
packet: advertisements sent from the master, to
packet itself — looks like, and what its
Version (VERS): This is a 4-bit field that
let the backup router know that it is alive.
components are.
specifies the VRRP version. The version It is important that all routers with
that is available is 2. the same VRID should have the same
VRRP Packet Format advertisement interval.
The important fields in the IP header Type: This is a 4-bit field that specifies the
(in terms of VRRP) are explained below. Checksum: This 16-bit field is used to
type of VRRP packet. The only type is
ADVERTISEMENT. detect data corruption in the VRRP message.
Source IP Address: This is a 32-bit field.
The source address is the primary IP IP Address(es): This is a 32-bit field. The
Virtual Router Identifier (VRID): Identifies
address of the interface from which the the virtual router for which this packet is IP address is the virtual router’s IP address
packet is being sent. This is the IP address reporting status. that the master is backing up.
of the master router’s interface connected Note: At this point there is only one IP
Priority: This 8-bit field specifies the
to the LAN. address per advertisement that the
sending VRRP router’s priority for the
Destination IP Address: This is a 32-bit virtual router. A higher value means a Passport switch sends out if it has VRRP
field. It is the IP multicast address assigned higher priority. The priority value of the activated.
by the IANA for VRRP. This multicast VRRP router that owns the IP address Authentication Data: The authentication
IP address is 224.0.0.18. All the routers associated with the virtual router must be string is not utilized in Passport VRRP
running VRRP receive this multicast. 255. The default priority value is 100, but routing, as there is no VRRP authentication
you can assign any value between 1 and as yet.
254. A priority of 0 is a special value that

4 Virtual Router Redundancy Protocol (VRRP) White Paper


The next topic to address is how the Advertisement_Timer — that starts after Relating this case to the original example,
master becomes the master, and under the Advertisement is sent out. Once the let us assume that RS1 goes down for
what conditions a backup routing switch timer reaches the Advertisemet_Interval, some reason. The Advertisement_Interval
will take over the role of the master. it sends another Advertisement. The is set to 3 seconds. How long will it take
Returning to the example, the master Advetisement_Interval is one second by for RS2 to takeover as the master? This
sends out an advertisement with the default, but is configurable. If the backup can be determined from the formula:
destination address as the multicast IP Passport routing switches do not receive Master_Down_Interval = ( 3 *
address, declaring itself the master. As the Advertisement before the Advertisement_Interval ) + Skew_time

mentioned earlier, the multicast group has Master_Down_Interval times out, it


Skew_time = (256 – Priority) / 256
the IP address 224.0.0.18, and the declares itself to be the master. The
Master_Down_Interval is calculated So the skew time is:
Passport routing switches that have VRRP
running will receive this multicast packet. as follows: Skew_time = (256-100) / 256 = 156/256

Passport switches with the same VRID Master_Down_Interval = (3 * Master_Down_Interval = ( 3 * 3) + 156/256 =


will accept the packet, and the others will Advertisement_Interval) + Skew_time (9 + 156/256)s

drop it. The MAC address associated with Skew_time = (256 – Priority) / 256 The backup will give the master little
224.0.0.18 is 01-00-5e-00-00-12, so all more than 9 seconds, which gives
From the above information, you can see
the packets for multicast IP are sent to the master three chances to send an
that the master gets three chances to send
this MAC address. advertisement, before it takes over. After
an advertisement before the backup takes
Once the Passport routing switches over as a master. This means that VRRP (9 + 156/256) seconds, RS2 declares itself
receive this multicast, they will stay in (by default) will converge in 3 seconds. to be the master.
backup state and monitor advertisements Case 2: This is a situation where the
Following are the three situations where
from the master to ensure that the master network manager either shuts down the
a backup router takes over as master:
is functioning. The backup routing switch interface connecting to the LAN, or turns
has Master_Advertisement_Timer, which Case 1: The master goes down due to a
off VRRP on the master routing switch.
starts after it receives an advertisement. problem. The main thing to realize here In a case like this, the master sends out
This timer helps the backup routing is that the master routing switch interface an advertisement with priority equal to 0.
switches to calculate if the master has just dies. In a case like this, the backup This is a message for the backup routing
gone down; if so, it declares itself as the routing switches will wait until the switches — one needs to take up the role
master. The master, on the other hand, Master_Down_Timer times out, and of the master, and not wait until the
has its own timer — called then will take over as the master. Master_Down_Timer times out.
In this case, VRRP is turned off on RS1.
Figure 3: A Configuration with More than One Backup Routing Switch. Therefore, RS1 sends an advertisement
to the multicast address with the priority
equal to 0. This informs the backup
routing switches that the master has gone
down, and one of the backup RS needs to
Host A Routing Switch 1
200.1.1.1/24
take over as the master. In this example,
200.1.1.12/24
Master
it would be RS2 that becomes the new
master, and sends out an advertisement
Internet
to the multicast address declaring itself
Host B Routing Switch 2
200.1.1.2
Router R as the master.
200.1.1.11/24
Backup
Now, consider a slightly different
scenario. What if there is more than one
backup routing switch? See Figure 3.
Host C Routing Switch 3
200.1.1.13/24 200.1.1.10/24
Backup

Virtual Router Redundancy Protocol (VRRP) White Paper 5


In this case, there are two backup Passport Figure 4: The Connections between the Routers are Not the
routing switches, with IP addresses Only Critical Connections.
200.1.1.2/24 and 200.1.1.10/24. The
master determination (when the original
master is alive) is done in the same way as
mentioned earlier. The difference is that Routing Switch 1
Host A
200.1.1.1/24 206.1.1.1/24
now there are two backup routers, RS2 200.1.1.12/24
Master Critical IP
Address
and RS3. When the master routing switch
RS1 goes down, the Master_Down_ Internet
Timers of the backup routing switches
Router R
Host B
time out, and they declare themselves 200.1.1.11/24

as master. Both RS2 and RS3 send out


advertisements to the multicast address
assuming that they are the masters. But Routing Switch 2 Routing Switch 3
Host C
200.1.1.2/24
there can be only one master. 200.1.1.13/24
Backup

To determine who will be the master,


both Passport routing switches compare the first hop and the second hop is also to define a critical IP address on the
their priorities; the routing switch with very important. If that connection goes VRRP routers (206.1.1.1/24 in this case);
the higher priority becomes master. If the down, the master routing switch is not if that IP address goes down, the master
priorities are the same, then the higher IP able to perform its function properly. In a routing switch steps down from its position.
address (RS3 in this case) becomes the case like this, the IP address of the interface It declares that another routing switch
master routing switch. Because the IP that connects the first hop to the second needs to take up the role of the master by
addresses have to be different, there hop is called the critical IP address. If the sending out an advertisement with the
cannot be a problem in determining the critical IP address goes down, it does not priority equal to 0.
master; one IP address is going to be effect the connection between the hosts, In this case, you can see that the backup
greater than the other. and the master and the hosts keep on routing switch becomes the master
forwarding traffic to this particular routing routing switch. If the master does not
If the original master routing switch —
switch (as it is the master). This adds an own the virtual router's IP address, then
RS1 — comes up again, it sends out an
extra hop between the source and the the advertisements it sends out has its
advertisement with priority equal to 255.
destination because the master forwards original priority (and not 255). This way,
When the virtual master routing switch
the traffic to the backup routing switch when the original master comes back up,
looks at this advertisement, it compares
that has a route to the destination. In a it — assuming it was the owner of the
the priority with its own. Since its own
case like this, you can configure the virtual router IP address — sends out an
priority is lower then 255, it goes back to
VRRP RS with the critical IP address that advertisement with a priority of 255.
the backup state. In this example, RS1’s
tells the VRRP router to give up its master When the acting or virtual master receives
priority takes precedence over RS3’s priority;
status if the interface that owns the critical this high priority advertisement it goes
RS3 thus goes back to the backup state.
IP address goes down (see Figure 4). back to the backup state. When routing
Case 3: There can be another case where
In this example, assume that the master is switch A’s critical connection comes
the connection between the host and the
RS1. RS1 connects to R, and R forwards up again, routing switch B reverts to
first hop router may be good, but that
the traffic to the Internet. If the connection backup mode.
might not be the only critical connection
between RS1 and R is lost, the hosts on
between the two networks. For instance,
network 200.1.1.0/24 will lose the route
it is possible that the connection between
to the Internet through RS1. RS1 sends
the traffic to RS2, as that is the other
route RS1 has in its routing table. This
adds an extra hop for the traffic going to
the Internet, as the traffic first goes to RS1
and then to RS2. The way around this is

6 Virtual Router Redundancy Protocol (VRRP) White Paper


From the Perspective address to the default gateway whose IP Load Sharing
address is 200.1.1.1/24. In return, RS1 Referring to Figure 1 in our initial
of the Host
replies with the virtual router's MAC example, the master is the one that is
All the decisions regarding who is going
address (which is 00-00-5E-00-01- forwarding all the traffic. The other
to be the master for a particular LAN are
<VRID>). Then, the host sends the routing switch is just sitting there as a
made on the routing switches. The host is
packets to this MAC address. This is how backup. To utilize the bandwidth efficiently,
oblivious to the whole process. When a
the message is routed out of the LAN. we can create two different VRIDs, such
host must send a message to some host on
a different LAN connected by the VRRP If RS1 goes down, and RS2 takes over that half of the traffic goes through RS1
routers, it sends an ARP request for the as the virtual master, all forwarding and the other half goes through RS2.
MAC address of the default gateway. and ARP tasks are performed by RS2. To do this, we configure RS1 to be the
Therefore, when host A sends an ARP for default gateway for a certain number of
Normally, when a host “ARPs for”
the MAC address to the default gateway, hosts, and RS2 for the rest of them.
(resolves) the MAC address, the routing
RS2 replies to that with the virtual In Figure 6 (page 8), RS1 is the default
switch replies with its own physical
router's MAC address (00-00-5E-00-01- gateway for the three hosts at the top,
address. But when VRRP is deployed, the
<VRID>). Another scenario is that the and RS2 is the default gateway for the
master replies with a virtual MAC address
host already had an ARP table and knows three hosts at the bottom. There are two
instead of its actual MAC address. The
that if it needs to send any information to VRIDs: 1 and 2. RS1 (with VRID 1)
benefit of this virtual MAC address is that
the 200.1.1.1/24 IP address (which is its is the master for host A, B and C, and
when the master goes down and a backup
default gateway), it will send it to the 00- backup for the hosts D, E and F. On the
routing switch becomes the master, it
00-5E-00-01-<VRID> MAC address. So, other hand, RS2 (with VRID 2) is the
does not make any difference to the host
it sends it to the virtual router's MAC master for the hosts D, E and F, and the
because it uses the same MAC address.
address, and the information flows via backup for A, B and C. This way, the traffic
The virtual MAC address belongs to the
RS2 instead of RS1. For the host, it is all going out of the LAN 200.1.1.0/24 is
virtual IP address, which belongs to the
the same. But if the routing switches were shared between the two routing switches,
master for that VRID.
to reply to ARPs with their physical thus efficiently utilizing the routing
For instance, see Figure 5. Host A wants addresses, then the situation would be switches and bandwidth.
to send a message to Host D. In this case, totally different.
RS1 is acting as the master, and RS2 is the
backup. Host A will ARP for the MAC

Figure 5: The Benefits of Using a Virtual MAC Address.

Host A Host D
200.1.1.12/24

Routing Switch 1
200.1.1.1/24
Master

Router R
Host B
200.1.1.11/24

Routing Switch 2
200.1.1.2/24
Backup

Host C
200.1.1.10/24

Virtual Router Redundancy Protocol (VRRP) White Paper 7


Critical IP address When one host sends an ARP for the IP Initialize: When VRRP is enabled, the

Depending on your topology, you can address owned by a host that belongs to a first stage the routing switch goes through
also define a critical IP address in the subnet on the other side of the routing is the initialization stage. This involves the
configuration of the VRRP router. The switch, the routing switch replies with its following steps:
critical IP address is the address of an own interface MAC address. It then for- The routing switch looks at the virtual
interface link that affects the performance wards the packet to the destination host. IP address and determines if it is the
of the master routing switch, if this link With VRRP enabled, when the master master. If it owns that address, it realizes
goes down. If the interface that owns the receives an ARP request, it replies with the it is the master, and that its priority is
critical IP address goes down, the routing virtual router's MAC address and not the equal to 255.
switch steps down from being the master, actual physical address; thus, when the
If P is equal to 255, then the VRRP
and sends out an advertisement with responsibilities of master are switched to a
router:
priority equal to 0. If we do not define the different routing switch, the MAC address
critical IP address, the master remains as is the same. • Sends an ADVERTISEMENT
master, and (depending on the topology) declaring itself as the master
that might not be the best path anymore. A Brief Description • Broadcasts a gratuitous ARP with
This is explained in an example related to of the Different Stages the virtual router MAC address
Figure 6. of VRRP Routers (00-00-5E-00-01-<VRID>) to all the
You can also define critical IP addresses With the understanding of how VRRP IP addresses associated to the virtual
on the backup routing switches. In case works, we can summarize the different router's IP address
the master goes down, one of the backup stages through which a VRRP router goes. • Starts the advertisement timer
routing switches takes its place. If the There are three different stages a VRRP • Transitions to a master state
critical IP address of the backup is down, router goes through:
it does not declare itself as the master. If the priority is between 0 and 255,
• Initialize then the VRRP router:
You can only define one critical IP address
• Backup • Starts the Master_Down_Timer
on one Passport routing switch.
• Master • Transitions to a backup state
How Proxy ARP
Works with VRRP Figure 6: R1 is the Gateway for Hosts A – C, and R2 is the Gateway
a Passport routing switch running for Hosts D – F.
proxy ARP allows the hosts on different
networks to communicate with each other
as if they were on the same network. The Host A

routing switch or gateway keeps routing


tables with information on the subnets on
both sides. Host B
Routing Switch 1
200.1.1.1/24
Master – VRID 1
Backup – VRID 2

Host C
Default gateway
on network Internet
is 200.1.1.1/24
Router R

Host D

Routing Switch 2
200.1.1.2/24
Backup – VRID 1
Master – VRID 2
Host E

Host F
Default gateway
on network
is 200.1.1.2/24

8 Virtual Router Redundancy Protocol (VRRP) White Paper


The Backup State The Master State After you are in the configuration context,
In the backup state, the VRRP router In the master state, the VRRP router must: you can configure any isolated routing
monitors the master routing switch to switch port for VRRP. As a network
• Respond to ARP requests, or accept
confirm that it is alive. While it does that, administrator, you need to decide what
packets for the IP address or addresses
it has the following responsibilities: VRID to assign to the interfaces of the
associated with the virtual router
VRRP router.
• Must not respond to ARP requests or • Not accept packets addressed to the
accept packets for the IP address(s) By default, the advertisement interval
IP address associated with the virtual
associated with the virtual router is one second, but you can configure it
router if it is not the owner of the
differently if you want. The important
• Must discard packets destined for the IP address
thing is that the advertisement interval
virtual router's MAC address • Forward packets destined for the for all the routing switches should be the
• Start the Master_Down_Timer and set virtual router's MAC address same on the same VRID. If it is different,
the Master_Down_Interval If a shut down event is received, then the then it could cause disruptions in the
If an advertisement is received that has P VRRP router sends out an advertisement network, which could cause problems.
equal to 0, or if the with 0 priority. For example, assume routing switch 1 is
Master_Down_Interval times out, then If an advertisement with a greater priority the master and routing switch 2 is the
the VRRP router: or higher IP address (if the priority is the backup. Assume the
• Sends an advertisement declaring itself same) is received by the virtual master, it Advertisement_Interval on routing switch
as the master goes through the following process. 1 is 10s and on routing switch 2 is 1s.
• Broadcasts a gratuitous ARP with the • Transition to backup state Since routing switch 1’s
virtual router's MAC address (00-00- Advertisement_Interval is 10s, it will
• Cancel advertisement timer
5E-00-01-<VRID>) to all the IP send an advertisement after 10s. But as
addresses associated with the virtual • Start the Master_Down_Timer routing switch 2 and routing switch 3’s
router's IP If an advertisement is received with the Advertisement_Interval is 1s, after
priority lower than local priority, or with a (3S+Skew_Time) it declares itself as a
• Starts the advertisement timer
lower IP address if the priority is the same master and sends an advertisement out.
• Transitions to master state then the VRRP router discards the adver- Routing switch 1 discards the advertisement,
If an advertisement is received that has a tisement. as it has the higher priority. We now have
higher priority, or a higher IP address (if two virtual routers, and duplication
the priority is the same), then the VRRP Configuring might occur. When routing switch 1
router goes back to the backup state. VRRP on Passport sends out its advertisement after 10s,
Following are the command line interface routing switch 2 steps down, as 1 has a
If an advertisement is received that has a
(CLI) commands you useto configure higher priority. But the whole process
lower priority or lower IP address if the
VRRP: starts again after (3S+Skew_Time) seconds.
priority is the same then the VRRP router
Therefore, it is important to configure
discards the advertisement and stays in ethernet <ports> ip vrrp <vrid> address
<ipaddr> that same advertisement_interval on all
the master state.
ethernet <ports> ip vrrp <vrid> adver-int
the VRRP routers with the same VRID.
<seconds>
ethernet <ports> ip vrrp <vrid> critical-ip
<ipaddr>
ethernet <ports> ip vrrp <vrid> delete
ethernet <ports> ip vrrp <vrid> disable
ethernet <ports> ip vrrp <vrid> enable
ethernet <ports> ip vrrp <vrid> priority
<prio>

First, to get into the configuration


context, type the following command:
# config

Virtual Router Redundancy Protocol (VRRP) White Paper 9


The priority is another parameter you can stand about the example is that the goal is The configuration for RS1 is as follows,
define; it is set to 100 by default. If you to inform you of how you can configure assuming that the Ethernet interface that
configure it differently, then you can the Passport routing switch for VRRP is being configured for VRRP is 1/1:
decide who will be the next master if the routing, not how you should, as that ethernet 1/1 ip vrrp 1 address 205.1.1.1/24
master goes down. As mentioned earlier, depends on a number of factors.
ethernet 1/1 ip vrrp 1 adver-int 3
priority is the first thing the backup In this example (see Figure 7), there
routing switches compare, to determine are two networks: 205.1.1.0/24 and ethernet 1/1 ip vrrp 1 critical-ip 201.1.1.1/24
the master. The one with the higher 207.1.1.0/24. To keep things simple, ethernet 1/1 ip vrrp 1 enable
priority becomes the master. assume that all the routing switches in The configuration for RS1 shows that the
You also need to enable VRRP by using the topology have the same kind of links. virtual router's IP address is 205.1.1.1/24,
the enable command: To send a message from network and the advertisements should be 3 seconds
ethernet <ports> ip vrrp <vrid> enable
205.1.1.0/24 to 207.1.1.0/24, the best apart. If the interface that owns IP address
route seems to be through RS1, as the 201.1.1.1/24 goes down, then RS1 is no
You can disable VRRP by using the dis- two LANs are two hops away. In case RS1 longer the master routing switch, and one
able command. goes down, the next best route would be of the backup routing switches takes the
ethernet <ports> ip vrrp <vrid> disable through RS2, as the LANs are three hops responsibility of being the master. It is not
To understand how to configure VRRP away. The network administrator wants to important to define the priority here,
on a Passport routing switch, consider the have RS1 as the master. Also, the critical because RS1 is going to be the master, as
following example. This example looks at IP address for RS1 is the interface it owns the virtual router's IP address.
how to configure the Passport routing connecting RS1 to R, because if that goes Therefore, it will automatically get the
switches for VRRP. One thing to under- down, the master is not able to perform priority value of 255. Priority could prove
its responsibilities. important for the backup routers.

Figure 7: Example of Setting up Passport Routing Switches The configuration for RS2 is as follows,
for VRRP Routing. assuming that the Ethernet interface that
is being configured for VRRP is 2/3:
ethernet 2/3 ip vrrp 1 address 205.1.1.1/24

ethernet 2/3 ip vrrp 1 adver-int 3

Routing Switch 1 ethernet 2/3 ip vrrp 1 enable


Host A
205.1.1.1/24 201.1.1.1/24
Master Critical IP Address
ethernet 2/3 ip vrrp 1 priority 250

RS2 goes into backup mode, and starts


Internet
the Advertisement_Down_Timer after
Routing Routing Router R
Host B
Switch 2 Switch 4 207.1.1.1/24 the initialization mode, because it does
205.1.1.2/24
Backup not own the virtual router's IP address.
It is a backup for the virtual router's
IP address, 205.1.1.1/24. The
Host C Routing Routing
Switch 3 Switch 5 Advertisement_Interval is the same as
205.1.1.3/24
Backup RS1. It is very important that it matches
the advertisement_interval for reasons
mentioned earlier. The priority is 250.
The goal here is that the priority of RS2
should be higher than RS3, so that if RS1
goes down, RS2 takes over as the master.
There is no critical IP address defined
here, because there are two routing

10 Virtual Router Redundancy Protocol (VRRP) White Paper


switches that can take traffic from RS2 to the rest act as backups. The process of References
R. If the one preferred out of the two goes deciding who will be the master involves 1. RFC 2338
down, routing can still be done through three stages – initialize, backup and master.
2. Internetworking with TCP/IP Vol. 1;
the other one. In the initialize stage, VRRP routers
Douglas E. Comer, 3rd Edition
The configuration for RS3 is as follows, compare the virtual router's IP address to
assuming that the ethernet interface that their interface's IP addresses. If one of
them owns the virtual router's IP address,
Acronym Glossary
is being configured for VRRP is 1/3: ARP Address Resolution Protocol
it declares itself to be the master and
ethernet 1/3 ip vrrp 1 address 205.1.1.1/24 CLI Command Line Interface
assumes a priority of 255. After the rest
IANA Internet Assigned Number
ethernet 1/3 ip vrrp 1 adver-int 3 of the routing switches receive this
Authority
ethernet 1/3 ip vrrp 1 enable advertisement, they go in the backup IP Internet Protocol
state and start the Advertisement_ LAN Local Area Network
ethernet 1/3 ip vrrp 1 priority 210
Down_Timer. If no one owns the virtual MAC Media Access Control
ethernet 1/1 ip vrrp 1 critical-ip 209.1.1.1/24 router's IP address, then they all go into TTL Time to Live
Here, we should notice that the priority of the second stage (which is the backup VERS Version
this interface is lower than the priority of stage), and start the Advertisement_ VRID Virtual Router Identifier
RS2. Therefore, if RS1 goes down, RS2 is Down_Timer. If the timer times out, all VRRP Virtual Router Redundancy
the new master. If we had left the priority of them declare themselves as the master, Protocol
configuration set to the default (which and send advertisements with their priority
is 100), then the new master would be (priority 255 is only used by the router
RS3, because the IP address of the VRRP who owns the virtual IP address). If there
interface for VRID 1 of RS3 is greater is more than one backup routing switch,
than the IP address of the VRRP interface they receive advertisements from each
for VRID 1 of RS2. We have also defined other, and compare with their own
a critical IP address of 209.1.1.1/24. If information. The routing switch with
this interface is down, RS3 does not the highest priority becomes the master,
declare itself as a master. and the rest step down and go back to
the backup stage. If the priorities are the
Summary same, then the owner of the highest IP
This paper examined what VRRP is and address wins. If the owner of the address
how it works. It is a protocol that provides comes up, it sends out an advertisement
backup for routing switches connecting with priority = 255. The virtual master
a LAN to the outside world (assuming steps down, and the owner of the address
there is more than one routing switch becomes master.
working in the same context). One To route traffic through the master, the
routing switch becomes the master and hosts ARP for the MAC address of their
default gateway, which is also the virtual
router's IP address. The virtual master
replies with the virtual MAC address,
instead of its own physical address. This
way, when the original master goes down,
the new master routing switch becomes
the owner of the virtual MAC address.
Thus, the host can still send traffic to the
virtual router's MAC address and no
change has to be made on the host.

Virtual Router Redundancy Protocol (VRRP) White Paper 11


For more sales and product information, please call 1-800-822-9638.

United States Asia Pacific


Nortel Networks Nortel Networks
4401 Great America Parkway 151 Lorong Chuan
Santa Clara, CA 95054 #02-01 New Tech Park
1-800-822-9638 Singapore 556741
Canada 65-287-2877
Nortel Networks Caribbean and Latin America
8200 Dixie Road Nortel Networks
Brampton, Ontario 1500 Concord Terrace
L6T 5P6, Canada Sunrise, Florida
1-800-466-7835 33323-2815 U.S.A.
Europe, Middle East, and Africa 954-851-8000
Nortel Networks
Les Cyclades - Immeuble Naxos
25 Allée Pierre Ziller
06560 Valbonne France
33-4-92-96-69-66

http:// www.nortelnetworks.com
*Nortel Networks, the Nortel Networks logo, the Globemark, How the World Shares Ideas, Unified Networks,
and Passport are trademarks of Nortel Networks. All other trademarks are the property of their owners.
© 2000 Nortel Networks. All rights reserved. Information in this document is subject to change without notice.
Nortel Networks assumes no responsibility for any errors that may appear in this document. Printed in USA.

WP3340-B / 04-00

Vous aimerez peut-être aussi