HSRP

Cisco’s Hot Standby Routing Protocol (HSRP) provides Workstations with a backup router in case it’s default gateway goes down. HSRP creates a virtual router with a virtual MAC address and a Virtual IP address.

Many lectures suggest that Windows has this feature. While it is true that we can add multiple default gateways this feature is only used at boot up time. In other words the host will ARP for the first default gateway on the list if that ARP fails it will continue down the list.

What happens when the host has successfully found the default gateway and it subsequently dies?

The host will need to be re-booted!

HSRP solves this problem because it is dynamic if the primary router dies the secondary will take over and the host will never know the difference.

Let’s take a look at the following scenario.

version 11.3
no service password-encryption
!
hostname Router_A
!
enable secret 5 $1$.s1R$iaEqZxLnYJo2QlZi8UNaO0
enable password
!
interface Ethernet0/0
ip address 10.0.0.1 255.0.0.0
no ip redirects
standby 1 priority 110
standby 1 preempt
standby 1 ip 10.0.0.3
!
interface Serial0/0
ip address 150.10.0.1 255.255.0.0
no ip mroute-cache
!
interface TokenRing0/0
no ip address
shutdown
ring-speed 16
!
interface FastEthernet1/0
no ip address
shutdown
!
router igrp 100
network 10.0.0.0
network 150.10.0.0
!
ip classless
no logging buffered
!
!
line con 0
exec-timeout 0 0
line aux 0
line vty 0 4
login
!
end

Configuration for Router_B

Current configuration:
!
version 11.2
!
hostname Router_B
!
!
!
interface Ethernet0
ip address 10.0.0.2 255.0.0.0
no ip redirects
standby 1 preempt
standby 1 ip 10.0.0.3
!
interface Ethernet1
no ip address
shutdown
!
interface Serial0
ip address 192.20.30.1 255.255.255.0
!
interface Serial1
no ip address
shutdown
!
router igrp 100
network 10.0.0.0
network 192.20.30.0
!
no ip classless5/27/98
!
!
line con 0
line aux 0
line vty 0 4
login
!
end

Configuration for Workstation A

v.jpg

c.jpg

The following is the result of putting the e0/0 interface in “shut” mode.

Router_A(config)#int e0/0
Router_A(config-if)#shut
Router_A(config-if)# 

 %STANDBY-6-STATECHANGE: Standby: 1: Ethernet0/0
 state Active    -> Init

 %LINK-5-CHANGED: Interface Ethernet0/0,changed state to administratively down

The following is the result of putting the e0/0 interface in “no shut” mode.

Router_A(config-if)#no shut
Router_A(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to up

%LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
%STANDBY-6-STATECHANGE: Standby: 1: Ethernet0/0 state Listen - Active

The following is the result of a successful ping from workstation A

Router_B#debug ip icmp
ICMP packet debugging is on
Router_B#
ICMP: echo reply sent, src 10.0.0.3, dst 10.0.0.4
ICMP: echo reply sent, src 10.0.0.3, dst 10.0.0.4
ICMP: echo reply sent, src 10.0.0.3, dst 10.0.0.4


A Networker Blog

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s