应用场景描述:<?xml:namespace prefix = o />
随着公司业务的发展,公司对互联网的访问要求越来越高,因此公司决定采用冗余的路由器并申请了2条连接到互联网上,以保证互联网的访问实时畅通
使用到的相关知识点总结 :
1:standby 组号 ip 地址 配置HSRP
2:standby 组号 priority 优先级数值 设置优先级
3:standby 组号 preempt 设置占先权
4:standby 组号 track 要跟踪的接口号 减去的值
5: sh standby brief 查看HSRP配置
注意所有配置都是在接口模式下配置的
步骤:
r1的配置:
ena
conf t
host r1
int e0/0
ip add 100.0.0.1 255.0.0.0
no sh
exit
int e0/1
ip add 192.168.10.1 255.255.255.0
no sh
standby 1 ip 192.168.10.3
standby 1 priority 150
standby 1 track e0/0 60
standby 1 preempt
standby 2 ip 192.168.10.4
standby 2 preempt
exit
exit
wri
r2的配置:
ena
conf t
host r2
int e0/0
ip add 100.0.0.2 255.0.0.0
no sh
exit
int e0/1
ip add 192.168.10.2 255.255.255.0
no sh
standby 1 ip 192.168.10.3
standby 1 preempt
standby 2 ip 192.168.10.4
standby 2 priority 150
standby 2 track e0/0 60
standby 2 preempt
exit
exit
验证结果:
r1#sh standby bri
P indicates configured to preempt.
Interface Grp Prio P State Active Standby Virtual IP
Et0/1 1 150 P Active local 192.168.10.2 192.168.10.3
Et0/1 2 100 P Standby 192.168.10.2 local 192.168.10.4
***********************************************************r2#sh standby e0/1 bri
Interface Grp Prio P State Active Standby Virtual IP
Et0/1 1 100 P Standby 192.168.10.1 local 192.168.10.3
Et0/1 2 150 P Active local 192.168.10.1 192.168.10.4
***********************************************************sh r1的e0/0关闭后:
***************************************************
r1#sh standby bri
P indicates configured to preempt.
Interface Grp Prio P State Active Standby Virtual IP
Et0/1 1 90 P Speak 192.168.10.2 unknown 192.168.10.3
Et0/1 2 100 P Standby 192.168.10.2 local 192.168.10.4
******************************************************
r2#sh standby e0/1 b
P indicates configured to preempt.
Interface Grp Prio P State Active Standby Virtual IP
Et0/1 1 100 P Active local 192.168.10.1 192.168.10.3
Et0/1 2 150 P Active local 192.168.10.1 192.168.10.
****************************************************
转载于:https://blog.51cto.com/jasonyuan/83769