CCNA FHRP HSRP实验

e22c2aa858174010ac68936220d92ee0

e3d17d55f3cf479b80aeb2b96e265375

52ee95306e9f4a9187f8f6b6d4d967ee

45047a2619f64419acc66c6077622a2f

e96bf9802e104f82978d6876f3be80fb

d1f9c16b0f204b4ea7240f0a3d6a9c88

ad86bc73756d4778be9687d519a7c9e4

实验拓扑

c5b2deecd04a4e05bef72897c6f630be

接口配置就略过了

唯一需要注意的是需要在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 都是通的

67cf8919aba34973823f571d289431e3

把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

70ea72848cc8454c8e0db364e55522c0

pc上有几个丢包,但是很快就起来了,说明切换到备份节点上了

3378944d0e884866996c4085915292bc

看下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

霸占成功

cdf8f7ff01374b5b89111fd40f36229d

0486008c96ef4c52a256dc0578a2bd07

cfb4d36d5dcd4d20a8ed5261ef4bc125

猜你喜欢

转载自blog.51cto.com/433266/2113704