Information About VRRP
VRRP Operation
There are several ways a LAN client can determine which router should be the first hop to a particular remote destination. The client can use a dynamic process or static configuration. 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 dynamic discovery protocols incur some configuration and processing overhead on the LAN client. This could be detrimental 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 detached from the rest of the network.
VRRP can solve the static configuration problem. 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.
VRRP is supported on Ethernet, Fast Ethernet, BVI, and Gigabit Ethernet interfaces, on MPLS VPNs, VRF-aware MPLS VPNs and VLANs.
Figure 44-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 comprise a virtual router. The IP address of the virtual router is the same as that configured for the Ethernet interface of Router A (10.0.0.1).
Figure 44-1 Basic VRRP Topology
Because the virtual router uses the IP address of the physical Ethernet interface of Router A, Router A assumes the role of the virtual router master and is also known as the IP address owner. As the virtual router master, 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 virtual router backups. If the master virtual router fails, the router configured with the higher priority will become the virtual router master and provide uninterrupted service for the LAN hosts. When Router A recovers, it becomes the virtual router master again. For more detail on the roles that VRRP routers play and what happens if the virtual router master fails, see the “VRRP Router Priority and Preemption” section later in this document.
Figure 44-2 shows a LAN topology in which VRRP is configured so that Routers A and B share the traffic to and from clients 1 through 4 and that Routers A and B act as virtual router backups to each other if either router fails.
Figure 44-2 Load Sharing and Redundancy VRRP Topology
In this topology, two virtual routers are configured. (For more information, see the “Multiple Virtual Router Support” section later in this document.) For virtual router 1, Router A is the owner of IP address 10.0.0.1 and virtual router master, and Router B is the virtual router backup to Router A. Clients 1 and 2 are configured with the default gateway IP address of 10.0.0.1.
For virtual router 2, Router B is the owner of IP address 10.0.0.2 and virtual router master, and Router A is the virtual router backup to Router B. Clients 3 and 4 are configured with the default gateway IP address of 10.0.0.2.
Benefits of VRRP
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 virtual router backup that has taken over for a failing virtual router master with a higher priority virtual router backup that has become available.
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 assigned VRRP the IP protocol number 112.
VRRP Object Tracking
VRRP object tracking provides a way to ensure the best VRRP router is virtual router master for the group by altering VRRP priorities to the status of tracked objects such as interface or IP route states.
Multiple Virtual Router Support
You can configure up to 255 virtual routers on a 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 virtual router and as a backup for one or more virtual routers.
VRRP Router Priority and Preemption
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 virtual router master fails.
If a VRRP router owns the IP address of the virtual router and the IP address of the physical interface, this router will function as a virtual router master.
Priority also determines if a VRRP router functions as a virtual router backup and the order of ascendancy to becoming a virtual router master if the virtual router master fails. You can configure the priority of each virtual router backup with a value of 1 through 254 using the vrrp priority command.
For example, if Router A, the virtual router master in a LAN topology, fails, an election process takes place to determine if virtual router backups 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 virtual router master because it has the higher priority. If Routers B and C are both configured with the priority of 100, the virtual router backup with the higher IP address is elected to become the virtual router master.
By default, a preemptive scheme is enabled whereby a higher priority virtual router backup that becomes available takes over for the virtual router backup that was elected to become virtual router master. You can disable this preemptive scheme using the no vrrp preempt command. If preemption is disabled, the virtual router backup that is elected to become virtual router master remains the master until the original virtual router master recovers and becomes master again.
VRRP Advertisements
The virtual router master sends VRRP advertisements to other VRRP routers in the same group. The advertisements communicate the priority and state of the virtual router master. The VRRP advertisements are encapsulated in IP packets and sent to the IPv4 multicast address assigned to the VRRP group. The advertisements are sent every second by default; the interval is configurable.
Although the VRRP protocol as per RFC 3768 does not support millisecond timers, Cisco routers allow you to configure millisecond timers. You need to manually configure the millisecond timer values on both the primary and the backup routers. The master advertisement value displayed in the show vrrp command output on the backup routers is always 1 second because the packets on the backup routers do not accept millisecond values.
You must use millisecond timers where absolutely necessary and with careful consideration and testing. Millisecond values work only under favorable circumstances, and you must be aware that the use of the millisecond timer values restricts VRRP operation to Cisco devices only.
VRRP Object Tracking
Object tracking is an independent process that manages creating, monitoring, and removing tracked objects such as the state-of-the line protocol of an interface. Clients such as the Hot Standby Router Protocol (HSRP), Gateway Load Balancing Protocol (GLBP), and now VRRP register their interest with specific tracked objects and act when the state of an object changes.
Each tracked object is identified by a unique number that is specified on the tracking CLI. Client processes such as VRRP use this number to track a specific object.
The tracking process periodically polls the tracked objects and notes any change of value. The changes in the tracked object are communicated to interested client processes, either immediately or after a specified delay. The object values are reported as either up or down.
VRRP object tracking gives VRRP access to all the objects available through the tracking process. The tracking process provides the ability to track individual objects such as a the state of an interface line protocol, state of an IP route, or the reachability of a route.
VRRP provides an interface to the tracking process. Each VRRP group can track multiple objects that may affect the priority of the VRRP router. Specify the object number to be tracked and VRRP will be notified of any change to the object. VRRP increments (or decrements) the priority of the virtual router based on the state of the object being tracked.
How Object Tracking Affects the Priority of a VRRP Router
The priority of a device can change dynamically if it has been configured for object tracking and the object that is being tracked goes down. The tracking process periodically polls the tracked objects and notes any change of value. The changes in the tracked object are communicated to VRRP, either immediately or after a specified delay. The object values are reported as either up or down. Examples of objects that can be tracked are the line protocol state of an interface or the reachability of an IP route. If the specified object goes down, the VRRP priority is reduced. The VRRP router with the higher priority can now become the virtual router master if it has the vrrp preempt command configured. See the “VRRP Object Tracking” section for more information on object tracking.
VRRP Authentication
VRRP ignores unauthenticated VRRP protocol messages. The default authentication type is text authentication.
A router ignores incoming VRRP packets from routers that do not have the same authentication configuration for a VRRP group. VRRP has three authentication schemes:
- No authentication
- Plain text authentication
VRRP packets are rejected in any of the following cases:
- The authentication schemes differ on the router and in the incoming packet.
- Text authentication strings differ on the router and in the incoming packet.
ISSU—VRRP
VRRP supports In Service Software Upgrade (ISSU). An ISSU allows a high-availability (HA) system to run in Stateful Switchover (SSO) mode even when different versions of Cisco IOS software are running on the active and standby Route Processors (RPs) or line cards.
ISSU provides the ability to upgrade or downgrade from one supported Cisco IOS release to another while continuing to forward packets and maintain sessions, thereby reducing planned outage time. The ability to upgrade or downgrade is achieved by running different software versions on the active RP and standby RP for a short period of time to maintain state information between RPs. This feature allows the system to switch over to a secondary RP running upgraded (or downgraded) software and continue forwarding packets without session loss and with minimal or no packet loss. This feature is enabled by default.
For detailed information about ISSU, see the Cisco IOS In Service Software Upgrade Process document at the following URL:
http://www.cisco.com/en/US/docs/ios-xml/ios/ha/configuration/15-2s/ha-config-performing-inservice-software-upgrade.html
SSO—VRRP
With the introduction of the SSO—VRRP feature, VRRP is SSO aware. VRRP can detect when a router is failing over to the secondary RP and continue in its current group state.
SSO functions in networking devices (usually edge devices) that support dual Route Processors (RPs). SSO provides RP redundancy by establishing one of the RPs as the active processor and the other RP as the standby processor. SSO also synchronizes critical state information between the RPs so that network state information is dynamically maintained between RPs.
Prior to being SSO aware, if VRRP was deployed on a router with redundant RPs, a switchover of roles between the active RP and the standby RP would result in the router relinquishing its activity as a VRRP group member and then rejoining the group as if it had been reloaded. The SSO—VRRP feature enables VRRP to continue its activities as a group member during a switchover. VRRP state information between redundant RPs is maintained so that the standby RP can continue the router’s activities within the VRRP during and after a switchover.
This feature is enabled by default. To disable this feature, use the no vrrp sso command in global configuration mode.
For more information, see the Stateful Switchover document at the following URL:
http://www.cisco.com/en/US/docs/ios-xml/ios/ha/configuration/15-2s/ha-config-stateful-switchover.html
Configuring VRRP
The following sections outline the steps necessary to configure VRRP:
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 virtual router master 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.
Complete the following steps in privileged EXEC mode to customize VRRP:
|
|
|
Step 1 |
enable |
Enables privileged EXEC mode.
- Enter your password if prompted.
|
Step 2 |
configure terminal |
Enters global configuration mode. |
Step 3 |
interface type number |
Enters interface configuration mode. |
Step 4 |
ip address ip-address mask |
Configures an IP address for an interface. |
Step 5 |
vrrp group description text |
Assigns a text description to the VRRP group. |
Step 6 |
vrrp group priority level |
Sets the priority level of the router within a VRRP group.
- The default priority is 100.
|
Step 7 |
vrrp group preempt [ delay minimum seconds ] |
Configures the router to take over as virtual router master for a VRRP group if it has a higher priority than the current virtual router master.
- The default delay period is 0 seconds.
- The router that is IP address owner will preempt, regardless of the setting of this command.
|
Step 8 |
vrrp group timers advertise [ msec ] interval |
Configures the interval between successive advertisements by the virtual router master in a VRRP group.
- The unit of the interval is in seconds unless the msec keyword is specified. The default interval value is 1 second.
Note All routers in a VRRP group must use the same timer values. If the same timer values are not set, the routers in the VRRP group will not communicate with each other and any misconfigured router will change its state to master. |
Step 9 |
vrrp group timers learn |
Configures the router, when it is acting as virtual router backup for a VRRP group, to learn the advertisement interval used by the virtual router master. |
Step 10 |
no vrrp sso |
(Optional) Disables VRRP support of SSO. VRRP support of SSO is enabled by default. |
Enabling VRRP
To enable VRRP perform the following steps.
|
|
|
Step 1 |
enable |
Enables privileged EXEC mode.
- Enter your password if prompted.
|
Step 2 |
configure terminal |
Enters global configuration mode. |
Step 3 |
interface type number |
Enters interface configuration mode. |
Step 4 |
ip address ip-address mask |
Configures an IP address for an interface. |
Step 5 |
vrrp group ip ip-address [ secondary ] |
Enables VRRP on an interface.
- After you identify a primary IP address, you can use the vrrp ip command again with the secondary keyword to indicate additional IP addresses supported by this group.
Note All routers in the VRRP group must be configured with the same primary address and a matching list of secondary addresses for the virtual router. If different primary or secondary addresses are configured, the routers in the VRRP group will not communicate with each other and any misconfigured router will change its state to master. |
Step 6 |
end |
Returns to privileged EXEC mode. |
Step 7 |
Router# show vrrp [ brief | group ] |
(Optional) Displays a brief or detailed status of one or all VRRP groups on the router. |
Step 8 |
Router# show vrrp interface type number [ brief ] |
(Optional) Displays the VRRP groups and their status on a specified interface. |
Disabling VRRP on an Interface
Disabling VRRP on an interface allows the protocol to be disabled, but the configuration retained. This ability was added with the introduction of the VRRP MIB, RFC 2787, Definitions of Managed Objects for the Virtual Router Redundancy Protocol.
You can use a Simple Network Management Protocol (SNMP) management tool to enable or disable VRRP on an interface. Because of the SNMP management capability, the vrrp shutdown command was introduced to represent a method via the CLI for VRRP to show the state that had been configured using SNMP.
When the show running-config command is entered, you can see immediately if the VRRP group has been configured and set to enabled or disabled. This is the same functionality that is enabled within the MIB.
The no form of the command enables the same operation that is performed within the MIB. If the vrrp shutdown command is specified using the SNMP interface, then entering the no vrrp shutdown command using the Cisco IOS CLI will reenable the VRRP group.
To disable VRRP perform the following steps.
|
|
|
Step 1 |
enable |
Enables privileged EXEC mode.
- Enter your password if prompted.
|
Step 2 |
configure terminal |
Enters global configuration mode. |
Step 3 |
interface type number |
Enters interface configuration mode. |
Step 4 |
ip address ip-address mask |
Configures an IP address for an interface. |
Step 5 |
vrrp group shutdown |
Disables VRRP on an interface.
- The command is now visible on the router.
Note You can have one VRRP group disabled, while retaining its configuration, and a different VRRP group enabled. |
Configuring VRRP Object Tracking
Restrictions
The following restriction applies to VRRP object tracking.
If a VRRP group is the IP address owner, its priority is fixed at 255 and cannot be reduced through object tracking.
To configure VRRP object tracking perform the following steps.
|
|
|
Step 1 |
enable |
Enables privileged EXEC mode.
- Enter your password if prompted.
|
Step 2 |
configure terminal |
Enters global configuration mode. |
Step 3 |
track object-number interface type number { line-protocol | ip routing } |
Configures an interface to be tracked where changes in the state of the interface affect the priority of a VRRP group.
- This command configures the interface and corresponding object number to be used with the vrrp track command.
- The line-protocol keyword tracks whether the interface is up. The ip routing keyword also checks that IP routing is enabled and active on the interface.
- You can also use the track ip route command to track the reachability of an IP route or a metric type object.
|
Step 4 |
interface type number |
Enters interface configuration mode. |
Step 5 |
vrrp group ip ip-address |
Enables VRRP on an interface and identifies the IP address of the virtual router. |
Step 6 |
vrrp group priority level |
Sets the priority level of the router within a VRRP group. |
Step 7 |
vrrp group track object-number [ decrement priority ] |
Configures VRRP to track an object. |
Step 8 |
end |
Returns to privileged EXEC mode. |
Step 9 |
show track [ object-number ] |
Displays tracking information. |
Configuring VRRP Text Authentication
Restrictions
- Interoperability with vendors that may have implemented the RFC 2338 method is not enabled.
To configure VRRP text authentication perform the following steps:
|
|
|
Step 1 |
enable |
Enables higher privilege levels, such as privileged EXEC mode.
- Enter your password if prompted.
|
Step 2 |
configure terminal |
Enters global configuration mode. |
Step 3 |
interface type number |
Configures an interface type and enters interface configuration mode. |
Step 4 |
ip address ip-address mask [ secondary ] |
Specifies a primary or secondary IP address for an interface. |
Step 5 |
vrrp group authentication text text-string |
Authenticates VRRP packets received from other routers in the group.
- If you configure authentication, all routers within the VRRP group must use the same authentication string.
- The default string is cisco.
Note All routers within the VRRP group must be configured with the same authentication string. If the same authentication string is not configured, the routers in the VRRP group will not communicate with each other and any misconfigured router will change its state to master. |
Step 6 |
vrrp group ip ip-address |
Enables VRRP on an interface and identifies the IP address of the virtual router. |
Step 7 |
Repeat Steps 1 through 6 on each router that will communicate. |
— |
Step 8 |
end |
Returns to privileged EXEC mode. |
Enabling the Router to Send SNMP VRRP Notifications
The VRRP MIB supports SNMP Get operations, which allow network devices to get reports about VRRP groups in a network from the network management station.
Enabling VRRP MIB trap support is performed through the CLI, and the MIB is used for collecting reports. A trap notifies the network management station when a router becomes a Master or backup router. When an entry is configured from the CLI, the RowStatus for that group in the MIB immediately goes to the active state.
To enable the router to send SNMP VRRP notifications perform the following steps:
|
|
|
Step 1 |
enable |
Enables privileged EXEC mode.
- Enter your password if prompted.
|
Step 2 |
configure terminal |
Enters global configuration mode. |
Step 3 |
snmp-server enable traps vrrp |
Enables the router to send SNMP VRRP notifications (traps and informs). |
Step 4 |
snmp-server host host community-string vrrp
|
Specifies the recipient of an SNMP notification operation. |