1、CiscoHSRP的配置双机热备经典案例 HSRP一般用于两台,也可以用于多台。必须在每台起HSRP上的路由器上配置。 When the HSRP is configured on a network segment, IT provides a virtual Media Access Control (MAC) address and an IP address that is shared among routers in a groupof routers that is running HSRP. One of these devices is sele
2、cted by the protocol to be the active router. The active router receives and routes packets destined for the group's MAC address. For n routers running HSRP, there are n + 1 IP and MAC addresses assigned. 但是aceive只有一台,standby只有一台,其实其他的都在监听状态。所以zyx说的是处在active和standby的状态的只有两台。 附一个配置实例: ver
3、sion 12.0 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname r1 ! enable password cisco ! ip subnet-zero (新版的IOS都支持全0/1子网) ! ! ! ! interface Ethernet0 ip address 136.147.107.101 255.255.0.0 no ip redirects no ip directed-
5、动地址,也是这台router 连接的网络的网关 */ standby 150 track Ethernet0 /* 定义监控的端口 */ ! interface Serial0 no ip address no ip directed-broadcast no ip mroute-cache shutdown no fair-queue ! ip classless ! ! line con 0 transport input none line 1 16 line aux 0 line vty 0 4 password cisco l
6、ogin ! end 配置基本HSRP例子: 提问 "当主用路由器当掉以后备份路由器可以接管主用路由器的IP地址和MAC地址 回答 Router1: Router1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router1(config)#interface FastEthernet 0/1 Router1(config-if)#ip address 172.22.1.3 255.255.255.0 Router1(config-if)#
7、standby 1 ip 172.22.1.1 Router1(config-if)#standby 1 priority 120 Router1(config-if)#exit Router1(config)#end Router1# Router2: Router2#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router2(config)#interface Fast