Configuring HSRP:
·
Hot
Standby Redundancy Protocol
·
Cisco
Proprietary
·
Default
priority is 100
·
Default
MAC address for Cisco: 0000.0c07.acxx -> xx is the HSRP Group number
·
There
is no preemption by default
R1----LAN------R2-------LAN------R4
(10.1.124.0/24)
R1----Ser1/0---------------------------Ser1/0----R3
10.1.1.1 10.1.1.3
Configuring
HSRP between R1 and R2:
R1(config-if)#
R1(config-if)#do
sho run int fa0/0
Building
configuration...
Current
configuration : 164 bytes
!
interface
FastEthernet0/0
ip address 10.1.124.1 255.255.255.0
duplex auto
speed auto
standby 1 ip
10.1.124.10
standby 1 priority 150
standby 1 preempt
end
R1(config-if)#
R1(config-if)#
*Mar 1 00:14:53.451: %HSRP-5-STATECHANGE:
FastEthernet0/0 Grp 1 state Speak -> Standby
*Mar 1 00:14:53.951: %HSRP-5-STATECHANGE:
FastEthernet0/0 Grp 1 state Standby -> Active
R2(config-if)#do show run int fa0/0
Building
configuration...
Current
configuration : 140 bytes
!
interface
FastEthernet0/0
ip address 10.1.124.2 255.255.255.0
duplex auto
speed auto
standby 1 ip
10.1.124.10
standby 1 preempt
end
R2(config-if)#
R2(config-if)#
*Mar 1 00:15:13.895: %HSRP-5-STATECHANGE:
FastEthernet0/0 Grp 1 state Speak -> Standby
R4(config-if)#do show run int fa0/0
Building
configuration...
Current
configuration : 95 bytes
!
interface
FastEthernet0/0
ip address 10.1.124.4 255.255.255.0
duplex auto
speed auto
end
R4(config-if)#
Verification:
R1#show standby
FastEthernet0/0
- Group 1
State is Active
2 state changes, last state change 00:17:58
Virtual IP address is 10.1.124.10
Active virtual MAC address is 0000.0c07.ac01
Local virtual MAC address is 0000.0c07.ac01
(v1 default)
Hello time 3 sec, hold time 10 sec
Next hello sent in 1.488 secs
Preemption enabled
Active router is local
Standby router is
10.1.124.2, priority 100 (expires in 7.000 sec)
Priority 150 (configured 150)
IP redundancy name is
"hsrp-Fa0/0-1" (default)
R1#
R2#show standby
FastEthernet0/0
- Group 1
State is Standby
1 state change, last state change 00:18:31
Virtual IP address is 10.1.124.10
Active virtual MAC address is 0000.0c07.ac01
Local virtual MAC address is 0000.0c07.ac01
(v1 default)
Hello time 3 sec, hold time 10 sec
Next hello sent in 1.476 secs
Preemption enabled
Active router is
10.1.124.1, priority 150 (expires in 6.972 sec)
Standby router is local
Priority 100 (default 100)
IP redundancy name is
"hsrp-Fa0/0-1" (default)
R2#
R4#ping 10.1.124.10
Type
escape sequence to abort.
Sending
5, 100-byte ICMP Echos to 10.1.124.10, timeout is 2 seconds:
.!!!!
Success
rate is 80 percent (4/5), round-trip min/avg/max = 4/26/48 ms
R4#telnet 10.1.124.10
Trying
10.1.124.10 ... Open
User
Access Verification
Password:
R1>
Observation:
·
HSRP
is up between R1 and R2
·
R1
is Active router
·
R2
is Standby router
·
That
is the reason when R4 tried to telnet 10.1.124.10, it went to R1
·
Now,
let me shut the interface in R1 router and see
R1(config)#int fa0/0
R1(config-if)#shut
R1(config-if)#
*Mar 1 00:37:12.439: %HSRP-5-STATECHANGE:
FastEthernet0/0 Grp 1 state Active -> Init
R1(config-if)#
*Mar 1 00:37:14.447: %LINK-5-CHANGED: Interface
FastEthernet0/0, changed state to administratively down
*Mar 1 00:37:15.447: %LINEPROTO-5-UPDOWN: Line protocol
on Interface FastEthernet0/0, changed state to down
R1(config-if)#
R2(config)#
*Mar 1 00:37:12.879: %HSRP-5-STATECHANGE:
FastEthernet0/0 Grp 1 state Standby -> Active
R2(config)#
R1(config-if)#do show standby
FastEthernet0/0
- Group 1
State is Init
(interface down)
3 state changes, last state change 00:00:47
Virtual IP address is 10.1.124.10
Active virtual MAC address is unknown
Local virtual MAC address is 0000.0c07.ac01
(v1 default)
Hello time 3 sec, hold time 10 sec
Preemption enabled
Active router is unknown
Standby router is unknown
Priority 150 (configured 150)
IP redundancy name is
"hsrp-Fa0/0-1" (default)
R1(config-if)#
R2(config)#do show standby
FastEthernet0/0
- Group 1
State is Active
2 state changes, last state change 00:01:20
Virtual IP address is 10.1.124.10
Active virtual MAC address is 0000.0c07.ac01
Local virtual MAC address is 0000.0c07.ac01
(v1 default)
Hello time 3 sec, hold time 10 sec
Next hello sent in 0.756 secs
Preemption enabled
Active router is local
Standby router is unknown
Priority 100 (default 100)
IP redundancy name is
"hsrp-Fa0/0-1" (default)
R2(config)#
R4#ping 10.1.124.10
Type
escape sequence to abort.
Sending
5, 100-byte ICMP Echos to 10.1.124.10, timeout is 2 seconds:
!!!!!
Success
rate is 100 percent (5/5), round-trip min/avg/max = 4/22/52 ms
R4#
R4#telnet 10.1.124.10
Trying
10.1.124.10 ... Open
User
Access Verification
Password:
R2>
Observation:
·
Shut
the Fa0/0 interface in R1
·
Now,
R2 is Active router
·
R1
is Standby router
·
That
is the reason when R4 tried to telnet 10.1.124.10, it went to R2
·
Now,
let me Bring back R1 as Active
R1(config-if)#no shut
R1(config-if)#
*Mar 1 00:39:12.483: %HSRP-5-STATECHANGE:
FastEthernet0/0 Grp 1 state Listen -> Active
R1(config-if)#
*Mar 1 00:39:12.915: %LINK-3-UPDOWN: Interface
FastEthernet0/0, changed state to up
*Mar 1 00:39:13.915: %LINEPROTO-5-UPDOWN: Line
protocol on Interface FastEthernet0/0, changed state to up
R1(config-if)#
R2(config)#
*Mar 1 00:39:12.927: %HSRP-5-STATECHANGE:
FastEthernet0/0 Grp 1 state Active -> Speak
R2(config)#
*Mar 1 00:39:22.927: %HSRP-5-STATECHANGE:
FastEthernet0/0 Grp 1 state Speak -> Standby
R2(config)#
·
Now,
let me configure interface tracking in R1 router
R1(config-if)#standby 1 track serial 1/0 51
R3(config-if)#int
ser1/0
R3(config-if)#shut
R3(config-if)#
R1(config-if)#
*Mar 1 00:41:15.987: %TRACKING-5-STATE: 1
interface Se1/0 line-protocol Up->Down
*Mar 1 00:41:16.647: %LINEPROTO-5-UPDOWN: Line
protocol on Interface Serial1/0, changed state to down
R1(config-if)#
*Mar 1 00:41:18.555: %HSRP-5-STATECHANGE:
FastEthernet0/0 Grp 1 state Active -> Speak
R1(config-if)#
*Mar 1 00:41:28.555: %HSRP-5-STATECHANGE: FastEthernet0/0
Grp 1 state Speak -> Standby
R1(config-if)#
R2(config)#
*Mar 1 00:39:12.927: %HSRP-5-STATECHANGE:
FastEthernet0/0 Grp 1 state Active -> Speak
R2(config)#
*Mar 1 00:39:22.927: %HSRP-5-STATECHANGE:
FastEthernet0/0 Grp 1 state Speak -> Standby
R2(config)#
*Mar 1 00:41:18.907: %HSRP-5-STATECHANGE:
FastEthernet0/0 Grp 1 state Standby -> Active
R2(config)#
R1(config-if)#do show standby
FastEthernet0/0
- Group 1
State is Standby
6 state changes, last state change 00:00:37
Virtual IP address is 10.1.124.10
Active virtual MAC address is 0000.0c07.ac01
Local virtual MAC address is 0000.0c07.ac01
(v1 default)
Hello time 3 sec, hold time 10 sec
Next hello sent in 1.140 secs
Preemption enabled
Active router is 10.1.124.2, priority 100
(expires in 7.112 sec)
Standby router is local
Priority 99
(configured 150)
Track interface Serial1/0 state Down
decrement 51
IP redundancy name is
"hsrp-Fa0/0-1" (default)
R1(config-if)#
R2(config)#do show standby
FastEthernet0/0
- Group 1
State is Active
5 state changes, last state change 00:01:14
Virtual IP address is 10.1.124.10
Active virtual MAC address is 0000.0c07.ac01
Local virtual MAC address is 0000.0c07.ac01
(v1 default)
Hello time 3 sec, hold time 10 sec
Next hello sent in 0.700 secs
Preemption enabled
Active router is local
Standby router is 10.1.124.1, priority 99
(expires in 8.772 sec)
Priority 100 (default 100)
IP redundancy name is
"hsrp-Fa0/0-1" (default)
R2(config)#
Observation:
·
Interface
tracking is configured in R1, for Ser1/0
·
Its
configured in such a way that if Ser1/0 goes down, R1’s HSRP will decrement by
51 and becomes 99
·
Once
the R1’s Ser1/0 is down, R1’s HSRP priority became 99 and R2 became Active.
R1(config-if)#no
shut
*Mar 1 00:43:05.995: %TRACKING-5-STATE: 1
interface Se1/0 line-protocol Down->Up
*Mar 1 00:43:06.511: %HSRP-5-STATECHANGE:
FastEthernet0/0 Grp 1 state Standby -> Active
*Mar 1 00:43:06.639: %LINEPROTO-5-UPDOWN: Line
protocol on Interface Serial1/0, changed state to up
R1(config-if)#
R2(config)#
*Mar 1 00:43:06.939: %HSRP-5-STATECHANGE:
FastEthernet0/0 Grp 1 state Active -> Speak
R2(config)#
*Mar 1 00:43:16.939: %HSRP-5-STATECHANGE:
FastEthernet0/0 Grp 1 state Speak -> Standby
R2(config)#
No comments:
Post a Comment