B Cisco Nexus 9000 Series NX-OS Unicast Routing Configuration Guide 7x Chapter 010011
B Cisco Nexus 9000 Series NX-OS Unicast Routing Configuration Guide 7x Chapter 010011
About VRRP
VRRP allows for a transparent failover at the first-hop IP router by configuring a group of routers to share a
virtual IP address. VRRP selects an allowed router in that group to handle all packets for the virtual IP address.
The remaining routers are in standby and take over if the allowed router fails.
VRRP Operation
A LAN client can determine which router should be the first hop to a particular remote destination by using
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.
Configuring VRRP
1
Configuring VRRP
VRRP Operation
Routing protocol—The client listens to dynamic routing protocol updates (for example, from Routing
Information Protocol [RIP]) and forms its own routing table.
ICMP Router Discovery Protocol (IRDP) client—The client runs an Internet Control Message Protocol (ICMP)
router discovery client.
The disadvantage to dynamic discovery protocols is that they incur some configuration and processing overhead
on the LAN client. Also, if a router fails, 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. Although
this approach simplifies client configuration and processing, it 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.
VRRP can solve the static configuration problem by enabling a group of routers (a VRRP group) to share a
single virtual IP address. You can then configure the LAN clients with the virtual IP address as their default
gateway.
The following figure shows a basic VLAN topology. In this example, Routers A, B, and C form a VRRP
group. The IP address of the group is the same address that was configured for the Ethernet interface of Router
A (10.0.0.1).
Figure 1: Basic VRRP Topology
Because the virtual IP address uses the IP address of the physical Ethernet interface of Router A, Router A is
the primary (also known as the IP address owner). As the primary, Router A owns the virtual IP address of
the VRRP group and forwards 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 backups. If the primary fails, the backup router with the highest priority becomes
the primary and takes over the virtual IP address to provide uninterrupted service for the LAN hosts. When
Router A recovers, it becomes the primary again.
Note Packets received on a routed port destined for the VRRP virtual IP address terminate on the local router,
regardless of whether that router is the primary VRRP router or a backup VRRP router. These packets include
ping and Telnet traffic. Packets received on a Layer 2 (VLAN) interface destined for the VRRP virtual IP
address terminate on the primary router.
Configuring VRRP
2
Configuring VRRP
VRRP Benefits
VRRP Benefits
The benefits of VRRP are as follows:
• Redundancy—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—Allows traffic to and from LAN clients to be shared by multiple routers. The traffic load
is shared more equitably among available routers.
• Multiple VRRP groups—Supports multiple VRRP groups on a router physical interface if the platform
supports multiple MAC addresses. Multiple VRRP groups enable you to implement redundancy and load
sharing in your LAN topology.
• Multiple IP addresses—Allows you to manage multiple IP addresses, including secondary IP addresses.
If you have multiple subnets that are configured on an Ethernet interface, you can configure VRRP on
each subnet.
• Preemption—Enables you to preempt a backup router that has taken over for a failing primary with a
higher priority backup router that has become available.
• Advertisement protocol—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. IANA has assigned the IP protocol number 112 to VRRP.
• VRRP tracking—Ensures that the best VRRP router is the primary for the group by altering VRRP
priorities based on interface states.
In a topology where multiple VRRP groups are configured on a router interface, the interface can act as a
primary for one VRRP group and as a backup for one or more other VRRP groups.
The following image 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. Routers A and B act as backups to each other if either router fails.
Configuring VRRP
3
Configuring VRRP
VRRP Router Priority and Preemption
This topology contains two virtual IP addresses for two VRRP groups that overlap. For VRRP group 1, Router
A is the owner of IP address 10.0.0.1 and is the primary. Router B is the backup to Router A. Clients 1 and
2 are configured with the default gateway IP address of 10.0.0.1.
For VRRP group 2, Router B is the owner of IP address 10.0.0.2 and is the primary. Router A is the backup
to router B. Clients 3 and 4 are configured with the default gateway IP address of 10.0.0.2.
Configuring VRRP
4
Configuring VRRP
vPCs and VRRP
Note You should configure VRRP on the primary vPC peer device as active and VRRP on the vPC secondary
device as standby.
VRRP Advertisements
The VRRP primary sends VRRP advertisements to other VRRP routers in the same group. The advertisements
communicate the priority and state of the primary. Cisco NX-OS encapsulates the VRRP advertisements in
IP packets and sends them to the IP multicast address assigned to the VRRP group. Cisco NX-OS sends the
advertisements once every second by default, but you can configure a different advertisement interval.
VRRP Authentication
VRRP supports the following authentication functions:
• No authentication
• Plain text authentication
VRRP Tracking
VRRP supports the following options for tracking:
• Native interface tracking—Tracks the state of an interface and uses that state to determine the priority
of the VRRP router in a VRRP group. The tracked state is down if the interface is down or if the interface
does not have a primary IP address.
• Object tracking—Tracks the state of a configured object and uses that state to determine the priority of
the VRRP router in a VRRP group. See Configuring Object Tracking for more information on object
tracking.
If the tracked state (interface or object) goes down, VRRP updates the priority based on what you configure
the new priority to be for the tracked state. When the tracked state comes up, VRRP restores the original
priority for the virtual router group.
Configuring VRRP
5
Configuring VRRP
BFD for VRRP
For example, you might want to lower the priority of a VRRP group member if its uplink to the network goes
down so another group member can take over as primary for the VRRP group. See the Configuring VRRP
Interface State Tracking section for more information.
Configuring VRRP
6
Configuring VRRP
VRRPv3 Benefits
VRRPv3 Benefits
The benefits of VRRPv3 are as follows:
• Interoperability in multi-vendor environments
• Support for the IPv4 and IPv6 address families
• Improved scalability through the use of VRRS pathways
High Availability
VRRP supports high availability through stateful restarts and stateful switchovers. A stateful restart occurs
when the VRRP process fails and is restarted. A stateful switchover occurs when the active supervisor switches
to the standby supervisor. Cisco NX-OS applies the run-time configuration after the switchover.
VRRPv3 does not support stateful switchovers.
Virtualization Support
VRRP supports virtual routing and forwarding (VRF) instances.
Configuring VRRP
7
Configuring VRRP
Default Settings for VRRP Parameters
• VRRPv3 is not intended as a replacement for existing dynamic protocols. VRRPv3 is designed for use
over multi-access, multicast, or broadcast-capable Ethernet LANs.
• VRRPv3 is supported only on Ethernet and Fast Ethernet interfaces, bridge group virtual interfaces
(BVIs), Gigabit Ethernet interfaces, and VLANs.
• When VRRPv3 is in use, VRRPv2 is unavailable. To configure VRRPv3, you must disable any VRRPv2
configuration.
• VRRS is currently available only for use with VRRPv3.
• Use VRRPv3 millisecond timers only where absolutely necessary and with careful consideration and
testing. Millisecond values work only under favorable circumstances. The millisecond timer values are
compatible with third-party vendors as long as they also support VRRPv3.
• Full network redundancy can be achieved only if VRRPv3 operates over the same network path as the
VRRS pathway redundant interfaces. For full redundancy, the following restrictions apply:
• VRRS pathways should use the same physical interface as the parent VRRPv3 group or be configured
on a subinterface with the same physical interface as the parent VRRPv3 group.
• VRRS pathways can be configured on switch virtual interfaces (SVIs) only if the associated VLAN
shares the same trunk as the VLAN on which the parent VRRPv3 group is configured.
• Unlike VRRPv2, VRRPv3 does not support bidirectional forwarding for faster failure detection.
• Unlike VRRPv2, VRRPv3 does not support native interface tracking.
Parameters Default
VRRP Disabled
Authentication No authentication
Preemption Enabled
Priority 100
Configuring VRRP
8
Configuring VRRP
Configuring VRRP
Parameters Default
VRRPv3 Disabled
VRRS Disabled
Configuring VRRP
Note If you are familiar with the Cisco IOS CLI, be aware that the Cisco NX-OS commands for this feature might
differ from the Cisco IOS commands that you would use.
Enabling VRRP
You must globally enable VRRP before you configure and enable any VRRP groups.
Procedure
Step 2 [no] feature vrrp Enables VRRP. Use the no form of this
command to disable VRRP.
Example:
switch(config)# feature vrrp
Step 3 (Optional) copy running-config startup-config Copies the running configuration to the startup
configuration.
Example:
switch(config)# copy running-config
startup-config
Configuring VRRP
9
Configuring VRRP
Configuring VRRP Groups
You can configure one virtual IPv4 address for a VRRP group. By default, the primary VRRP router drops
the packets addressed directly to the virtual IP address because the VRRP primary is intended only as a
next-hop router to forward packets. Some applications require that Cisco NX-OS accept packets that are
addressed to the virtual router IP address. Use the secondary option to the virtual IP address to accept these
packets when the local router is the VRRP primary.
Once you have configured the VRRP group, you must explicitly enable the group before it becomes active.
Procedure
Step 4 address ip-address [secondary] Configures the virtual IPv4 address for the
specified VRRP group. This address should be
Example:
in the same subnet as the IPv4 address of the
switch(config-if-vrrp)# address 192.0.2.8 interface.
Use the secondary option only if applications
require that VRRP routers accept the packets
sent to the virtual router's IP address and deliver
to applications.
Step 7 (Optional) copy running-config startup-config Copies the running configuration to the startup
configuration.
Example:
Configuring VRRP
10
Configuring VRRP
Configuring VRRP Priority
Procedure
Step 5 priority level [forwarding-threshold lower Sets the priority level used to select the active
lower-value upper upper-value] router in a VRRP group. The level range is
1–254. The default is 100 for backups and 255
Example:
for a primary that has an interface IP address
switch(config-if-vrrp)# priority 60 equal to the virtual IP address.
forwarding-threshold lower 40 upper 50
Configuring VRRP
11
Configuring VRRP
Configuring VRRP Authentication
Step 8 (Optional) copy running-config startup-config Copies the running configuration to the startup
configuration.
Example:
switch(config-if-vrrp)# copy
running-config startup-config
Procedure
Configuring VRRP
12
Configuring VRRP
Configuring Time Intervals for Advertisement Packets
Step 5 authentication text password Assigns the simple text authentication option
and specifies the keyname password. The
Example:
keyname range is from 1 to 255 characters. We
switch(config-if-vrrp)# authentication recommend that you use at least 16 characters.
text aPassword
The text password is up to eight alphanumeric
characters.
Step 6 no shutdown Enables the VRRP group, which is disabled by
default.
Example:
switch(config-if-vrrp)# no shutdown
Step 8 (Optional) copy running-config startup-config Copies the running configuration to the startup
configuration.
Example:
switch(config-if-vrrp)# copy
running-config startup-config
Procedure
Configuring VRRP
13
Configuring VRRP
Disabling Preemption
Step 5 advertisement interval seconds Sets the interval time in seconds between
sending advertisement frames. The range is
Example:
from 1 to 255. The default is 1 second.
switch(config-if-vrrp)#
advertisement-interval 15
Step 8 (Optional) copy running-config startup-config Copies the running configuration to the startup
configuration.
Example:
switch(config-if-vrrp)# copy
running-config startup-config
Disabling Preemption
You can disable preemption for a VRRP group member. If you disable preemption, a higher-priority backup
router does not take over for a lower-priority primary router. Preemption is enabled by default.
Procedure
Configuring VRRP
14
Configuring VRRP
Configuring VRRP Interface State Tracking
Step 8 (Optional) copy running-config startup-config Copies the running configuration to the startup
configuration.
Example:
switch(config-if-vrrp)# copy
running-config startup-config
Configuring VRRP
15
Configuring VRRP
Configuring VRRP Interface State Tracking
Procedure
Step 5 track interface type slot/port priority value Enables interface priority tracking for a VRRP
group. The priority range is from 1 to 254.
Example:
switch(config-if-vrrp)# track interface
ethernet 2/10 priority 254
Step 8 (Optional) copy running-config startup-config Copies the running configuration to the startup
configuration.
Example:
switch(config-if-vrrp)# copy
running-config startup-config
Configuring VRRP
16
Configuring VRRP
Configuring VRRPv3
Configuring VRRPv3
Enabling VRRPv3 and VRRS
You must globally enable VRRPv3 before you can configure and enable any VRRPv3 groups.
Procedure
Step 2 [no] feature vrrpv3 Enables VRRP version 3 and Virtual Router
Redundancy Service (VRRS). The no form of
Example:
this command disables VRRPv3 and VRRS.
switch(config)# feature vrrpv3
If VRRPv2 is currently configured, use the no
feature vrrp command in global configuration
mode to remove the VRRPv2 configuration and
then use the feature vrrpv3 command to enable
VRRPv3.
Step 3 (Optional) copy running-config startup-config Copies the running configuration to the startup
configuration.
Example:
switch(config)# copy running-config
startup-config
Procedure
Configuring VRRP
17
Configuring VRRP
Creating VRRPv3 Groups
Step 3 vrrpv3 number address-family [ipv4 | ipv6] Creates a VRRPv3 group and enters VRRPv3
group configuration mode. The range is 1–255.
Example:
switch(config-if)# vrrpv3 5
address-family ipv4
switch(config-if-vrrpv3-group)#
Step 4 (Optional) address ip-address [primary | Specifies a primary or secondary IPv4 or IPv6
secondary] address for the VRRPv3 group.
Example: To utilize secondary IP addresses in a VRRPv3
switch(config-if-vrrpv3-group)# address group, you must first configure a primary IP
100.0.1.10 primary address on the same group.
Step 5 (Optional) description description Specifies a description for the VRRPv3 group.
You can enter up to 80 alphanumeric
Example:
characters.
switch(config-if-vrrpv3-group)#
description group3
Step 7 (Optional) preempt [delay minimum seconds] Enables preemption of a lower priority primary
switch with an optional delay. The range is
Example:
0–3600.
switch(config-if-vrrpv3-group)# preempt
delay minimum 30
Step 8 (Optional) priority level Specifies the priority of the VRRPv3 group.
The range is 1–254.
Example:
switch(config-if-vrrpv3-group)# priority
3
Step 9 (Optional) timers advertise interval Sets the advertisement timer in milliseconds.
The range is 100–40950.
Example:
switch(config-if-vrrpv3-group)# timers Cisco recommends that you set this timer to a
advertise 1000 value greater than or equal to 1 second.
Configuring VRRP
18
Configuring VRRP
Configuring VRRPv3 Control Groups
Step 11 (Optional) vrrs leader vrrs-leader-name Specifies a leader's name to be registered with
VRRS.
Example:
switch(config-if-vrrpv3-group)# vrrs
leader leader1
Step 13 (Optional) show fhrp [interface-type Displays First Hop Redundancy Protocol
interface-number] [verbose] (FHRP) information. Use the verbose keyword
to view detailed information.
Example:
switch(config-if-vrrpv3-group)# show
fhrp ethernet 2/1 verbose
Step 15 (Optional) copy running-config Copies the running configuration to the startup
startup-config configuration.
Example:
switch(config-if-vrrpv3-group)# copy
running-config startup-config
Procedure
Configuring VRRP
19
Configuring VRRP
Configuring VRRPv3 Object Tracking
Step 3 ip address ip-address mask [secondary] Configures the IP address on the interface.
Example: You can use the secondary keyword to
switch(config-if)# ip address configure additional IP addresses on the
209.165.200.230 255.255.255.224 interface.
Step 4 vrrpv3 number address-family [ipv4 | ipv6] Creates a VRRPv3 group and enters VRRPv3
group configuration mode. The range is from 1
Example:
to 255.
switch(config-if)# vrrpv3 5
address-family ipv4
switch(config-if-vrrpv3-group)#
Step 5 (Optional) address ip-address [primary | Specifies a primary or secondary IPv4 or IPv6
secondary] address for the VRRPv3 group.
Example:
switch(config-if-vrrpv3-group)# address
209.165.200.227 primary
Step 7 (Optional) show fhrp [interface-type Displays First Hop Redundancy Protocol
interface-number] [verbose] (FHRP) information. Use the verbose keyword
to view detailed information.
Example:
switch(config-if-vrrpv3-group)# show fhrp
ethernet 2/1 verbose
Step 8 (Optional) show vrrpv3 interface-type Displays the VRRPv3 configuration information
interface-number for the specified interface.
Example:
switch(config-if-vrrpv3-group)# show
vrrpv3 ethernet 2/1
Step 9 (Optional) copy running-config startup-config Copies the running configuration to the startup
configuration.
Example:
switch(config-if-vrrpv3-group)# copy
running-config startup-config
Configuring VRRP
20
Configuring VRRP
Configuring VRRS Pathways
Procedure
Step 3 vrrpv3 number address-family [ipv4 | ipv6] Creates a VRRPv3 group for IPv4 or IPv6 and
enters VRRPv3 group configuration mode. The
Example:
range is from 1 to 255.
switch(config-if)# vrrpv3 5
address-family ipv6
switch(config-if-vrrpv3-group)#
Step 4 track object-number decrement number Configures the process to track the state of the
IPv4 or IPv6 object using the VRRPv3 group.
Example:
VRRPv3 on the interface registers with the
switch(config-if-vrrpv3-group)# tracking process to be informed of any changes
object-track 1
decrement 2 to the object in the VRRPv3 group. If the object
state on the interface goes down, the priority of
the VRRPv3 group is reduced by the decrement
number specified.
Step 5 (Optional) show running-config vrrpv3 Displays the running configuration for VRRPv3.
Example:
switch(config-if-vrrp-group)# show
running-config vrrp
Configuring VRRP
21
Configuring VRRP
Configuring VRRS Pathways
Procedure
Step 3 ip address ip-address mask [secondary] Configures the IP address on the interface.
Example: You can use the secondary keyword to
switch(config-if)# ip address configure additional IP addresses on the
209.165.200.230 255.255.255.224 interface.
Step 4 vrrs pathway vrrs-tag Defines the VRRS pathway for a VRRS group
and enters VRRS pathway configuration mode.
Example:
switch(config-if)# vrrs pathway path1 The vrrs-tag argument specifies the name of
switch(config-if-vrrs-pw)# the VRRS tag that is being associated with the
pathway.
Step 5 mac address {mac-address | inherit} Specifies a MAC address for the pathway.
Example: The inherit keyword causes the pathway to
switch(config-if-vrrs-pw)# mac address inherit the virtual MAC address of the VRRPv3
fe24.fe24.fe24 group with which the pathway is associated.
Step 6 address ip-address Defines the virtual IPv4 or IPv6 address for a
pathway.
Example:
switch(config-if-vrrs-pw)# address A VRRPv3 group is capable of controlling more
209.165.201.10 than one pathway.
Step 7 (Optional) show vrrs pathway interface-type Displays the VRRS pathway information for
interface-number different pathway states, such as active, inactive,
and not ready.
Example:
switch(config-if-vrrs-pw)# show vrrs
pathway ethernet 1/2
Step 8 (Optional) copy running-config startup-config Copies the running configuration to the startup
configuration.
Example:
Configuring VRRP
22
Configuring VRRP
Verifying the VRRP Configuration
Command Purpose
show fhrp interface-type interface-number Displays First Hop Redundancy Protocol (FHRP)
information.
show vrrp [group-number] Displays the VRRP status for all groups or for a
specific VRRP group.
Command Purpose
show vrrpv3 [all | brief | detail] Displays the VRRPv3 configuration information.
show vrrpv3 interface-type interface-number Displays the VRRPv3 configuration information for
a specific interface.
show vrrs pathway [interface-type interface-number] Displays the VRRS pathway information for different
pathway states, such as active, inactive, and not ready.
Command Purpose
Use the clear vrrp statistics command to clear the VRRP statistics for all interfaces on the device.
Configuring VRRP
23
Configuring VRRP
Monitoring and Clearing VRRPv3 Statistics
Command Purpose
Use the clear vrrpv3 statistics command to clear the VRRPv3 statistics for all interfaces on the device.
• Group 5:
• Router B becomes the primary for this group with priority 200.
• Advertising interval is 30 seconds.
• Pre-emption is enabled.
• Group 100:
• Router A becomes the primary for this group first because it has a higher IP address (10.1.0.2).
• Advertising interval is the default of 1 second.
• Pre-emption is disabled.
Router A
switch (config)# interface ethernet 1/1
switch (config-if)# ip address 10.1.0.1/16
switch (config-if)# no shutdown
switch (config-if)# vrrp 1
switch (config-if-vrrp)# priority 120
switch (config-if-vrrp)# authentication text cisco
switch (config-if-vrrp)# advertisement-interval 3
switch (config-if-vrrp)# address 10.1.0.10
switch (config-if-vrrp)# no shutdown
switch (config-if-vrrp)# exit
switch (config-if)# vrrp 5
switch (config-if-vrrp)# priority 100
Configuring VRRP
24
Configuring VRRP
Configuration Examples for VRRPv3
Router B
switch (config)# interface ethernet 1/1
switch (config-if)# ip address 10.1.0.2/16
switch (config-if)# no shutdown
switch (config-if)# vrrp 1
switch (config-if-vrrp)# priority 100
switch (config-if-vrrp)# authentication text cisco
switch (config-if-vrrp)# advertisement-interval 3
switch (config-if-vrrp)# address 10.1.0.10
switch (config-if-vrrp)# no shutdown
switch (config-if-vrrp)# exit
switch (config-if)# vrrp 5
switch (config-if-vrrp)# priority 200
switch (config-if-vrrp)# advertisement-interval 30
switch (config-if-vrrp)# address 10.2.0.50
switch (config-if-vrrp)# no shutdown
switch (config-if-vrrp)# exit
switch (config-if)# vrrp 100
switch (config-if-vrrp)# no preempt
switch (config-if-vrrp)# address 10.2.0.100
switch (config-if-vrrp)# no shutdown
Configuring VRRP
25
Configuring VRRP
Additional References
Additional References
Related Documents for VRRP
Related Topic Document Title
Configuring high availability Cisco Nexus 9000 Series NX-OS High Availability and Redundancy
Guide
Configuring VRRP
26