当前位置:文档之家› 实验1+热备份路由器协议

实验1+热备份路由器协议

2008年10月2日星期四 实验6.5.1:热备份路由器协议 CCNP-3 纯净水 1 实验目标: 通过拓扑所示,在2台路由器上启用HSRP来对网络提供冗余. 步骤1:配置拓扑连接. 7200(config)#interface fastEthernet 1/0 7200(config-if)#ip address 10.1.1.3 255.255.255.0 7200(config-if)#speed 10 ß更改接口速率为10M,只有修改接口速率才能更改接口为全双工模式 7200(config-if)#duplex full ß修改接口为全双工模式 7200(config-if)#speed 100 7200(config-if)#ip ospf message-digest-key 1 md5 cisco 7200(config-if)#no shutdown 7200(config)#interface fastEthernet 2/0 7200(config-if)#ip add 10.1.2.3 255.255.255.0 7200(config-if)#speed 10 7200(config-if)#duplex full 7200(config-if)#speed 100 7200(config-if)#ip ospf message-digest-key 1 md5 cisco 7200(config-if)#no shutdown 3640(config)#interface fastEthernet 1/0 3640(config-if)#ip address 10.1.1.4 255.255.255.0 3640(config-if)#speed 10 3640(config-if)#duplex full 3640(config-if)#speed 100 3640(config-if)#ip ospf message-digest-key 1 cisco 3640(config-if)#no shutdown 3640(config)#interface fastEthernet 2/0 3640(config-if)#ip address 10.1.2.2 255.255.255.0 3640(config-if)#speed 10 3640(config-if)#duplex full 3640(config-if)#speed 100 3640(config-if)#ip ospf message-digest-key 1 cisco 3640(config-if)#no shutdown 7200(config)#router ospf 1 ß启用OSPF协议 7200(config-router)#router-id 1.1.1.1 7200(config-router)#net 1.1.1.1 0.0.0.0 a 0 7200(config-router)#net 10.1.2.0 0.0.0.255 a 0 7200(config-router)#net 10.1.1.0 0.0.0.255 a 0 2008年10月2日星期四 实验6.5.1:热备份路由器协议 CCNP-3 纯净水 2 7200(config-router)#area 0 authentication message-digest 3640(config)#router ospf 1 3640(config-router)#router-id 2.2.2.2 3640(config-router)#net 2.2.2.2 0.0.0.0 a 0 3640(config-router)#net 10.1.1.0 0.0.0.255 a 3640(config-router)#net 10.1.1.0 0.0.0.255 a 0 3640(config-router)#net 10.1.2.0 0.0.0.255 a 0 3640(config-router)#area 0 authentication message-digest 步骤2: (1)在2台路由器中启用HSRP协议; (2)通过抢占优先级命令将7200配置为Active router; (3)使用MD5加密认证.,密码:cisco; (4)配置端口监视,预防其它端口失效(详细内容见HSRP笔记和实验). 7200(config)#interface fastEthernet 2/0 7200(config-if)#standby 1 ip 10.1.2.1 ß启用HSRP 组ID=1 Virtual IP address=10.1.2.1 7200(config-if)#standby 1 priority 105 ß更改HSRP优先级为105 *Oct 2 16:32:58.379: %HSRP-5-STATECHANGE: FastEthernet2/0 Grp 1 state Speak -> Standby ßHSRP角色选举与OSPF DR/BDR选举相同都将先选举备份路由器即Standby角色在选举主要路由器即Active角色. *Oct 2 16:32:58.879: %HSRP-5-STATECHANGE: FastEthernet2/0 Grp 1 state Standby -> Active 7200(config-if)#standby 1 preempt ß启用抢占. 7200(config-if)#standby 1 authentication md5 key-string cisco ß启用HSRP MD5 Authentication. 7200(config-if)#standby 1 track fastEthernet 1/0 20 ß通过端口监视,监视F1/0接口状态如果失效将此HSRP路由优先级减20. 3640(config)#interface fastEthernet 2/0 3640(config-if)#standby 1 ip 10.1.2.1 3640(config-if)#standby 1 authentication md5 key-string cisco 3640(config-if)#standby 1 track fastEthernet 1/0 20 ß通过端口监视,监视F1/0接口状态如果失效将此HSRP路由优先级减20. 3640(config-if)#standby 1 preempt ß端口监视命令要与抢占命令一起使用才能生效. *Mar 1 00:55:52.235: %HSRP-4-BADAUTH: Bad authentication from 10.1.2.3, group 1, remote state Active *Mar 1 00:56:11.359: %HSRP-5-STATECHANGE: FastEthernet2/0 Grp 1 state Speak -> Standby 步骤3:查看配置结果并用PC访问WEB server. 2008年10月2日星期四 实验6.5.1:热备份路由器协议 CCNP-3 纯净水 3 步骤4:关掉其中一个接口查看HSRP冗余效果. 7200(config)#int fastEthernet 2/0 7200(config-if)#shutdown *Oct 2 16:51:07.015: %HSRP-5-STATECHANGE: FastEthernet2/0 Grp 1 state Active -> Init *Oct 2 16:51:07.059: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on FastEthernet2/0 from FULL to DOWN, Neighbor Down: Interface down or detached *Oct 2 16:51:09.031: %LINK-5-CHANGED: Interface FastEthernet2/0, changed state to administratively down *Oct 2 16:51:09.035: %ENTITY_ALARM-6-INFO: ASSERT INFO Fa2/0 Physical Port Administrative State Down *Oct 2 16:51:10.031: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet2/0, changed state to down 3640# *Mar 1 01:10:15.679: %HSRP-5-STATECHANGE: FastEthernet2/0 Grp 1 state Standby -> Active ß成为Active router. -------------PC ping WEB server------------- C:\>ping 10.1.1.5 Pinging 10.1.1.5 with 32 bytes of data: Reply from 10.1.1.5: bytes=32 time=266ms TTL=126 Reply from 10.1.1.5: bytes=32 time=97ms TTL=127 Reply from 10.1.1.5: bytes=32 time=28ms TTL=127 Reply from 10.1.1.5: bytes=32 time=14ms TTL=127 Ping statistics for 10.1.1.5: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 14ms, Maximum = 266ms, Average = 101ms

相关主题