Contents
- Implementing VRRP
- Prerequisites for Implementing VRRP on Cisco IOS XR Software
- Restrictions for Implementing VRRP on Cisco IOS XR Software
- Information About Implementing VRRP
- VRRP Overview
- Multiple Virtual Router Support
- VRRP Router Priority
- VRRP Advertisements
- Benefits of VRRP
- How to Implement VRRP on Cisco IOS XR Software
- Customizing VRRP
- Enabling VRRP
- Verifying VRRP
- Clearing VRRP Statistics
- BFD for VRRP
- Advantages of BFD
- BFD Process
- Configuring BFD
- Enabling Bidirectional Forward Detection
- Modifying BFD timers (minimum interval)
- Modifying BFD timers (multiplier)
- MIB support for VRRP
- Configuring SNMP server notifications for VRRP events
- Hot Restartability for VRRP
- Configuration Examples for VRRP Implementation on Cisco IOS XR Software
- Configuring a VRRP Group: Example
- Clearing VRRP Statistics: Example
- Additional References
Implementing VRRP
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
- Prerequisites for Implementing VRRP on Cisco IOS XR Software
- Restrictions for Implementing VRRP on Cisco IOS XR Software
- Information About Implementing VRRP
- How to Implement VRRP on Cisco IOS XR Software
- BFD for VRRP
- MIB support for VRRP
- Hot Restartability for VRRP
- Configuration Examples for VRRP Implementation on Cisco IOS XR Software
- Additional References
Prerequisites for Implementing VRRP on Cisco IOS XR Software
You must be in a user group associated with a task group that includes the proper task IDs. The command reference guides include the task IDs required for each command. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Information About Implementing VRRP
To implement VRRP on Cisco IOS XR software , you need to understand the following concepts:
- VRRP Overview
- Multiple Virtual Router Support
- VRRP Router Priority
- VRRP Advertisements
- Benefits of VRRP
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 ARP—The 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 protocol—The 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) client—The 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 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 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).
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.
Multiple Virtual Router Support
You can configure up to 255 virtual routers on a router physical interface. The actual number of virtual routers that a router interface can support depends on the following factors:
Router processing capability
Router memory capability
Router interface support of multiple MAC addresses
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 Router Priority
An important aspect of the VRRP redundancy scheme is VRRP router priority. Priority determines the role that each VRRP router plays and what happens if the master virtual router fails.
If a VRRP router owns the IP address of the virtual router and the IP address of the physical interface, this router functions as a master virtual router.
Priority also determines if a VRRP router functions as a backup virtual router and determines the order of ascendancy to becoming a master virtual router if the master virtual router fails. You can configure the priority of each backup virtual router with a value of 1 through 254, using the vrrp priority command.
For example, if Router A, the master virtual router in a LAN topology, fails, an election process takes place to determine if backup virtual Routers B or C should take over. If Routers B and C are configured with the priorities of 101 and 100, respectively, Router B is elected to become master virtual router because it has the higher priority. If Routers B and C are both configured with the priority of 100, the backup virtual router with the higher IP address is elected to become the master virtual router.
By default, a preemptive scheme is enabled whereby a higher-priority backup virtual router that becomes available takes over for the backup virtual router that was elected to become master virtual router. You can disable this preemptive scheme using the no vrrp preempt command. If preemption is disabled, the backup virtual router that is elected to become master virtual router remains the master until the original master virtual router recovers and becomes master again.
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 Sharing—You 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 Routers—VRRP 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 Addresses—The 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.
Preemption—The 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 Authentication—You can ensure that VRRP messages received from VRRP routers that comprise a virtual router are authenticated by configuring a simple text password.
Advertisement Protocol—VRRP 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.
How to Implement VRRP on Cisco IOS XR Software
This section contains instructions for the following tasks:
Customizing VRRP
SUMMARY STEPSCustomizing 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.
3. interface type interface-path-id
4. vrrp vrid text-authentication
5. vrrp vrid assume-ownership {disable}
6. vrrp vrid priority priority
7. vrrp vrid preempt [delay seconds] [disable]
8. vrrp vrid timer [msec] interval [force]
9. vrrp vrid track interface type instance interface-path-id [priority-decrement]
10. vrrp delay [minimum seconds] [ reload seconds]
11. Use one of the following commands:
DETAILED STEPSEnabling VRRP
SUMMARY STEPS3. interface type interface-path-id
4. vrrp vrid ipv4 ip-address [secondary]
5. Use one of the following commands:
DETAILED STEPS
Command or Action Purpose Step 1 configure
Example:RP/0/RP0/CPU0:router# configure
Enters global configuration mode.
Step 2 router vrrp
Example:RP/0/RP0/CPU0:router(config)# router vrrp
Enables VRRP configuration mode.
Step 3 interface type interface-path-id
Example:RP/0/RP0/CPU0:router(config-vrrp)# interface TenGigE 0/2/0/1 RP/0/RP0/CPU0:router(config-vrrp-if)#Enables VRRP interface configuration mode on a specific interface.
Step 4 vrrp vrid ipv4 ip-address [secondary]
Example:RP/0/RP0/CPU0:router(config-vrrp-if)# vrrp 1 ipv4 10.1.0.100
Enables the Virtual Router Redundancy Protocol (VRRP) on an interface and specifies the IP address of the virtual router.
Enter the vrrp ipv4 command once without the secondary keyword to indicate the virtual router IP address. If you want to indicate additional IP addresses supported by the virtual router, include the secondary keyword.
We recommend that you do not remove the VRRP configuration from the IP address owner and leave the IP address of the interface active, because duplicate IP addresses on the LAN will result.
To disable VRRP on the interface and remove the IP address of the virtual router, use the no vrrp vrid ipv4 command.
Step 5 Use one of the following commands:
Example:RP/0/RP0/CPU0:router(config)# end
or
RP/0/RP0/CPU0:router(config)# commit
Saves configuration changes.
When you issue the end command, the system prompts you to commit changes:
Uncommitted changes found, commit them before exiting(yes/no/cancel)? [cancel]:
Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.
Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.
Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.
Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
Verifying VRRP
SUMMARY STEPS1. show vrrp [ interface type instance interface-path-id [vrid]] [brief | detail | statistics [all]]
DETAILED STEPS
Command or Action Purpose Step 1 show vrrp [ interface type instance interface-path-id [vrid]] [brief | detail | statistics [all]]
Example:RP/0/RP0/CPU0:router # show vrrp
Displays a brief or detailed status of one or all Virtual Router Redundancy Protocol (VRRP) virtual routers.
Clearing VRRP Statistics
SUMMARY STEPSUse the clear vrrp statistics command to clear all the software counters for the specified virtual router.
1. clear vrrp statistics [interfacetype interface-path-id [vrid]]
DETAILED STEPS
Command or Action Purpose Step 1 clear vrrp statistics [interfacetype interface-path-id [vrid]]
Example:RP/0/RP0/CPU0:router# clear vrrp statistics
Clears all software counters for the specified virtual router.
BFD for VRRP
Bidirectional Forwarding Detection (BFD) is a network protocol used to detect faults between two forwarding engines. BFD sessions can operate in one of the two modes, namely, asynchronous mode or demand mode. In asynchronous mode, both endpoints periodically send hello packets to each other. If a number of those packets are not received, the session is considered down. In demand mode, it is not mandatory to exchange hello packets; either of the hosts can send hello messages, if needed. Cisco supports the BFD asynchronous mode.
Advantages of BFD
BFD provides failure detection in less than one second.
BFD supports all types of encapsulation.
BFD is not tied to any particular routing protocol, supports almost all routing protocols.
BFD Process
VRRP uses BFD to detect link failure and facilitate fast failover times without excessive control packet overhead.
The VRRP process creates BFD sessions as required. When a BFD session goes down, each backup group monitoring the session transitions to Master state.
VRRP does not participate in any state elections for 10 seconds after a transition to Master state triggered by a BFD session going down.
Configuring BFD
For VRRP, configuration is applied under the existing VRRP-interface sub-mode, with BFD fast failure configurable per VRRP vrouter and the timers (minimum-interface and multiplier) configurable per interface. BFD fast failure detection is disabled by default.
- Enabling Bidirectional Forward Detection
- Modifying BFD timers (minimum interval)
- Modifying BFD timers (multiplier)
Enabling Bidirectional Forward Detection
SUMMARY STEPS3. interface type interface-path-id
4. vrrp vrid { }bfd fast-detect peer {ipv4 } address
5. Use one of the following commands:
DETAILED STEPS
Command or Action Purpose Step 1 configure
Example:RP/0/RP0/CPU0:router# configure
Enters global configuration mode.
Step 2 router vrrp
Example:RP/0/RP0/CPU0:router(config)# router vrrp
Enables the VRRP configuration mode.
Step 3 interface type interface-path-id
Example:RP/0/RP0/CPU0:router(config-vrrp)# interface TenGigE 0/2/0/1
Enables the VRRP interface configuration mode on a specific interface.
Step 4 vrrp vrid { }bfd fast-detect peer {ipv4 } address
Example:RP/0/RP0/CPU0:router(config-vrrp-if)# vrrp 100 version 3 bfd fast-detect peer ipv4 10.1.1.1
Enables BFD fast detection on the VRRP interface.
Note BFD is suitable only for a two-router redundant system.
Step 5 Use one of the following commands:
Example:RP/0/RP0/CPU0:router(config)# end
or
RP/0/RP0/CPU0:router(config)# commit
Saves configuration changes.
When you issue the end command, the system prompts you to commit changes:
Uncommitted changes found, commit them before exiting(yes/no/cancel)? [cancel]:
Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.
Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.
Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.
Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
Modifying BFD timers (minimum interval)
SUMMARY STEPSMinimum interval determines the frequency of sending BFD packets to BFD peers (in milliseconds). The default minimum interval is 15ms.
3. interface type interface-path-id
4. vrrp bfd minimum-interval interval
5. Use one of the following commands:
DETAILED STEPS
Command or Action Purpose Step 1 configure
Example:RP/0/RP0/CPU0:router# configure
Enters global configuration mode.
Step 2 router vrrp
Example:RP/0/RP0/CPU0:router(config)# router vrrp
Enables VRRP configuration mode.
Step 3 interface type interface-path-id
Example:RP/0/RP0/CPU0:router(config-vrrp)# interface TenGigE 0/2/0/1
Enables VRRP interface configuration mode on a specific interface.
Step 4 vrrp bfd minimum-interval interval
Example:RP/0/RP0/CPU0:router(config-vrrp-if)# vrrp bfd minimum-interval
Sets the minimum interval to the specified period. The interval is in milliseconds; range is 15 to 30000 milliseconds.
Step 5 Use one of the following commands:
Example:RP/0/RP0/CPU0:router(config)# end
or
RP/0/RP0/CPU0:router(config)# commit
Saves configuration changes.
When you issue the end command, the system prompts you to commit changes:
Uncommitted changes found, commit them before exiting(yes/no/cancel)? [cancel]:
Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.
Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.
Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.
Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
Modifying BFD timers (multiplier)
SUMMARY STEPSMultiplier is the number of consecutive BFD packets which must be missed from a BFD peer before declaring that peer unavailable. The default multiplier is 3.
3. interface type interface-path-id
4. vrrp bfd multiplier multiplier
5. Use one of the following commands:
DETAILED STEPS
Command or Action Purpose Step 1 configure
Example:RP/0/RP0/CPU0:router# configure
Enters global configuration mode.
Step 2 router vrrp
Example:RP/0/RP0/CPU0:router(config)# router vrrp
Enables VRRP configuration mode.
Step 3 interface type interface-path-id
Example:RP/0/RP0/CPU0:router(config-vrrp)# interface TenGigE 0/2/0/1
Enables VRRP interface configuration mode on a specific interface.
Step 4 vrrp bfd multiplier multiplier
Example:RP/0/RP0/CPU0:router(config-vrrp-if)# vrrp bfd multiplier
Sets the multiplier to the value. Range is 2 to 50.
Step 5 Use one of the following commands:
Example:RP/0/RP0/CPU0:router(config)# end
or
RP/0/RP0/CPU0:router(config)# commit
Saves configuration changes.
When you issue the end command, the system prompts you to commit changes:
Uncommitted changes found, commit them before exiting(yes/no/cancel)? [cancel]:
Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.
Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.
Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.
Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
MIB support for VRRP
VRRP enables one or more IP addresses to be assumed by a router when a failure occurs. For example, when IP traffic from a host reaches a failed router because the failed router is the default gateway, the traffic is transparently forwarded by the VRRP router that has assumed control. VRRP does not require configuration of dynamic routing or router discovery protocols on every end host. The VRRP router controlling the IP address(es) associated with a virtual router is called the master, and forwards packets sent to these IP addresses. The election process provides dynamic fail over(standby) in the forwarding responsibility should the master become unavailable. This allows any of the virtual router IP addresses on the LAN to be used as the default first hop router by end-hosts.The advantage gained from using VRRP is a higher availability default path without requiring configuration of dynamic routing or router discovery protocols on every end-host. SNMP traps provide information of the state changes, when the virtual routers(in standby) are moved to master state or if the standby router is made master.
Configuring SNMP server notifications for VRRP events
SUMMARY STEPSThe snmp-server traps vrrp events command enables the Simple Network Management Protocol (SNMP) server notifications (traps) for VRRP.
2. snmp-server traps vrrp events
3. Use one of the following commands:
DETAILED STEPS
Command or Action Purpose Step 1 configure
Example:RP/0/RP0/CPU0:router# configure
Enters global configuration mode.
Step 2 snmp-server traps vrrp events
Example:RP/0/RP0/CPU0:router(config)snmp-server traps vrrp events
Enables the SNMP server notifications for VRRP.
Step 3 Use one of the following commands:
Example:RP/0/RP0/CPU0:router(config)# end
or
RP/0/RP0/CPU0:router(config)# commit
Saves configuration changes.
When you issue the end command, the system prompts you to commit changes:
Uncommitted changes found, commit them before exiting(yes/no/cancel)? [cancel]:
Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.
Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.
Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.
Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
Hot Restartability for VRRP
In the event of failure of a VRRP process in one group, forced failovers in peer VRRP master router groups should be prevented. Hot restartability supports warm RP failover without incurring forced failovers to peer VRRP routers.
Configuration Examples for VRRP Implementation on Cisco IOS XR Software
Configuring a VRRP Group: Example
This section provides the following configuration example of Router A and Router B, each belonging to three VRRP groups:
Router A:
config interface tenGigE 0/4/0/4 ipv4 address 10.1.0.1/24 exit router vrrp interface tenGigE 0/4/0/4 vrrp 1 priority 120 vrrp 1 text-authentication cisco vrrp 1 timer 3 vrrp 1 ipv4 10.0.0.100 vrrp 5 timer 30 vrrp 5 ipv4 10.0.0.105 vrrp 5 preempt disable vrrp 100 ipv4 10.0.0.200 commitRouter B:
config interface tenGigE 0/4/0/4 ipv4 address 10.1.0.2/24 exit router vrrp interface tenGigE 0/4/0/4 vrrp 1 priority 100 vrrp 1 text-authentication cisco vrrp 1 timer 3 vrrp 1 ipv4 10.0.0.100 vrrp 5 priority 200 vrrp 5 timer 30 vrrp 5 ipv4 10.0.0.105 vrrp 5 preempt disable vrrp 100 ipv4 10.0.0.200 commitIn the configuration example, each group has the following properties:
Clearing VRRP Statistics: Example
The clear vrrp statistics command produces no output of its own. The command modifies the statistics given by show vrrp statistics command so that all the statistics are reset to zero.
The following section provides examples of the output of the show vrrp statistics command followed by the clear vrrp statistics command:
Additional References
Related Documents
Related Topic
Document Title
QoS commands: complete command syntax, command modes, command history, defaults, usage guidelines, and examples
Quality of Service Commands on Cisco IOS XR Modular Quality of Service Command Reference for the Cisco CRS Router
Class-based traffic shaping, traffic policing, low-latency queuing, and Modified Deficit Round Robin (MDRR)
Configuring Modular Quality of Service Congestion Management on Cisco IOS XR Modular Quality of Service Configuration Guide for the Cisco CRS Router
WRED, RED, and tail drop
Configuring Modular QoS Congestion Avoidance on Cisco IOS XR Modular Quality of Service Configuration Guide for the Cisco CRS Router
VRRP commands
VRRP Commands on Cisco IOS XR IP Addresses and Services Command Reference for the Cisco CRS Router
master command reference
Cisco IOS XR Commands Master List for the Cisco CRS Router
getting started material
Cisco IOS XR Getting Started Guide for the Cisco CRS Router
Information about user groups and task IDs
Configuring AAA Services on Cisco IOS XR System Security Configuration Guide for the Cisco CRS Router
MIBs
MIBs
MIBs Link
— To locate and download MIBs, use the Cisco MIB Locator found at the following URL and choose a platform under the Cisco Access Products menu: http://cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml