The main components of HSRP are an
active router, standby router, and a virtual or phantom router. In
Figure ,
the active router does the forwarding of data packets and transmits
hello messages to other routers informing them of its status. The
role of a standby router is to monitor the status of the active
router and quickly begin forwarding packets in the event of an
active router failure. The standby router also transmits hello
messages to other routers in the HSRP group. The virtual router does
not really even exist! It simply represents a consistently available
router with an IP address and a MAC address to the hosts on a
network.
It is possible that several other
routers exist in an HSRP standby group. These other routers will
monitor HSRP hello messages but do not respond. They function as
normal routers that forward packets sent to them but do not forward
packets addressed to the virtual router. These additional HSRP
routers remain in the "init" state.
So how does the standby router know
when the active router has failed? The answer is that the standby
router stops receiving hello messages from the active router and
steps into the role of the active router. Because the hosts are
using a virtual IP and MAC address, they see little to no service
disruption.
In the rare event that both the
active and standby routers fail, all other routers in the group will
contend for the active and standby roles; the router with the lowest
MAC address becomes the active router unless a HSRP priority is
configured.
To facilitate load sharing, a single
router may be a member of multiple HSRP standby groups on a single
segment. Each standby group emulates a single virtual router. There
can be up to 255 standby groups on any LAN. Multiple HSRP groups are
also supported on VLAN, port-channel and BVI interfaces.
In Figure ,
both Router A and Router B are members of Groups 1 and 2. However,
Router A is the active forwarding router for Group 1 and the standby
router for Group 2. Router B is the active forwarding router for
Group 2 and the standby router for Group 1.
Routers can also simultaneously
provide redundant backup and perform load sharing across different
IP subnets, as shown in Figure .
This is possible because for each
standby group, an IP address and a single well-known MAC address
with a unique group identifier are allocated to the group.
The IP address of a group is in the
range of addresses belonging to the subnet in use on the LAN.
However, the IP address of the group must differ from the addresses
allocated as interface addresses on all routers and hosts on the
LAN, including virtual IP addresses assigned to other HSRP groups.
Initially, there is no active router
in the standby group. Within the standby group, the router with the
highest standby priority becomes the active router. The default
priority for an HSRP router is 100; this priority value is
configurable. The active router responds to traffic for the virtual
router. If an end station sends a packet to the virtual router MAC
address, the active router receives and processes that packet. If an
end station sends an ARP request with the virtual router IP address,
the active router replies with the virtual router MAC address.
In Figure ,
Router A has a priority of 200 and Router B has a default priority
of 100. Router A assumes the active router role and forwards all
frames addressed to the well-known MAC address of 0000.0c07.acxx,
where xx is the HSRP group identifier. The well-known MAC address of 0000.0c07.acxx, where xx is the HSRP group
identifier, is used for all HSRP configurations unless HSRP is
configured to use of a different MAC address.
|