This chapter provides information and commands concerning the following topics:
- Hot Standby Routing Protocol (HSRP)
- —Configuring HSRP
- —Verifying HSRP
- —HSRP optimization options
- —Debugging HSRP
- Virtual Router Redundancy Protocol (VRRP)
- —Configuring VRRP
- —Verifying VRRP
- —Debugging VRRP
- Gateway Load Balancing Protocol (GLBP)
- —Configuring GLBP
- —Verifying GLBP
- —Debugging GLBP
Hot Standby Routing Protocol
The Hot Standby Router Protocol (HSRP) provides network redundancy for IP networks, ensuring that user traffic immediately and transparently recovers from first-hop failures in network edge devices or access circuits.
Configuring HSRP
Router(config)#interface fastethernet 0/0 |
Moves to interface configuration mode |
|
Router(config-if)# ip address 172.16.0.10 255.255.255.0 |
Assigns IP address and netmask |
|
Router(config-if)# standby 1 ip 172.16.0.1 |
Activates HSRP group 1 on the interface and creates a virtual IP address of 172.16.0.1 for use in HSRP |
|
Router(config-if)# standby 1 priority 120 |
Assigns a priority value of 120 to standby group 1 |
Verifying HSRP
|
Router# show running-config |
Displays what is currently running on the router |
|
Router# show standby |
Displays HSRP information |
|
Router# show standby brief |
Displays a single-line output summary of each standby group |
|
Router# show standby 1 |
Displays HSRP group 1 information |
|
Router# show standby fastethernet 0/0 |
Displays HSRP information for the specified interface |
|
Router# show standby fastethernet 0/0 brief |
Displays a summary of HSRP for the specified interface |
|
Router# show standby fastethernet 0/0 1 |
Displays HSRP group 1 information for the specified interface |
HSRP Optimization Options
There are options available that make it possible to optimize HSRP operation in the campus network. The next three sections explain three of these options: standby preempt, message timers, and interface tracking.
Preempt
|
Router(config)# interface fastethernet 0/0 |
Moves to interface configuration mode |
|
Router(config-if)# standby 1 preempt |
This router will preempt, or take control of, the active router if the local priority is higher than the active router |
|
Router(config-if)# standby 1 preempt delay minimum 180 |
Causes the local router to postpone taking over as the active router for 180 seconds since that router was last restarted |
|
Router(config-if)# standby 1 preempt delay reload |
Allows for preemption to occur only after a router reloads |
|
Router(config-if)# no standby 1 preempt delay reload |
Disables the preemption delay, but preemption itself is still enabled. Use the no standby x preempt command to eliminate preemption |
HSRP Message Timers
|
Router(config)# interface fastethernet 0/0 |
Moves to interface config mode |
|
Router(config-if)# standby 1 timers 5 15 |
Sets the hello timer to 5 seconds and sets the hold timer to 15 seconds |
|
Router(config-if)# standby 1 timers msec 200 msec 600 |
Sets the hello timer to 200 milliseconds and sets the hold timer to 600 milliseconds |
Interface Tracking
|
Router(config)# interface fastethernet 0/0 |
Moves to interface configuration mode |
|
Router(config-if)# standby 1 track serial 0/0 25 |
HSRP will track the availability of interface serial 0/0. If serial 0/0 goes down, the priority of the router in group 1 will be decremented by 25. |
Debugging HSRP
|
Router# debug standby |
Displays all HSRP debugging information, including state changes and transmission/reception of HSRP packets |
|
Router# debug standby errors |
Displays HSRP error messages |
|
Router# debug standby events |
Displays HSRP event messages |
|
Router# debug standby events terse |
Displays all HSRP events except for hellos and advertisements |
|
Router# debug standby events track |
Displays all HSRP tracking events |
|
Router# debug standby packets |
Displays HSRP packet messages |
|
Router# debug standby terse |
Displays all HSRP errors, events, and packets, except for hellos and advertisements |
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 use the same virtual IP address. A VRRP router is configured to run VRRP in conjunction with one or more other routers attached.
Configuring VRRP
|
Router(config)# interface fastethernet 0/0 |
Moves to interface config mode |
|
Router(config-if)# ip address 172.16.100.5 255.255.255.0 |
Assigns IP address and netmask |
|
Router(config-if)# vrrp 10 ip 172.16.100.1 |
Enables VRRP for group 10 on this interface with a virtual address of 172.16.100.1. The group number can be from 1 to 255. |
|
Router(config-if)# vrrp 10 description Engineering Group |
Assigns a text description to the group |
|
Router(config-if)# vrrp 10 priority 110 |
Sets the priority level for this router. The range is from 1 to 254. The default is 100. |
|
Router(config-if)# vrrp 10 preempt |
This router will preempt, or take over, as the virtual router master for group 10 if it has a higher priority than the current virtual router master |
|
Router(config-if)# vrrp 10 preempt delay minimum 60 |
This router will preempt, but only after a delay of 60 seconds |
|
Router(config-if)# vrrp 10 timers advertise 15 |
Configures the interval between successful advertisements by the virtual router master |
|
Router(config-if)# vrrp 10 timers learn |
Configures the router, when acting as a virtual router backup, to learn the advertisement interval used by the virtual router master |
|
Router(config-if)# vrrp 10 shutdown |
Disables VRRP on the interface, but configuration is still retained |
|
Router(config-if)# no vrrp 10 shutdown |
Reenables the VRRP group using the previous configuration |
Verifying VRRP
|
Router# show running-config |
Displays contents of dynamic RAM |
|
Router# show vrrp |
Displays VRRP information |
|
Router# show vrrp brief |
Displays a brief status of all VRRP groups |
|
Router# show vrrp 10 |
Displays detailed information about VRRP group 10 |
|
Router# show vrrp interface fastethernet 0/0 |
Displays information about VRRP as enabled on interface fastethernet 0/0 |
|
Router# show vrrp interface fastethernet 0/0 brief |
Displays a brief summary about VRRP on interface fastethernet 0/0 |
Debugging VRRP
|
Router# debug vrrp all |
Displays all VRRP messages |
|
Router# debug vrrp error |
Displays all VRRP error messages |
|
Router# debug vrrp events |
Displays all VRRP event messages |
|
Router# debug vrrp packets |
Displays messages about packets sent and received |
|
Router# debug vrrp state |
Displays messages about state transitions |
Gateway Load Balancing Protocol
Gateway Load Balancing Protocol (GLBP) protects data traffic from a failed router or circuit, like HSRP and VRRP, while allowing packet load sharing between a group of redundant routers.
Configuring GLBP
|
Router(config)# interface fastethernet 0/0 |
Moves to interface config mode |
|
Router(config-if)# ip address 172.16.100.5 255.255.255.0 |
Assigns IP address and netmask |
|
Router(config-if)# glbp 10 ip 172.16.100.1 |
Enables GLBP for group 10 on this interface with a virtual address of 172.16.100.1. The range of group numbers is from 0 to 1023. |
|
Router(config-if)# glbp 10 preempt |
Configures the router to preempt, or take over, as the active virtual gateway (AVG) for group 10 if this router has a higher priority than the current AVG |
|
Router(config-if)# glbp 10 preempt delay minimum 60 |
Configures the router to preempt, or take over, as AVG for group 10 if this router has a higher priority than the current active virtual forwarder (AVF) after a delay of 60 seconds |
|
Router(config-if)# glbp 10 forwarder preempt |
Configures the router to preempt, or take over, as AVF for group 10 if this router has a higher priority than the current AVF. This command is enabled by default with a delay of 30 seconds. |
|
Router(config-if)# glbp 10 forwarder preempt delay minimum 60 |
Configures the router to preempt, or take over, as AVF for group 10 if this router has a higher priority than the current AVF after a delay of 60 seconds |
|
Router(config-if)# glbp 10 priority 150 |
Sets the priority level of the router |
|
Router(config-if)# glbp 10 timers 5 15 |
Configures the hello timer to be set to 5 seconds and the hold timer to be 15 seconds |
|
Router(config-if)# glbp 10 timers msec 20200 msec 60600 |
Configures the hello timer to be 20,200 milliseconds and the hold timer to be 60,600 milliseconds. |
|
Router(config-if)# glbp 10 load-balancing host-dependent |
Specifies that GLBP will load balance using the host-dependent method |
|
Router(config-if)# glbp 10 load-balancing weighted |
Specifies that GLBP will load balance using the weighted method |
|
Router(config-if)# glbp 10 weighting 80 |
Assigns a maximum weighting value for this interface for load-balancing purposes. The value can be from 1 to 254. |
|
Router(config-if)# glbp 10 load balancing round robin |
Specifies that GLBP will load balance using the round-robin method |
If no load balancing is used with GLBP, GLBP will operate in an identical manner to HSRP, where the AVG will only respond to ARP requests with its own VF MAC address, and all traffic will be directed to the AVG.
Verifying GLBP
|
Router# show running-config |
Displays contents of dynamic RAM |
|
Router# show glbp |
Displays GLBP information |
|
Router# show glbp brief |
Displays a brief status of all GLBP groups |
|
Router# show glbp 10 |
Displays information about GLBP group 10 |
|
Router# show glbp fastethernet 0/0 |
Displays GLBP information on interface fastethernet 0/0 |
|
Router# show glbp fastethernet 0/0 10 |
Displays GLBP group 10 information on interface fastethernet 0/0 |
Debugging GLBP
|
Router# debug condition glbp |
Displays GLBP condition messages |
|
Router# debug glbp errors |
Displays all GLBP error messages |
|
Router# debug glbp events |
Displays all GLBP event messages |
|
Router# debug glbp packets |
Displays messages about packets sent and received |
|
Router# debug glbp terse |
Displays a limited range of debugging messages |
Configuration Example: HSRP
Figure 5-1 shows the network topology for the configuration that follows, which shows how to configure HSRP using the commands covered in this chapter. Note that only the commands specific to HSRP are shown in this example.
Figure 5-1 Network Topology for HSRP Configuration Example
Router 1
|
Router> enable |
Moves to privileged mode |
|
Router# configure terminal |
Moves to global configuration mode |
|
Router(config)# hostname R1 |
Sets router name to R1 |
|
R1(config)# interface fastethernet 0/0 |
Moves to interface config mode |
|
R1(config-if)# ip address 172.16.16.5 255.255.255.0 |
Assigns IP address and netmask |
|
R1(config-if)# standby 1 ip 172.16.16.254 |
Activates HSRP group 1 on the interface and creates a virtual IP address of 172.16.6.254 |
|
R1(config-if)# standby 1 priority 105 |
Assigns a priority value of 105 to standby group 1 |
|
R1(config-if)# standby 1 preempt |
This router will preempt, or take control of, the active router if the local priority is higher than the active router |
|
R1(config-if)# standby 1 track serial 0/0 |
HSRP will track the availability of interface serial 0/0. If serial 0/0 goes down, the router priority will be decremented by the default 10. |
|
R1(config-if)# no shutdown |
Enables the interface |
|
R1(config-if)# interface serial 0/0 |
Moves to interface config mode |
|
R1(config-if)# ip address 198.133.219.1 255.255.255.252 |
Assigns IP address and netmask |
|
R1(config-if)# no shutdown |
Enables the interface |
|
R1(config-if)# exit |
Returns to global config mode |
|
R1(config)# exit |
Returns to privileged mode |
|
R1# copy running-config startup-config |
Saves the configuration to NVRAM |
Router 2
|
Router> enable |
Moves to privileged mode |
|
Router# configure terminal |
Moves to global config mode |
|
Router(config)# hostname R2 |
Sets router name to R2 |
|
R2(config)# interface fastethernet 0/0 |
Moves to interface config mode |
|
R2(config-if)# ip address 172.16.16.6 255.255.255.0 |
Assigns IP address and netmask |
|
R2(config-if)# standby 1 ip 171.16.16.254 |
Activates HSRP group 1 on the interface and creates a virtual IP address of 172.16.6.254 |
|
R2(config-if)# standby 1 priority 100 |
Assigns a priority value of 100 to standby group 1 |
|
R2(config-if)# standby 1 preempt |
This router will preempt, or take control of, the active router if the local priority is higher than the active router |
|
R2(config-if)# standby 1 track serial 0/1 |
HSRP will track the availability of interface serial 0/1. If S0/1 goes down, the router priority will be decremented by the default 10. |
|
R2(config-if)# no shutdown |
Enables the interface |
|
R2(config-if)# interface serial 0/1 |
Moves to interface config mode |
|
R2(config-if)# ip address 198.133.219.5 255.255.255.252 |
Assigns IP address and netmask |
|
R2(config-if)# no shutdown |
Enables the interface |
|
R2(config-if)# exit |
Returns to global config mode |
|
R2(config)# exit |
Returns to privileged mode |
|
R2# copy running-config startup-config |
Saves the configuration to NVRAM |
Configuration Example: GLBP
Figure 5-2 shows the network topology for the configuration that follows, which shows how to configure GLBP using commands covered in this chapter. Note that only the commands specific to GLBP are shown in this example.
Figure 5-2 Network Topology for GLBP Configuration Example
R1 is the AVG for a GLBP group and is responsible for the virtual IP address 10.21.8.10. R1 is also an AVF for the virtual MAC address 0007.b400.0101. R1 is a member of the same GLBP group and is designated as the AVF for the virtual MAC address 0007.b400.0102.
WS1 has a default gateway IP address of 10.21.8.10 and a gateway MAC address of 0007.b400.0101.
WS2 shares the same default gateway IP address but receives the gateway MAC address 0007.b400.0102 because R2 is sharing the traffic load with R1.
Router 1
|
Router> enable |
Moves to privileged mode |
|
Router# configure terminal |
Moves to global config mode |
|
Router(config)# hostname R1 |
Assigns router name |
|
R1(config)# interface fastethernet 0/0 |
Moves to interface config mode |
|
R1(config-if)# ip address 172.16.16.5 255.255.255.0 |
Assigns IP address and netmask |
|
R1(config-if)# glbp 10 ip 172.16.16.254 |
Enables GLBP for group 10 on this interface with a virtual address of 172.16.16.254 |
|
R1(config-if)# glbp 10 preempt |
Configures the router to preempt, or take over, as AVG for group 10 if this router has a higher priority than the current AVG |
|
R1(config-if)# glbp 10 priority 250 |
Sets the priority level of the router |
|
R1(config-if)# glbp 10 timers 5 18 |
Configures the hello timer to be set to 5 seconds and the hold timer to be 18 seconds |
|
R1(config-if)# glbp 10 load-balancing host-dependent |
Specifies that GLBP will load balance using the host-dependent method |
|
R1(config-if)# no shutdown |
Enables the interface |
|
R1(config-if)# exit |
Returns to global config mode |
|
R1(config)# exit |
Returns to privileged mode |
|
R1# copy running-config startup-config |
Saves the configuration to NVRAM |
Router 2
|
Router> enable |
Moves to privileged mode |
|
Router# configure terminal |
Moves to global config mode |
|
Router(config)# hostname R2 |
Assigns router name |
|
R2(config)# interface fastethernet 0/0 |
Moves to interface config mode |
|
R2(config-if)# ip address 172.16.16.6 255.255.255.0 |
Assigns IP address and netmask |
|
R2(config-if)# glpb 10 ip 172.16.16.254 |
Enables GLBP for group 10 on this interface with a virtual address of 172.16.16.254 |
|
R2(config-if)# glbp 10 preempt |
Configures the router to preempt, or take over, as AVG for group 10 if this router has a higher priority than the current AVG |
|
R2(config-if)# glbp 10 priority 100 |
Sets the priority level of the router. The default setting is 100. |
|
R2(config-if)# glbp 10 timers 5 18 |
Configures the hello timer to be set to 5 seconds and the hold timer to be 18 seconds |
|
R1(config-if)# glbp 10 load-balancing host-dependent |
Specifies that GLBP will load balance using the host-dependent method |
|
R2(config-if)# no shutdown |
Enables the interface |
|
R2(config-if)# exit |
Returns to global config mode |
|
R2(config)# exit |
Returns to privileged mode |
|
R2# copy running-config startup-config |
Saves the configuration to NVRAM |
