
1,按图示配置好各台路由器的各个接口,其中R2模拟为主机,网关指向虚拟路由器地址;
2,在R1和R3上配置静态路由指向192.168.1.0/24,R13上配置两条静态路由分别通过R1和R3指向172.16.1.0/24;
3,在R1和R3的E0口上配置HSRP协议,加入组1,虚拟IP地址为172.16.1.100,优先级分别为150和200:
R1(config)#interface ethernet 0
R1(config-if)#standby 1 ip 172.16.1.100
R1(config-if)#standby 1 priority 150
R1(config-if)#standby 1 preempt
R3(config)#interface ethernet 0
R3(config-if)#standby 1 ip 172.16.1.100
R3(config-if)#standby 1 priority 200
R3(config-if)#standby 1 preempt
4,查看HSRP状态,R1为standby,R3为active;
5,配置接口跟踪:
R3(config)#interface ethernet 0
R3(config-if)#standby 1 track serial 1 55 //standby 1 track serial 1 55 命令指示当串行接口0关闭时路由器A的优先级值被减少55,注意此前的配置中路由器A的优先级被设定为比路由器B高50。
6,测试R3上接口跟踪效果