Feature History For Implementing VRRP Modification Release
Feature History For Implementing VRRP Modification Release
The Virtual Router Redundancy Protocol (VRRP) feature allows for transparent failover at the first-hop IP
router, enabling a group of routers to form a single virtual router.
Feature History for Implementing VRRP
Release
Modification
Release 2.0
Release 3.4.0
Release 3.5.0
Release 3.7.0
Release 3.9.0
Release 4.1.0
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
Implementing VRRP
Prerequisites for Implementing VRRP on Cisco IOS XR Software
VRRP Overview
A LAN client can use a dynamic process or static configuration to determine which router should be the first
hop to a particular remote destination. The client examples of dynamic router discovery are as follows:
Proxy ARPThe client uses Address Resolution Protocol (ARP) to get the destination it wants to reach,
and a router responds to the ARP request with its own MAC address.
Routing protocolThe client listens to dynamic routing protocol updates (for example, from Routing
Information Protocol [RIP]) and forms its own routing table.
IRDP (ICMP Router Discovery Protocol) clientThe client runs an Internet Control Message Protocol
(ICMP) router discovery client.
The drawback to dynamic discovery protocols is that they incur some configuration and processing overhead
on the LAN client. Also, in the event of a router failure, the process of switching to another router can be
slow.
An alternative to dynamic discovery protocols is to statically configure a default router on the client. This
approach simplifies client configuration and processing, but creates a single point of failure. If the default
gateway fails, the LAN client is limited to communicating only on the local IP network segment and is cut
off from the rest of the network.
The Virtual Router Redundancy Protocol (VRRP) feature can solve the static configuration problem. VRRP
is an IP routing redundancy protocol designed to allow for transparent failover at the first-hop IP router. VRRP
enables a group of routers to form a single virtual router . The LAN clients can then be configured with the
virtual router as their default gateway. The virtual router, representing a group of routers, is also known as a
VRRP group.
For example, Figure 1: Basic VRRP Topology, on page 3 shows a LAN topology in which VRRP is
configured. In this example, Routers A, B, and C are VRRP routers (routers running VRRP) that compose a
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
2
OL-26066-04
Implementing VRRP
Multiple Virtual Router Support
virtual router. The IP address of the virtual router is the same as that configured for the interface of Router A
(10.0.0.1).
Figure 1: Basic VRRP Topology
Because the virtual router uses the IP address of the physical interface of Router A, Router A assumes the
role of the master virtual router and is also known as the IP address owner. As the master virtual router,
Router A controls the IP address of the virtual router and is responsible for forwarding packets sent to this IP
address. Clients 1 through 3 are configured with the default gateway IP address of 10.0.0.1.
Routers B and C function as backup virtual routers. If the master virtual router fails, the router configured
with the higher priority becomes the master virtual router and provides uninterrupted service for the LAN
hosts. When Router A recovers, it becomes the master virtual router again.
Note
We recommend that you disable Spanning Tree Protocol (STP) on switch ports to which the virtual routers
are connected. Enable RSTP or rapid-PVST on the switch interfaces if the switch supports these protocols.
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
Implementing VRRP
VRRP Router Priority
In a topology where multiple virtual routers are configured on a router interface, the interface can act as a
master for one or more virtual routers and as a backup for one or more virtual routers.
VRRP Advertisements
The master virtual router sends VRRP advertisements to other VRRP routers in the same group. The
advertisements communicate the priority and state of the master virtual router. The VRRP advertisements are
encapsulated in IP packets and sent to the IP Version 4 multicast address assigned to the VRRP group. The
advertisements are sent every second by default; the interval is configurable.
Benefits of VRRP
The benefits of VRRP are as follows:
Redundancy VRRP enables you to configure multiple routers as the default gateway router, which
reduces the possibility of a single point of failure in a network.
Load SharingYou can configure VRRP in such a way that traffic to and from LAN clients can be
shared by multiple routers, thereby sharing the traffic load more equitably among available routers.
Multiple Virtual RoutersVRRP supports up to 255 virtual routers (VRRP groups) on a router physical
interface, subject to the platform supporting multiple MAC addresses. Multiple virtual router support
enables you to implement redundancy and load sharing in your LAN topology.
Multiple IP AddressesThe virtual router can manage multiple IP addresses, including secondary IP
addresses. Therefore, if you have multiple subnets configured on an Ethernet interface, you can configure
VRRP on each subnet.
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
4
OL-26066-04
Implementing VRRP
How to Implement VRRP on Cisco IOS XR Software
PreemptionThe redundancy scheme of VRRP enables you to preempt a backup virtual router that has
taken over for a failing master virtual router with a higher-priority backup virtual router that has become
available.
Text AuthenticationYou can ensure that VRRP messages received from VRRP routers that comprise
a virtual router are authenticated by configuring a simple text password.
Advertisement ProtocolVRRP uses a dedicated Internet Assigned Numbers Authority (IANA) standard
multicast address (224.0.0.18) for VRRP advertisements. This addressing scheme minimizes the number
of routers that must service the multicasts and allows test equipment to accurately identify VRRP packets
on a segment. The IANA assigns VRRP the IP protocol number 112.
Note
The VRRP virtual router id (vrid) has to be different for different sub-interfaces, for a given physical
interface.
Customizing VRRP
Customizing the behavior of VRRP is optional. Be aware that as soon as you enable a VRRP group, that group
is operating. It is possible that if you first enable a VRRP group before customizing VRRP, the router could
take over control of the group and become the master virtual router before you have finished customizing the
feature. Therefore, if you plan to customize VRRP, it is a good idea to do so before enabling VRRP.
The sections that follow describe how to customize your VRRP configuration.
SUMMARY STEPS
1. configure
2. router vrrp
3. interface type interface-path-id
4. address-family {ipv4 | ipv6}
5. vrrp vrid version { 2 | 3 }
6. text-authentication
7. accept-mode{disable}
8. priority priority
9. preempt [delay seconds] [disable]
10. timer [msec] interval [force]
11. track interface type instance interface-path-id [priority-decrement]
12. delay [minimum seconds] [ reload seconds]
13. Use the commit or end command.
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
Implementing VRRP
Customizing VRRP
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Example:
RP/0/RP0/CPU0:router# configure
Step 2
router vrrp
Example:
RP/0/RP0/CPU0:router(config)# router vrrp
Step 3
Example:
RP/0/RP0/CPU0:router(config-vrrp)# interface
TenGigE 0/2/0/1
Step 4
Example:
RP/0/RP0/CPU0:routerconfig-vrrp-if)#
address-family ipv6
Step 5
Example:
RP/0/RP0/CPU0:router(config-vrrp-virtual-router)#
vrrp 3 version 3
RP/0/RP0/CPU0:router(config-vrrp-virtual-router)#
Step 6
text-authentication
Example:
RP/0/RP0/CPU0:router(config-vrrp-virtual-router)#
text-authentication x30dn78k
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
6
OL-26066-04
Implementing VRRP
Customizing VRRP
Command or Action
Purpose
To disable VRRP authentication, use the no command.
Note
Step 7
accept-mode{disable}
Example:
RP/0/RP0/CPU0:router#
(config-vrrp-virtual-router)# accept-mode disable
Step 8
priority priority
Example:
RP/0/RP0/CPU0:router#
(config-vrrp-virtual-router)# priority 254
Step 9
Example:
RP/0/RP0/CPU0:router#
(config-vrrp-virtual-router)# preempt delay 15
Step 10
RP/0/RP0/CPU0:router#
(config-vrrp-virtual-router)# timer 4
Step 11
Note
Example:
RP/0/RP0/CPU0:router#
(config-vrrp-virtual-router)# track interface
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
Implementing VRRP
Enabling VRRP
Command or Action
TenGigE 0/0/CPU0/1 30
Purpose
A tracked interface is up if IP on that interface is up.
Otherwise, the tracked interface is down.
You can configure VRRP to track an interface that can
alter the priority level of a virtual router for a VRRP
virtual router. When the IP protocol state of an interface
goes down or the interface has been removed from the
router, the priority of the backup virtual router is
decremented by the value specified in the
priority-decrement argument. When the IP protocol state
on the interface returns to the up state, the priority is
restored.
Step 12
Step 13
Enabling VRRP
Use the address command to enable VRRP on an interface, as described in the sections that follow.
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
8
OL-26066-04
Implementing VRRP
Enabling VRRP
SUMMARY STEPS
1. configure
2. router vrrp
3. interface type interface-path-id
4. address-family ipv4
5. vrrp vrid version { 2 | 3 }
6. address address
7. Use the commit or end command.
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Example:
RP/0/RP0/CPU0:router# configure
Step 2
router vrrp
Example:
RP/0/RP0/CPU0:router(config)# router vrrp
Step 3
Example:
RP/0/RP0/CPU0:router(config-vrrp)# interface
TenGigE 0/2/0/1
RP/0/RP0/CPU0:router(config-vrrp-if)#
Step 4
address-family ipv4
Example:
RP/0/RP0/CPU0:routerconfig-vrrp-if)#
address-family ipv4
Step 5
Example:
RP/0/RP0/CPU0:router(config-vrrp-virtual-router)#
vrrp 3 version 3
RP/0/RP0/CPU0:router(config-vrrp-virtual-router)#
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
Implementing VRRP
Verifying VRRP
Step 6
Command or Action
Purpose
address address
Example:
RP/0/RP0/CPU0:router(config-vrrp-virtual-router)#
address 2001:db8::/32
Step 7
Verifying VRRP
Use the show vrrp command to display a brief or detailed status of one or all VRRP virtual routers.
SUMMARY STEPS
1. show vrrp [ ipv4 | ipv6 ] [ interface type instance interface-path-id [vrid]] [brief | detail | statistics [all]]
DETAILED STEPS
Step 1
Command or Action
Purpose
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
10
OL-26066-04
Implementing VRRP
Clearing VRRP Statistics
Command or Action
Purpose
If no interface is specified, all virtual routers are
displayed.
Example:
RP/0/RP0/CPU0:router # show vrrp
SUMMARY STEPS
1. clear vrrp statistics [ ipv4 | ipv6 ] [interfacetype interface-path-id [vrid]]
DETAILED STEPS
Step 1
Command or Action
Purpose
Example:
Configuring accept-mode
Perform this task to disable the installation of routes for the VRRP virtual addresses.
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
11
Implementing VRRP
Configuring accept-mode
SUMMARY STEPS
1. configure
2. router vrrp
3. interface type interface-path-id
4. address-family {ipv4 | ipv6}
5. vrrp vrid version { 2 | 3 }
6. accept-mode disable
7. Use the commit or end command.
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Example:
RP/0/RP0/CPU0:router# configure
Step 2
router vrrp
Example:
RP/0/RP0/CPU0:router(config)# router vrrp
Step 3
Example:
RP/0/RP0/CPU0:router(config-vrrp)# interface
TenGigE 0/2/0/1
RP/0/RP0/CPU0:router
Step 4
Example:
RP/0/RP0/CPU0:routerconfig-vrrp-if)#
address-family ipv6
RP/0/RP0/CPU0:router(config-vrrp-virtual-router)#
Step 5
Example:
RP/0/RP0/CPU0:router(config-vrrp-virtual-router)#
vrrp 3 version 3
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
12
OL-26066-04
Implementing VRRP
Configuring a Global Virtual IPv6 Address
Command or Action
Purpose
RP/0/RP0/CPU0:router(config-vrrp-virtual-router)#
Step 6
accept-mode disable
Example:
RP/0/RP0/CPU0:router(config-vrrp-virtual-router)#
accept-mode disable
Step 7
SUMMARY STEPS
1. configure
2. router vrrp
3. interface type interface-path-id
4. address-family ipv6
5. vrrp vrid version 3
6. address global address
7. Use the commit or end command.
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
13
Implementing VRRP
Configuring a Global Virtual IPv6 Address
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Example:
RP/0/RP0/CPU0:router# configure
Step 2
router vrrp
Example:
RP/0/RP0/CPU0:router(config)# router vrrp
Step 3
Example:
RP/0/RP0/CPU0:router(config-vrrp)# interface
TenGigE 0/2/0/1
Step 4
address-family ipv6
Example:
RP/0/RP0/CPU0:routerconfig-vrrp-if)#
address-family ipv6
Step 5
Example:
RP/0/RP0/CPU0:router(config-vrrp-address-family)#
vrrp 3 version 3
Step 6
Example:
RP/0/RP0/CPU0:routerconfig-vrrp-virtual-router)#
address global 2001:db8::/32
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
14
OL-26066-04
Implementing VRRP
Configuring a Primary Virtual IPv4 Address
Step 7
Command or Action
Purpose
SUMMARY STEPS
1. configure
2. router vrrp
3. interface type interface-path-id
4. address-family ipv4
5. vrrp vrid version { 2 | 3 }
6. address address
7. Use the commit or end command.
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Example:
RP/0/RP0/CPU0:router# configure
Step 2
router vrrp
Example:
RP/0/RP0/CPU0:router(config)# router vrrp
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
15
Implementing VRRP
Configuring a Primary Virtual IPv4 Address
Step 3
Command or Action
Purpose
Example:
RP/0/RP0/CPU0:router(config-vrrp)# interface
TenGigE 0/2/0/1
RP/0/RP0/CPU0:router
Step 4
address-family ipv4
Example:
RP/0/RP0/CPU0:routerconfig-vrrp-if)#
address-family ipv4
RP/0/RP0/CPU0:router(config-vrrp-address-family)#
Step 5
Example:
RP/0/RP0/CPU0:router(config-vrrp-address-family)#
vrrp 3 version 2
RP/0/RP0/CPU0:router(config-vrrp-virtual-router)
Step 6
address address
Example:
RP/0/RP0/CPU0:router(config-vrrp-virtual-router)#
address 10.20.30.1
Step 7
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
16
OL-26066-04
Implementing VRRP
Configuring a Secondary Virtual IPv4 Address
SUMMARY STEPS
1. configure
2. router vrrp
3. interface type interface-path-id
4. address-family ipv4
5. vrrp vrid version { 2 | 3 }
6. address address secondary
7. Use the commit or end command.
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Example:
RP/0/RP0/CPU0:router# configure
Step 2
router vrrp
Example:
RP/0/RP0/CPU0:router(config)# router vrrp
Step 3
Example:
RP/0/RP0/CPU0:router(config-vrrp)# interface
TenGigE 0/2/0/1
RP/0/RP0/CPU0:router
Step 4
address-family ipv4
Example:
RP/0/RP0/CPU0:routerconfig-vrrp-if)#
address-family ipv4
RP/0/RP0/CPU0:router(config-vrrp-virtual-router)#
Step 5
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
17
Implementing VRRP
Configuring a Virtual Link-Local IPv6 Address
Command or Action
Purpose
Note
Example:
RP/0/RP0/CPU0:router(config-vrrp-virtual-router)#
vrrp 3 version 3
RP/0/RP0/CPU0:router(config-vrrp-virtual-router)#
Step 6
Example:
RP/0/RP0/CPU0:router(config-vrrp-virtual-router)#
address 10.20.30.1 secondary
Step 7
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
18
OL-26066-04
Implementing VRRP
Configuring a Virtual Link-Local IPv6 Address
address, except that its virtual IP (VIP) state is always considered to be up, since duplicate address detection
is not required for addresses whose scope is local.
SUMMARY STEPS
1. configure
2. router vrrp
3. interface type interface-path-id
4. address-family ipv6
5. vrrp vrid version 3 address linklocal {address | autoconfigure}
6. Use the commit or end command.
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Example:
RP/0/RP0/CPU0:router# configure
Step 2
router vrrp
Example:
RP/0/RP0/CPU0:router(config)# router vrrp
Step 3
Example:
RP/0/RP0/CPU0:router(config-vrrp)# interface
TenGigE 0/2/0/1
Step 4
address-family ipv6
Example:
RP/0/RP0/CPU0:routerconfig-vrrp-if)#
address-family ipv6
Step 5
Example:
RP/0/RP0/CPU0:routerconfig-vrrp-address-family)#
vrrp 1 version 3 address linklocal
FE80::260:3EFF:FE11:6770
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
19
Implementing VRRP
Disabling State Change Logging
Command or Action
Purpose
RP/0/RP0/CPU0:router(config-vrrp-virtual-router)# Note
RP/0/RP0/CPU0:router(config-vrrp-address-family)#
vrrp 1 version 3 address linklocal autoconfigure
RP/0/RP0/CPU0:router(config-vrrp-virtual-router)#
Step 6
SUMMARY STEPS
1. configure
2. router vrrp
3. message state disable
4. Use the commit or end command.
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Example:
RP/0/RP0/CPU0:router# configure
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
20
OL-26066-04
Implementing VRRP
MIB support for VRRP
Step 2
Command or Action
Purpose
router vrrp
Example:
RP/0/RP0/CPU0:router(config)# router vrrp
Step 3
Disables the task of logging the VRRP state change events via syslog.
Example:
RP/0/RP0/CPU0:router(config-vrrp)#
message state disable
RP/0/RP0/CPU0:router(config-vrrp)#
Step 4
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
21
Implementing VRRP
Configuring SNMP server notifications for VRRP events
SUMMARY STEPS
1. configure
2. snmp-server traps vrrp events
3. Use the commit or end command.
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Example:
RP/0/RP0/CPU0:router# configure
Step 2
Example:
RP/0/RP0/CPU0:router(config)snmp-server
traps vrrp events
Step 3
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
22
OL-26066-04
Implementing VRRP
Configuration Examples for VRRP Implementation on Cisco IOS XR Software
Router B:
config
interface tenGigE 0/4/0/4
ipv4 address 10.1.0.2/24
exit
router vrrp
interface tenGigE 0/4/0/4
address-family ipv4
vrrp 1 version 2
priority 100
text-authentication cisco
timer 3
address 10.0.0.100
vrrp 5 version 2
priority 200
timer 30
address 10.0.0.105
vrrp 5 version 2
preempt disable
address 10.0.0.200
commit
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
23
Implementing VRRP
Clearing VRRP Statistics: Example
Additional References
The following sections provide references related to VRRP.
Related Documents
Related Topic
Document Title
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
24
OL-26066-04
Implementing VRRP
Additional References
Related Topic
Document Title
VRRP commands
Standards
Standards
Title
MIBs
MIBs
MIBs Link
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
25
Implementing VRRP
Additional References
RFCs
RFCs
Title
Technical Assistance
Description
Link
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
26
OL-26066-04