思科HSRP配置实例

本文提供了一个HSRP(热备份路由协议)的配置示例,详细介绍了如何设置路由器间的备份及故障转移机制,包括定时器参数调整、优先级设定等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

实例如下图示:

HSRP
默认每3秒种发送一个hello消息。
standby <number> timers <间隔时间> <没收到的间隔时间切换>
如:
standby 39 timers 5 15 定义39组5秒交换一次hello信息,如15秒内没收到hello信息将开始切换。
config t
track <track-number> interface <interface-name> line-protocol
int vlan<number>
 standby <number> track <track-number>
如:
config t
track 1 interface FastEthernet0/1 line-protocol
int vlan39
 standby 39 track 1

完整配置命令如下:
R1:
interface FastEthernet0/0
 ip address 12.1.1.1 255.255.255.0
 no sh
interface FastEthernet0/1
 ip address 13.1.1.1 255.255.255.0
 no sh
router rip
 version 2
 network 12.0.0.0
 network 13.0.0.0

CoreSW1:
vlan database
 vlan38
 vlan39
config t
interface Port-channel1
 switchport mode trunk
 no sh
int range f1/14 - 15
 switch mode trunk 
 duplex full 
 speed 1000
 channel-group 1 mode on
 no sh
interface FastEthernet0/0
 ip address 12.1.1.2 255.255.255.0
 no sh
track 1 interface FastEthernet0/0 line-protocol
track 2 interface Port-channel1 line-protocol
int vlan38
 ip add 10.38.38.251 255.255.255.0
 ip helper-address 10.39.39.39
 standby 38 ip 10.38.38.254
 standby 38 timers 5 15
 standby 38 priority 130
 standby 38 preempt
 standby 38 track 1
 standby 38 track 2
int vlan39
 ip address 10.39.39.251 255.255.255.0
 ip helper-address 10.39.39.39
 standby 39 ip 10.39.39.254
 standby 39 timers 5 15
 standby 39 priority 150
 standby 39 preempt
 standby 39 track 1
 standby 39 track 2
router rip 
 version 2
 network 10.0.0.0
 network 12.0.0.0
int f1/0  //接PC1
 switch port access vlan 38
 duplex full 
 speed 1000

CoreSW2:
vlan database
 vlan38
 vlan39
config t
interface Port-channel1
 switchport mode trunk
 no sh
int range f1/14 - 15
 switch mode trunk 
 duplex full 
 speed 1000
 channel-group 1 mode on
 no sh
interface FastEthernet0/1
 ip address 13.1.1.3 255.255.255.0
 no sh
track 1 interface FastEthernet0/1 line-protocol
track 2 interface Port-channel1 line-protocol
int vlan38
 ip add 10.38.38.252 255.255.255.0
 ip helper-address 10.39.39.39
 standby 38 ip 10.38.38.254
 standby 38 timers 5 15
 standby 38 priority 150
 standby 38 preempt
 standby 38 track 1
 standby 38 track 2
int vlan39
 ip address 10.39.39.252 255.255.255.0
 ip helper-address 10.39.39.39
 standby 39 ip 10.39.39.254
 standby 39 timers 5 15
 standby 39 priority 130
 standby 39 preempt
 standby 39 track 1
 standby 39 track 2
router rip 
 version 2
 network 10.0.0.0
 network 13.0.0.0
int f1/0  //接PC2
 switch port access vlan 39
 duplex full 
 speed 1000 


PC1:
ip 10.38.38.1 255.255.255.0 10.38.38.254

PC2:
ip 10.39.39.2 255.255.255.0 10.39.39.254

 

转载于:https://www.cnblogs.com/vincent-liang/p/6549247.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值