Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms

Providing Default Gateway Redundancy to Clients

HSRP: Hot Standby Router Protocol

HSRP uses a priority scheme to determine which HSRP configured router is to be the default active router. To configure a router as the active router, you assign it a priority that is higher than the priority of all the other HSRP configured routers. The default priority is 100, so if you configure just one router to have a higher priority, that router will be the default active router.

HSRP works by the exchange of multicast (224.) messages that advertise priority among HSRP configured routers. When the active router fails to send a hello message within a configurable period of time, the standby router with the highest priority becomes the active router. The transition of packet forwarding functions between routers is completely transparent to all hosts on the network.

HSRP configured routers exchange three types of multicast messages:
Hello - The hello message conveys to other HSRP routers the routers HSRP priority and state information. By default, an HSRP router sends hello messages every three seconds.
Coup - When a standby router assumes the function of the active router, it sends a coup message.
Resign - A router that is the active router sends this message when it is about to shut down or when a router that has a higher priority sends a hello message.

At any one time, HSRP configured routers are in one of the following states:
Active - The router is performing packet transfer functions.
Standby - The router is prepared to assume packet transfer functions if the active router fails.
Speaking and listening - The router is sending and receiving hello messages.
Listening - The router is receiving hello messages.

ICMP redirects are DISABLED by default when you're running HSRP, because hosts would end up with the real MAC Address.

HSRP uses a third (Common)  IP address  and a special MAC address on the cable. So when everything is up, A is actually listening for two addresses - both its normal address and the HSRP address. If router A goes down, router B only grabs the HSRP address. The highest priority router in an HSRP group is the winner of the MAC address.

The random / common  MAC address is a based on the HSRP GROUP NUMBER assigned to the interface.

Configuration Examples


router 1 - Configured to be ACTIVE and Tracking HSSI interface 0/0.1 with password.
!
interface FastEthernet1/0/0
 description POLNET            > Change address to 240
 ip address 204.178.220.202 255.255.255.0
 no ip redirects
 no ip directed-broadcast
 full-duplex
 no mop enabled
 standby 10 timers 5 10
 standby 10 priority 108
 standby 10 preempt
 standby 10 authentication P0LPASSWORD
 standby 10 ip 204.178.220.240
 standby 10 track Hssi0/0.1

 standby 10 preempt delay minimum 120
!
router 2 - Configured to be Standby and Tracking HSSI interface 0/0.1 with password.
!
interface FastEthernet1/0 description POLNET            > Change address to 240
 ip address 204.178.220.203 255.255.255.0
 no ip redirects
 no ip directed-broadcast
 full-duplex
 standby 10 timers 5 10
 standby 10 preempt
 standby 10 authentication P0LPASSWORD
 standby 10 ip 204.178.220.240
 standby 10 track Hssi0/0.1

standby 10 preempt delay minimum 120

Commands
   
POL-7507-1#sho stand fa 1/0/0
FastEthernet1/0/0 - Group 10
 
Local state is Active, priority 108, may preempt
  Hellotime 5 holdtime 10 configured hellotime 5 sec holdtime 10 sec
  Next hello sent in 00:00:01.192
  Hot standby IP address is 204.178.220.240 configured
  Active router is local
  Standby router is 204.178.220.203 expires in 00:00:05
  Tracking interface states for 1 interface, 1 up:
    Up   Hssi0/0.1
POL-7507-2#sho stand fa 1/0
FastEthernet1/0 - Group 10
 
Local state is Standby, priority 100, may preempt
  Hellotime 5 holdtime 10 configured hellotime 5 sec holdtime 10 sec
  Next hello sent in 00:00:04.084
  Hot standby IP address is 204.178.220.240 configured
  Active router is 204.178.220.202 expires in 00:00:09
  Standby router is local
  Tracking interface states for 1 interface, 1 up:
    Up   Hssi0/0.1

 
POL-7507-1#sho stand bri
                     P indicates configured to preempt.
                     |
Interface   Grp Prio P State    Active addr     Standby addr    Group addr
Fa1/0/0     10  108  P
Active   local           204.178.220.203 204.178.220.240
Et4/0/0     20  108  P Active   local           205.229.193.3   205.229.193.1
Et4/0/1     30  108  P Active   local           204.178.221.6   204.178.221.1
Et4/0/2     40  108  P Active   local           208.193.93.250  208.193.93.249
Et4/0/3     70  108  P Active   local           208.193.92.3    208.193.92.1
Et4/0/4     50  108  P Active   local           198.242.44.203  198.242.44.240
Et4/0/5     80  108  P Active   local           208.225.164.3   208.225.164.1
Et4/0/7     60  108  P Active   local           unknown         192.168.1.1
 POL-7507-2#sho stand bri
                    P indicates configured to preempt.
                     |
Interface   Grp Prio P State    Active addr     Standby addr    Group addr
Fa1/0       10  100  P
Standby  204.178.220.202 local           204.178.220.240
Et4/0       20  100  P Standby  205.229.193.2   local           205.229.193.1
Et4/1       30  100  P Standby  204.178.221.2   local           204.178.221.1
Et4/2       40  100  P Standby  208.193.93.251  local           208.193.93.249
Et4/3       70  100  P Standby  208.193.92.2    local           208.193.92.1
Et4/4       50  100  P Standby  198.242.44.202  local           198.242.44.240
Et4/5       80  100  P Standby  208.225.164.2   local           208.225.164.1
POL-7507-2#
   


 
 



Fault Tolerant / Load Balancing Configurations

Multigroup HSRP (MHSRP) is an extension of HSRP that allows a single router interface to belong to more than one Hot Standby group.
You can design a environment to have different routers take traffic (offload) and have fallbacks kick in if needed.
This works because the MAC address created revolves around the standby group.
 

Example

hostname RouterA

hostname RouterB

interface ethernet 0
!Priority ON
ip address 1.0.0.1 255.0.0.0
standby 1 ip 1.0.0.3
standby 1 priority 110
standby 1 preempt

!Standby
standby 2 ip 1.0.0.4
standby 2 preempt


interface ethernet 0
ip address 1.0.0.2 255.0.0.0

!Standby
standby 1 ip 1.0.0.3
standby 1 preempt

!Priority ON
standby 2 ip 1.0.0.4
standby 2 priority 110
standby 2 preempt

 

hostname RouterB
!
interface ethernet 0
ip address 1.0.0.2 255.0 0.0
standby 1 ip 1.0.0.5
standby 1 priority 110
standby 1 preempt
standby 1 authentication sclara
standby 2 ip 1.0.0.6
standby 2 priority 110
standby 2 preempt
standby 2 authentication mtview
standby 3 ip 1.0.0.7
standby 3 preempt
standby 3 authentication svale
!
 

  


Data flows on MULTICAST DLC and IP Address using port 1985

DLC:  ----- DLC Header -----
DLC:
DLC:  Frame 23 arrived at  12:34:21.7570; frame size is 62 (003E hex) bytes.
DLC:  Destination = Multicast 01005E000002
DLC:  Source      = Station Cisco 07AC0A
DLC:  Ethertype   = 0800 (IP)
DLC:
IP: ----- IP Header -----
IP:
IP: Version = 4, header length = 20 bytes
IP: Type of service = 00
IP:       000. .... = routine
IP:       ...0 .... = normal delay
IP:       .... 0... = normal throughput
IP:       .... .0.. = normal reliability
IP: Total length    = 48 bytes
IP: Identification  = 0
IP: Flags           = 0X
IP:       .0.. .... = may fragment
IP:       ..0. .... = last fragment
IP: Fragment offset = 0 bytes
IP: Time to live    = 2 seconds/hops
IP: Protocol        = 17 (UDP)
IP: Header checksum = 2F3E (correct)
IP: Source address      = [204.178.220.202]
IP: Destination address = [224.0.0.2]
IP: No options
IP:
UDP: ----- UDP Header -----
UDP:
UDP: Source port      = 1985 (Cisco HSRP)
UDP: Destination port = 1985 (Cisco HSRP)
UDP: Length           = 28
UDP: Checksum         = D8CC (correct)
UDP: [20 byte(s) of data]
UDP:
HSRP:
HSRP: Version                = 0
HSRP: Opcode                 = 0 (Hello)
HSRP: Sending router's state = 16 (Active)
HSRP: Hello time             = 5
HSRP: Hold time              = 10
HSRP: Router's priority      = 108
HSRP: Group number           = 10
HSRP: Reserved
HSRP: Authentication         = "P0LPASSWORD"
HSRP: IP address             = 204.178.220.240
 


  HSRP VRRP GLBP
Standard Proprietary: RFC 2281 YES: RFC 2338 NO
Router Roles Active, Standby, Listen Master, Backup AVG, AVF
Load Balancing Hard: Multigroup Hard: Multigroup Easy: Built in
Interface Tracking Yes - minus 10 No Yes
Virtual MAC: XX Vlan 0000.0c07.acXX 0000.5e00.01.XX Assigned by AVG

Virtual Router Redundancy Protocol (VRRP)

RTRA  (Blue is Master | Green is Backup) RTRB

config)# interface vlan 50
(config-if)# ip address 192.168.1.10 255.255.255.0
(config-if)# vrrp 1 priority 200
(config-if)# vrrp 1 ip 192.168.1.1

(config-if)# vrrp 2 priority 100
(config-if)# no vrrp 2 preempt
(config-if)# vrrp 2 ip 192.168.1.2

(config)# interface vlan 50
(config-if)# ip address 192.168.1.11 255.255.255.0
(config-if)# vrrp 1 priority 100
(config-if)# no vrrp 1 preempt
(config-if)# vrrp 1 ip 192.168.1.1
(config-if)# vrrp 2 priority 200
(config-if)# vrrp 2 ip 192.168.1.2
   

 

Gateway Load Balancing Protocol (GLBP)

RTRA  (Blue is Master | Green is Backup) RTRB
(config)# interface vlan 50
(config-if)# ip address 192.168.1.10 255.255.255.0
(config-if)# glbp 1 priority 200
(config-if)# glbp 1 preempt
(config-if)# glbp 1 ip 192.168.1.1
(config)# interface vlan 50
(config-if)# ip address 192.168.1.11 255.255.255.0
(config-if)# glbp 1 priority 150
(config-if)# glbp 1 preempt
(config-if)# glbp 1 ip 192.168.1.1