Configuring VRRP: Finding Feature Information
Configuring VRRP: Finding Feature Information
The Virtual Router Redundancy Protocol (VRRP) is an election protocol that dynamically assigns
          responsibility for one or more virtual routers to the VRRP routers on a LAN, allowing several routers on a
          multiaccess link to utilize the same virtual IP address. A VRRP router is configured to run the VRRP protocol
          in conjunction with one or more other routers attached to a LAN. In a VRRP configuration, one router is
          elected as the virtual router master, with the other routers acting as backups in case the virtual router master
          fails.
          This module explains the concepts related to VRRP and describes how to configure VRRP in a network.
                    First Hop Redundancy Protocols Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)
                                                                                                                            1
                                                                                                                        Configuring VRRP
      Restrictions for 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 will respond 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.
                              • ICMP Router Discovery Protocol (IRDP) 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.
                         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, and on MPLS VPNs,
                         VRF-aware MPLS VPNs, and VLANs.
             First Hop Redundancy Protocols Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)
  2
Configuring VRRP
                                                                                                                          VRRP Operation
                   The figure below 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).
                   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 virtual router master 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.
                             First Hop Redundancy Protocols Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)
                                                                                                                                           3
                                                                                                                    Configuring VRRP
      VRRP Benefits
                        The figure below 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.
                        In this topology, two virtual routers are configured. (For more information, see the Multiple Virtual Router
                        Support section.) 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.
VRRP Benefits
                        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 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.
            First Hop Redundancy Protocols Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)
  4
  Configuring VRRP
                                                                                                             Multiple Virtual Router Support
                     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.
                     Authentication
                     VRRP message digest 5 (MD5) algorithm authentication protects against VRRP-spoofing software and uses
                     the industry-standard MD5 algorithm for improved reliability and security.
                     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.
                     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.
                               First Hop Redundancy Protocols Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)
                                                                                                                                               5
                                                                                                                       Configuring VRRP
      VRRP Advertisements
                        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 IP Version 4 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.
            First Hop Redundancy Protocols Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)
  6
  Configuring VRRP
                                                                                                        In Service Software Upgrade--VRRP
                     master if it has the vrrp preempt command configured. See the “VRRP Object Tracking” section for more
                     information on object tracking.
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.
                               First Hop Redundancy Protocols Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)
                                                                                                                                            7
                                                                                                                                 Configuring VRRP
         Customizing VRRP
SUMMARY STEPS
                            1. enable
                            2. configure terminal
                            3. interface type number
                            4. ip address ip-address mask
                            5. vrrp group description text
                            6. vrrp group priority level
                            7. vrrp group preempt [delay minimum seconds]
                            8. vrrp group timers learn
                            9. exit
                            10. no vrrp sso
DETAILED STEPS
                    Example:
                    Router# configure terminal
                    Example:
                    Router(config)# interface GigabitEthernet
                    0/0/0
                    Example:
                    Router(config-if)# ip address 172.16.6.5
                    255.255.255.0
Step 5 vrrp group description text Assigns a text description to the VRRP group.
                    Example:
                    Router(config-if)# vrrp 10 description
                    working-group
Step 6 vrrp group priority level Sets the priority level of the router within a VRRP group.
               First Hop Redundancy Protocols Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)
   8
   Configuring VRRP
                                                                                                                                Enabling VRRP
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
                  Example:                                                    router master.
Step 8            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
                  Example:                                                    by the virtual router master.
                  Example:
                  Router(config-if)# exit
Enabling VRRP
SUMMARY STEPS
                         1. enable
                         2. configure terminal
                         3. interface type number
                         4. ip address ip-address mask
                         5. vrrp group ip ip-address [secondary]
                         6. end
                         7. show vrrp [brief] | group]
                         8. show vrrp interface type number [brief]
                                  First Hop Redundancy Protocols Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)
                                                                                                                                                9
                                                                                                                               Configuring VRRP
         Enabling VRRP
DETAILED STEPS
                  Example:
                  Router# configure terminal
                  Example:
                  Router(config)# interface GigabitEthernet
                   0/0/0
                  Example:
                  Router(config-if)# ip address 172.16.6.5
                   255.255.255.0
                  Example:
                  Router(config-if)# end
Step 7            show vrrp [brief] | group]                                  (Optional) Displays a brief or detailed status of one or all VRRP
                                                                              groups on the router.
                  Example:
                  Router# show vrrp 10
               First Hop Redundancy Protocols Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)
   10
   Configuring VRRP
                                                                                                              Configuring VRRP Object Tracking
                Note      If a VRRP group is the IP address owner, its priority is fixed at 255 and cannot be reduced through object
                          tracking.
SUMMARY STEPS
                       1. enable
                       2. configure terminal
                       3. track object-number interface type number {line-protocol | ip routing}
                       4. interface type number
                       5. vrrp group ip ip-address
                       6. vrrp group priority level
                       7. vrrp group track object-number [decrement priority]
                       8. end
                       9. show track [object-number]
DETAILED STEPS
                 Example:
                 Router# configure terminal
                                   First Hop Redundancy Protocols Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)
                                                                                                                                                 11
                                                                                                                                Configuring VRRP
         Configuring VRRP Object Tracking
                   Example:
                   Router(config)# interface Ethernet 2
Step 5             vrrp group ip ip-address                                       Enables VRRP on an interface and identifies the IP address of
                                                                                  the virtual router.
                   Example:
                   Router(config-if)# vrrp 1 ip 10.0.1.20
Step 6 vrrp group priority level Sets the priority level of the router within a VRRP group.
                   Example:
                   Router(config-if)# vrrp 1 priority 120
Step 7             vrrp group track object-number [decrement                      Configures VRRP to track an object.
                   priority]
                   Example:
                   Router(config-if)# vrrp 1 track 2 decrement
                    15
                   Example:
                   Router(config-if)# end
                   Example:
                   Router# show track 1
               First Hop Redundancy Protocols Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)
   12
   Configuring VRRP
                                                                                                           Configuring VRRP Text Authentication
SUMMARY STEPS
                          1. enable
                          2. configure terminal
                          3. terminal interface type number
                          4. ip address ip-address mask [secondary]
                          5. vrrp group authentication text text-string
                          6. vrrp group ip ip-address
                          7. Repeat Steps 1 through 6 on each router that will communicate.
                          8. end
DETAILED STEPS
                 Example:
                 Router# configure terminal
Step 3           terminal interface type number                              Configures an interface type and enters interface configuration
                                                                             mode.
                 Example:
                 Router(config)# interface Ethernet 0/1
Step 4 ip address ip-address mask [secondary] Specifies a primary or secondary IP address for an interface.
                 Example:
                 Router(config-if)# ip address 10.0.0.1
                 255.255.255.0
                                    First Hop Redundancy Protocols Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)
                                                                                                                                                  13
                                                                                                                                  Configuring VRRP
         Configuration Examples for VRRP
                   Example:
                   Router(config-if)# end
• Group 5:
               First Hop Redundancy Protocols Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)
   14
 Configuring VRRP
                                                                                                            Example: VRRP Object Tracking
                               • Router B will become the master for this group with priority 200.
                               • Advertising interval is 30 seconds.
                               • Preemption is enabled.
                        • Group 100:
                               • Router A will become the master for this group first because it has a higher IP address (10.1.0.2).
                               • Advertising interval is the default 1 second.
                               • Preemption is disabled.
Router A
Router B
                               First Hop Redundancy Protocols Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)
                                                                                                                                            15
                                                                                                                           Configuring VRRP
       Example: VRRP Object Tracking Verification
                          Ethernet1/0 - Group 1
                            State is Master
                            Virtual IP address is 10.0.0.3
                            Virtual MAC address is 0000.5e00.0101
                            Advertisement interval is 1.000 sec
                            Preemption is enabled
                             min delay is 0.000 sec
                            Priority is 105
                             Track object 1 state Down decrement 15
                            Master Router is 10.0.0.2 (local), priority is 105
                            Master Advertisement interval is 1.000 sec
                            Master Down interval is 3.531 sec
                          Router# show track
                          Track 1
                            Interface Serial0/1 line-protocol
                            Line protocol is Down (hw down)
                             1 change, last change 00:06:53
                            Tracked by:
                             VRRP Ethernet1/0 1
Additional References
                          Related Documents
             First Hop Redundancy Protocols Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)
  16
Configuring VRRP
                                                                                                                 Additional References
                   In Service Software Upgrace (ISSU)                           "In Service Software Upgrade Process" in the High
                                                                                Availability Configuration Guide
Standards
                   Standards                                                    Title
                   No new or modified standards are supported by this —
                   feature, and support for existing standards has not
                   been modified by this feature.
MIBs
RFCs
                   RFCs                                                         Title
                   RFC 2338                                                     Virtual Router Redundancy Protocol
                           First Hop Redundancy Protocols Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)
                                                                                                                                         17
                                                                                                                    Configuring VRRP
      Feature Information for VRRP
Technical Assistance
                          Description                                                     Link
                          The Cisco Support and Documentation website             http://www.cisco.com/cisco/web/support/index.html
                          provides online resources to download documentation,
                          software, and tools. Use these resources to install and
                          configure the software and to troubleshoot and resolve
                          technical issues with Cisco products and technologies.
                          Access to most tools on the Cisco Support and
                          Documentation website requires a Cisco.com user ID
                          and password.
            First Hop Redundancy Protocols Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)
 18
Configuring VRRP
                                                                                                             Feature Information for VRRP
                             First Hop Redundancy Protocols Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)
                                                                                                                                            19
                                                                                                                                Configuring VRRP
     Feature Information for VRRP
           First Hop Redundancy Protocols Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)
20
Configuring VRRP
                                                                                                          Feature Information for VRRP
                   VRRP MIB—RFC 2787                      Cisco IOS XE Release 3.3 SE                The VRRP MIB--RFC 2787
                                                                                                     feature enables an enhancement to
                                                                                                     the MIB for use with SNMP-based
                                                                                                     network management. The feature
                                                                                                     adds support for configuring,
                                                                                                     monitoring, and controlling routers
                                                                                                     that use VRRP.
                                                                                                     The following command was
                                                                                                     introduced by this feature: vrrp
                                                                                                     shutdown.
                                                                                                     The following commands were
                                                                                                     modified by this feature:
                                                                                                     snmp-server enable
                                                                                                     trapsandsnmp-server host.
                                                                                                     In Cisco IOS XE Release 3.3SE,
                                                                                                     this feature is supported on Cisco
                                                                                                     Catalyst 3850 Series Switches.
                                                                                                     In Cisco IOS XE Release 3.3SE,
                                                                                                     this feature is supported on Cisco
                                                                                                     5700 Wireless LAN Controllers.
                          First Hop Redundancy Protocols Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)
                                                                                                                                         21
                                                                                                                                Configuring VRRP
      Glossary
Glossary
                        virtual IP address owner —The VRRP router that owns the IP address of the virtual router. The owner is
                        the router that has the virtual router address as its physical interface address.
                        virtual router —One or more VRRP routers that form a group. The virtual router acts as the default gateway
                        router for LAN clients. Also known as a VRRP group.
                        virtual router backup —One or more VRRP routers that are available to assume the role of forwarding
                        packets if the virtual router master fails.
                        virtual router master —The VRRP router that is currently responsible for forwarding packets sent to the IP
                        addresses of the virtual router. Usually the virtual router master also functions as the IP address owner.
                        VRRP router --A router that is running VRRP.
            First Hop Redundancy Protocols Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)
 22