6. 设置hsrp切换时间
standby 组号 时间参数1 时间参数2
其中时间参数1表示路由器每间隔多长时间交换一次hello信息,以表明路由器是否出现故障或工作正常。时间参数2表示在多长时间内同组的其他路由器没有收到主路由器的信息,则宣布主路由器瘫痪。该设置的缺省值分别为3秒和10 秒。如果要更改缺省值,所有同hsrp组的路由器的该项设置必须一致。
7. 端口跟踪设置
standby 组号 track 端口号
该项设置为可选设置
该设置表示如果所监测的端口出现故障,则也进行路由器的切换。可以跟踪多外端口。
注意:如果主路由器上有多条线路被跟踪,则有一条线路出现故障时,就会切换到备份路由器上,即使其他都正常工作,直到主路由器该线路正常工作,才能重新发换过来。该项设置实现的功能在实际应用中完全可以由线路备份功能实现,而且在大多数情况下,该项设置也没有多大意义。
另外,hsrp还有很多其它设置及应用,如感兴请在Cisco站点或Cisco Document上查找,或与晓通技术支持中心联系。
★ 实例:
2511-1与2511-2互为路由器备份
2511-1的配置
2511-1#sho run
Building configuration…
Current configuratoin:
!
version 11.3
no service password -encryption
!
hostname 251l-l
!
enable password cisco
!
username 2505 password 0 cisco
no ip domain-lookup
!
interface Ethernet0
ip address 192.4.1.99 255.255.255.0
no ip redirects
standby 1 timers 5 15
standby 1 priority 110
standby 1 preempt
standby 1 authentication cisco
standby 1 ip 192.4.1.1
standby 1 track Serial0
standby 1 track Seriall
!
interface serial0
ip address l92.3.1.1 255.255.255.0