|
如何配置HSRP?你可以在路由器的接口配置模式使用standby命令完成几乎所有HSRP配置。让我们考虑在配置图表中显示的网络所采用的步骤。 对于路由器1: 1.配置以太网接口上的IP地址 2.配置备用IP地址3.配置备用抢先(通过抢先,只要路由器1可用,将总是主路由器。) 对于路由器2: 1.配置以太网接口上的IP地址 2.配置备用IP地址 3.配置备用优先小于100(在本例中,是99。) 现在,我们考虑样例网络的配置。 路由器 1 (show running-config output) inte***ce Ethernet0/0ip address 10.1.1.1 255.255.255.0standby ip 10.1.1.3standby preempt Router1# show standbyEthernet0/0 - Group 0State is Active2 state changes, last state change 00:00:29Virtual IP address is 10.1.1.3Active virtual MAC address is 0000.0c07.ac00Local virtual MAC address is 0000.0c07.ac00 (default)Hello time 3 sec, hold time 10 secNext hello sent in 0.692 secsPreemption enabledActive router is localStandby router is 10.1.1.2, priority 99 (expires in 8.097 sec)Priority 100 (default 100)IP redundancy name is "hsrp-Et0/0-0" (default) Router1# 路由器 2 (show running-config output) inte***ce Ethernet0/0ip address 10.1.1.2 255.255.255.0standby ip 10.1.1.3standby priority 99 Router2# show standbyEthernet0/0 - Group 0Local state is Standby, priority 99Hellotime 3 sec, holdtime 10 secNext hello sent in 1.014Virtual IP address is 10.1.1.3 configuredActive router is 10.1.1.1, priority 100 expires in 7.159Standby router is local4 state changes, last state change 00:02:02 Router2# 当在特权模式时,可以使用show standby命令查看HSRP状态。这条命令会告诉哪个路由器是活动的,哪个是备份的,以及很多其他统计信息。 在PC上,缺省IP地址应该指向10.1.1.3,而不是路由器中的一个。这样,假如某台路由器出现故障,另一台将接管。而且甚至能够利用这个冗 余在白天将活动路由器封闭,由于HSRP故障备份替换时间少于10秒。 HSRP是一个保证高可用性和路由器冗余的有用工具。当然,也有几个HSRP选项我们没有在本文中具体说明。要获得更多信息,请查看Cisco HSRP FAQ。 |
|