Hot Standby Router Protocol
Encyclopedia
Hot Standby Router Protocol (HSRP) is a Cisco proprietary
Proprietary protocol
In telecommunications, a proprietary protocol is a communications protocol owned by a single organization or individual.-Enforcement:Proprietors may enforce restrictions through patents and by keeping the protocol specification a trade secret...

 redundancy protocol for establishing a fault-tolerant default gateway
Default gateway
In computer networking, a gateway is a node on a TCP/IP network that serves as an access point to another network. A default gateway is the node on the computer network that the network software uses when an IP address does not match any other routes in the routing table.In home computing...

, and has been described in detail in RFC 2281.

The protocol establishes a framework between network routers in order to achieve default gateway
Default gateway
In computer networking, a gateway is a node on a TCP/IP network that serves as an access point to another network. A default gateway is the node on the computer network that the network software uses when an IP address does not match any other routes in the routing table.In home computing...

 failover if the primary gateway should become inaccessible, in close association with a rapid-converging routing protocol like EIGRP or OSPF. By multicasting packets, HSRP sends its hello messages to the multicast address
Multicast address
A multicast address is a logical identifier for a group of hosts in a computer network, that are available to process datagrams or frames intended to be multicast for a designated network service...

 224.0.0.2 (all routers) for version 1, or 224.0.0.102 for version 2, using UDP
User Datagram Protocol
The User Datagram Protocol is one of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer applications can send messages, in this case referred to as datagrams, to other hosts on an Internet Protocol network without requiring...

 port 1985, to other HSRP-enabled routers, defining priority between the routers. The primary router with the highest configured priority will act as a virtual router with a pre-defined gateway IP address and will respond to the ARP request from machines connected to the LAN with the MAC address 0000.0c07.acXX where XX is the group ID in hex. If the primary router should fail, the router with the next-highest priority would take over the gateway IP address and answer ARP requests with the same mac address, thus achieving transparent default gateway fail-over. A HSRP Basics Simulation visualizes Active/Standby election and link failover with Hello, Coup, ARP Reply packets and timers.

HSRP is not a routing protocol as it does not advertise IP
Internet Protocol
The Internet Protocol is the principal communications protocol used for relaying datagrams across an internetwork using the Internet Protocol Suite...

 routes or affect the routing
Routing
Routing is the process of selecting paths in a network along which to send network traffic. Routing is performed for many kinds of networks, including the telephone network , electronic data networks , and transportation networks...

 table in any way.

HSRP has the ability to trigger a failover if one or more interfaces on the router go down. This can be useful for dual branch routers each with a single serial link back to the head end
Head end
Head end may refer to:* A cable television headend, a master facility for receiving television signals for processing and distribution over a cable television system* gateway...

. If the serial link of the primary router goes down, the backup router would take over the primary functionality and thus retain connectivity to the head end.

Load Sharing

Router 1:

track 1 interface Serial0/0/0.1 ip routing ! Points at the interface that needs to be Prioritized
interface FastEthernet0/0
description interface to LAN
ip address 10.10.10.1 255.255.255.0 ! Make sure this IP is in the same subnet as your Virtual Gateway1 IP
ip address 192.168.1.1 255.255.255.0 Secondary ! Make sure this IP is in the same subnet as your Virtual Gateway2 IP
standby 1 ip 10.10.10.25 ! Virtual IP 1 (10.10.10.0 Network Takes Priority)
standby 1 priority 105 ! The Higher the # The Higher the Priority
standby 1 preempt ! Enables the router with the highest priority to immediately become the active router
standby 1 track 1 ! WAN SUBINTERFACE
standby 2 ip 192.168.1.25 ! Virtual IP 2
standby 2 priority 100 ! Lower Priority = Backup Route
standby 2 preempt ! Enables the router with the highest priority to immediately become the active router
standby 2 track 1 ! WAN SUBINTERFACE
!
Router bgp
network 10.10.10.0 mask 255.255.255.0 ! Broadcasts Gateway1 out the WAN through BGP
network 192.168.1.0 mask 255.255.255.0 ! Broadcasts Gateway2 out the WAN through BGP

Router 2:

track 1 interface Serial0/0/0.1 ip routing ! Points at the interface that needs to be Prioritized
interface FastEthernet0/0
description interface to LAN
ip address 192.168.1.2 255.255.255.0 ! Make sure this IP is in the same subnet as your Virtual Gateway2 IP
ip address 10.10.10.2 255.255.255.0 Secondary ! Make sure this IP is in the same subnet as your Virtual Gateway1 IP
standby 1 ip 10.10.10.25 ! Virtual IP 1
standby 1 priority 100 ! Lower Priority = Backup Router
standby 1 preempt ! Enables the router with the highest priority to immediately become the active router
standby 1 track 1 ! WAN SUBINTERFACE
standby 2 ip 192.168.1.25 ! Virtual IP 2 (192.168.1.0 Network Takes Priority)
standby 2 priority 105 ! The Higher the # The Higher the Priority
standby 2 preempt ! Enables the router with the highest priority to immediately become the active router
standby 2 track 1 ! WAN SUBINTERFACE
!
Router bgp
network 10.10.10.0 mask 255.255.255.0 ! Broadcasts Gateway1 out the WAN through BGP
network 192.168.1.0 mask 255.255.255.0 ! Broadcasts Gateway2 out the WAN through BGP

Primary and Backup

Router 1:

track 1 interface Serial0/0/0.1 ip routing ! Points at the interface that needs to be Prioritized
interface FastEthernet0/0
description interface to LAN
ip address x.x.x.x 255.255.255.0
standby 1 ip ! Virtual IP
standby 1 priority 105 ! Higher Priority = Primary Router
standby 1 preempt ! Enables the router with the highest priority to immediately become the active router
standby 1 track 1 ! WAN SUBINTERFACE
!
Router bgp
network mask 255.255.255.0 ! Broadcasts Gateway out the WAN through BGP

Router 2:

track 1 interface Serial0/0/0.1 ip routing ! Points at the interface that needs to be Prioritized
interface FastEthernet0/0
description interface to LAN
ip address x.x.x.x 255.255.255.0
standby 1 ip ! Virtual IP
standby 1 priority 100 ! Lower Priority = Backup Router
standby 1 preempt ! Enables the router with the highest priority to immediately become the active router
standby 1 track 1 ! WAN SUBINTERFACE
!
Router bgp
network mask 255.255.255.0 ! Broadcasts Gateway out the WAN through BGP

This is what you should see in a Primary/Backup situation (notice how Router 1 is active):

Router1# show standby
Ethernet0 - Group 1
Local state is Active, priority 105, may preempt
Hellotime 3 sec, holdtime 10 sec
Next hello sent in 1.458
Virtual IP address is 171.16.6.100 configured
Active router is local
Standby router is 171.16.6.6 expires in 8.428
Virtual mac address is 0000.0c07.ac01
2 state changes, last state change 02:09:49
IP redundancy name is "hsrp-Et0-1" (default)
Priority tracking 1 interface, 1 up:
Interface Decrement State
Serial0 10 Up

Router2# show standby
Ethernet0 - Group 1
Local state is Standby, priority 100, may preempt
Hellotime 3 sec, holdtime 10 sec
Next hello sent in 1.814
Virtual IP address is 171.16.6.100
Active router is 171.16.6.5, priority 105 expires in 9.896
Standby router is local
3 state changes, last state change 00:10:21
IP redundancy name is "hsrp-Et0-1" (default)
Priority tracking 1 interface, 1 up:
Interface Decrement State
Serial1 10 Up

This is what it will look like during a successful fail-over (notice how the Router 2 is active and HSRP Priority was lowered on Router 1 to 95):

R1# show standby
Ethernet0 - Group 1
Local state is Standby, priority 95 (confgd 105), may preempt
Hellotime 3 sec, holdtime 10 sec
Next hello sent in 2.670
Virtual IP address is 171.16.6.100 configured
Active router is 171.16.6.6, priority 100 expires in 8.596
Standby router is local
4 state changes, last state change 00:01:45
IP redundancy name is "hsrp-Et0-1" (default)
Priority tracking 1 interface, 0 up:
Interface Decrement State
Serial0 10 Down

R2# show standby
Ethernet0 - Group 1
Local state is Active, priority 100, may preempt
Hellotime 3 sec, holdtime 10 sec
Next hello sent in 0.810
Virtual IP address is 171.16.6.100
Active router is local
Standby router is 171.16.6.5 expires in 9.028
Virtual mac address is 0000.0c07.ac01
4 state changes, last state change 00:01:38
IP redundancy name is "hsrp-Et0-1" (default)
Priority tracking 1 interface, 1 up:
Interface Decrement State
Serial1 10 Up

Load Sharing will be similar except both routers will have an active and a standby. Just make sure the correct group is active.

See also

  • Virtual Router Redundancy Protocol
    Virtual Router Redundancy Protocol
    The Virtual Router Redundancy Protocol is a computer networking protocol that provides for automatic assignment of available Internet Protocol routers to participating hosts...

     - standards-based alternative to HSRP
  • Gateway Load Balancing Protocol
    Gateway Load Balancing Protocol
    Gateway Load Balancing Protocol is a Cisco proprietary protocol that attempts to overcome the limitations of existing redundant router protocols by adding basic load balancing functionality....

     - Cisco proprietary router redundancy solution providing load balancing
  • Common Address Redundancy Protocol
    Common Address Redundancy Protocol
    The Common Address Redundancy Protocol or CARP is a protocol which allows multiple hosts on the same local network to share a set of IP addresses. Its primary purpose is to provide failover redundancy, especially when used with firewalls and routers. In some configurations CARP can also provide...

     - open source, patent-free and unrestricted alternative to HSRP and VRRP
  • First Hop Redundancy Protocols
    First Hop Redundancy Protocols
    A First Hop Redundancy Protocol is a computer networking protocol which is designed to protect the default gateway used on a subnetwork by allowing two or more routers to provide backup for that address; in the event of failure of the/an active router, the backup router will take over the address,...

    - List of default gateway redundancy protocols

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK