1. 程式人生 > >CCNA FHRP HSRP實驗

CCNA FHRP HSRP實驗

考試認證 思科認證

技術分享圖片

技術分享圖片

技術分享圖片

技術分享圖片

技術分享圖片

技術分享圖片

技術分享圖片

實驗拓撲

技術分享圖片

接口配置就略過了

唯一需要註意的是需要在4個路由器上配置靜態路由

Router2(config)#ip route 1.1.1.1 255.255.255.255 192.168.14.2

Router3(config)#ip route 1.1.1.1 255.255.255.255 192.168.25.2

反過來回包也是指定一下靜態路由

Router0(config)#ip route 192.168.1.0 255.255.255.0 192.168.14.1

Router1(config)#ip route 192.168.1.0 255.255.255.0 192.168.25.1

然後配置R2 HSRP 優先級120

Router2(config)#int f0/1

Router2(config-if)#standby 1 priority 120

Router2(config-if)#standby 1 ip 192.168.1.254

看下sh run

interface FastEthernet0/1

ip address 192.168.1.253 255.255.255.0

duplex auto

speed auto

standby version 2

standby 1 ip 192.168.1.254

R3 優先級110

Router3(config)#int f0/1

Router3(config-if)#st

Router3(config-if)#standby 1 ip

Router3(config-if)#standby 1 ip 192.168.1.254

Router3(config-if)#standby 1 pri

Router3(config-if)#standby 1 priority 110

%HSRP-6-STATECHANGE: FastEthernet0/1 Grp 1 state Speak -> Standby

已經可以看到接口狀態變了

看下兩個路由器上的standby 信息

Router2#show standby br

P indicates configured to preempt.

|

Interface Grp Pri P State Active Standby Virtual IP

Fa0/1 1 120 Active local 192.168.1.252 192.168.1.254

Router2#

Router3#show standby brief

P indicates configured to preempt.

|

Interface Grp Pri P State Active Standby Virtual IP

Fa0/1 1 110 Standby 192.168.1.253 local 192.168.1.254

Router3#

用pc ping 1.1.1.1 都是通的

技術分享圖片

把R2的鏈路斷開

Router2(config-if)#sh

Router2(config-if)#

%HSRP-6-STATECHANGE: FastEthernet0/1 Grp 1 state Active -> Init

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to administratively down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down

技術分享圖片

pc上有幾個丟包,但是很快就起來了,說明切換到備份節點上了

技術分享圖片

看下R3的日誌

Router3#

%HSRP-6-STATECHANGE: FastEthernet0/1 Grp 1 state Standby -> Active

Router3#sh standby brief

P indicates configured to preempt.

|

Interface Grp Pri P State Active Standby Virtual IP

Fa0/1 1 110 Active local unknown 192.168.1.254

R3已經變成老大了

R2 目前不可用

Router2#show standby brief

P indicates configured to preempt.

|

Interface Grp Pri P State Active Standby Virtual IP

Fa0/1 1 120 Init unknown unknown 192.168.1.254

Router2#

當鏈路恢復後,手動搶占

Router2(config-if)#standby 1 preempt

Router2(config)#do show standby brief

P indicates configured to preempt.

|

Interface Grp Pri P State Active Standby Virtual IP

Fa0/1 1 120 Speak unknown unknown 192.168.1.254

Router2(config)#

%HSRP-6-STATECHANGE: FastEthernet0/1 Grp 1 state Speak -> Standby

%HSRP-6-STATECHANGE: FastEthernet0/1 Grp 1 state Standby -> Active

Router2(config)#do show standby brief

P indicates configured to preempt.

|

Interface Grp Pri P State Active Standby Virtual IP

Fa0/1 1 120 Active local unknown 192.168.1.254

霸占成功

技術分享圖片

技術分享圖片

技術分享圖片

CCNA FHRP HSRP實驗