Академический Документы
Профессиональный Документы
Культура Документы
Gateway redundancy is a fault-tolerant approach for hosts to communicate outside their local subnet. Typically, hosts are
configured with a single default gateway (next-hop router) so they may communicate outside the local subnet. However (as
shown in the image below) if the default gateway should fail, the hosts are limited to communicating only within the subnet,
effectively disconnecting from the rest of the network. Even if there is a redundant router which could serve as a replacement
gateway, there is no dynamic method by which the hosts could switch to a new default gateway IP address.
Gateway redundancy protects against a single point of failure. In gateway redundancy, a group of two or more routers actively
manage a single virtual router MAC address and IP address (as seen below). This configuration ensures that if a router fails, a
backup router takes responsibility as the default gateway. With gateway redundancy, LAN clients send traffic to the virtual router,
but an actual router handles the forwarding of that traffic. The difference between a virtual and actual router is unnoticeable to
the clients.
Entity or
Role
Description
An active router which forwards traffic destined to the virtual IP address (see the illustration below).
Active
Router
A standby router which will become the active router should the existing active router fail (see the illustration
below).
Standby
Router
Virtual
Router
A virtual router which is not an actual router. It is a concept of the entire HSRP group acting as one virtual router. It
is assigned its own IP address and MAC address; however, the active router acting as the virtual router actually
forwards the packets.
Additional
HSRP
member
routers
Additional HSRP member routers are neither active nor standby, but they are configured to participate in the same
HSRP group. These routers forward any packets addressed to their assigned interface IP addresses but do not
forward packets destined for the virtual router because they are not the active router.
Initial is the starting state of HSRP. All routers begin in this state. This state indicates that HSRP is not yet fully
operational.
Learn is when the router has not determined the virtual IP address and has not yet received a hello message from the
active router.
Listen is when the router knows the virtual IP address, but is neither the active router nor the standby router. This is the
state for additional HSRP member routers. The router in this state listens for hello messages, participating only if the
holdtime expires.
Speak is when the routers in the HSRP group are in the election process for the active and standby routers.
Standby is when the HSRP router is a candidate to become the next active router and sends periodic hello messages to
inform other routers in the HSRP group of its status.
Active is when the router forwards packets assigned to the virtual MAC and IP address of the HSRP group. It also sends
periodic hello messages to inform other routers in the HSRP group of its status.
Hello
Both timers can be configured with an msec parameter for faster failover times.
Note: All routers in the HSRP group should use the same timer values.
Coup
A coup message is sent by a standby router which wants to assume the function of the active router.
Resign
The active router sends the resign message when it is about to shut down or when a router that has a higher priority
sends a hello or coup message.
On a per-group basis, the HSRP router can be configured with a priority value. The default is 100. It can be between 0255. The router with the highest priority becomes the active router if it initializes first.
Note: If several routers have the same priority, the physical IP address of the router's interface is used. The router with
the highest IP address becomes the active router.
A preemption configuration will force a specific router to be an active router if it has the highest priority for the group. If
the preempted active router fails, the standby router becomes the active router. If the preempted active router regains
service, it will become the active router again. Be aware of the following details:
o
If preemption is not enabled, the standby router which takes over for a failed router will remain the active router
even if the former active router regains service.
If preemption is enabled, the former active router regains service immediately after it receives a hello message
from the active router with a lower priority by sending a coup message. When a lower priority active router
receives a coup message from an active, higher priority router, the router changes to the Speak state and sends
a resign message.
Note: The transition through HSRP states is displayed with the debug standby EXEC command.
Be aware of the following HSRP details:
The virtual MAC address is XXXX.XX07.ACxx. The first six values in the address (XXXX.XX) represent the vendor
code. The last two values (xx) represent the HSRP group number in hexadecimal. For example, a virtual MAC address
for HSRP group 79 would be XXXX.XX07.AC4F
If a host sends an ARP request with the virtual router's IP address, the active router will return the virtual router's MAC
address.
One or more HSRP groups need to be configured for each VLAN or subnet. HSRP is not configured globally.
Using the VLAN ID as the HSRP group number makes troubleshooting easier. However, the group number is limited to
a value between 0 and 255.
To configure HSRP load sharing, configure at least two routers to participate in two HSRP groups.
Configure the first router to serve as the active router for the first HSRP group and the backup router for the
second HSRP group.
Configure the second router to serve as the active router for the second HSRP group and the backup router for
the first HSRP group.
An HSRP tracking feature monitors the active router's interface that is used to forward traffic from the hosts. If that
interface goes down, the priority of the HSRP group is reduced to allow the HSRP standby router to become the active
router.
o
The HSRP group priority of the active router is decreased by 10 by default, but can be configured. Careful
planning of standby priorities for all routers is needed to ensure that the HSRP standby tracking feature lowers
priorities enough for standby routers to take active roles.
If preemption is not enabled on the standby router, it will not send a coup message to become the active router
for the group.
When configuring routers in the HSRP group, at least one router in the group must be configured with the virtual IP
address. Other routers in the group will learn the virtual IP address because it is forwarded in the hello messages.
To...
Enter interface configuration mode and
enable HSRP with a group number.
is unencrypted.
Router#show standby
Router#debug standby
Examples
The following table provides example gateway redundancy configurations and descriptions:
Commands
RouterA(config)#interface vlan 10
RouterA(config-if)#standby 10 ip 10.2.2.1
RouterA(config-if)#standby 10 priority 100
RouterA(config-if)#end
RouterB(config)#interface vlan 10
RouterB(config-if)#standby 10 priority 90
RouterB(config-if)#end
RouterA(config)#interface vlan 10
RouterA(config-if)#standby 10 ip 10.2.2.1
RouterA(config-if)#standby 10 priority 150
RouterA(config-if)#interface vlan 20
RouterA(config-if)#standby 20 ip 10.3.3.1
RouterA(config-if)#standby 20 priority 100
RouterA(config-if)#end
RouterB(config)#interface vlan 10
RouterB(config-if)#standby 10 priority 100
RouterB(config-if)#interface vlan 20
RouterB(config-if)#standby 20 priority 150
RouterB(config-if)#end
Description
The first group of commands configures a single router
(RouterA) with one HSRP standby group for VLAN 10 with
a virtual address of 10.2.2.1 and a priority of 100. The
second group of commands configures a single router
(RouterB) with the same group yet a different priority.
This command set configures RouterA as the active router
for VLAN 10 because it has the highest priority. RouterB is
configured as the standby router.
Note: When configuring routers in the HSRP group, at least
one router in the group must be configured with the virtual
IP address. Other routers in the group will learn the virtual
IP address because it is forwarded in the hello messages.