ESW1#sh run int vlan 10 ! interface Vlan10 ip address 192.168.1.252 255.255.255.0 standby version 1 ---HSRP版本2 standby 30 ip 192.168.1.254 ---虚拟地址 standby 30 priority 110 ----优先级 standby 30 authentication md5 key-string qytang ---md5认证 密码为qytang ! router eigrp 90 ---eigrp network 0.0.0.0
ESW2#sh run int vlan 10 interface Vlan10 ip address 192.168.1.253 255.255.255.0 standby version 1 standby 30 ip 192.168.1.254 standby 30 priority 105 standby 30 preempt ---开启抢占 standby 30 authentication md5 key-string qytang ! router eigrp 90 ---eigrp network 0.0.0.0
R1: router eigrp 90 network 0.0.0.0 no auto-summary ! interface Loopback0 ip address 100.1.1.1 255.255.255.0
验证下路由:
R1#sh ip route eigrp 100.0.0.0/8 is variably subnetted, 2 subnets, 2 masks D 100.0.0.0/8 is a summary, 05:55:16, Null0 10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks D 10.0.0.0/8 is a summary, 02:19:12, Null0 12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks D 12.0.0.0/8 is a summary, 02:19:12, Null0 D 192.168.1.0/24 \[90/28416\] via 12.1.1.2, 05:07:11, FastEthernet1/0 \[90/28416\] via 10.1.1.2, 05:07:11, FastEthernet0/
R1#ping 192.168.1.254 source lo0 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.254, timeout is 2 seconds: Packet sent with a source address of 100.1.1.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 20/34/60 ms
R2:ping 192.168.1.254 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.254, timeout is 2 seconds: .!!!! Success rate is 80 percent (4/5), round-trip min/avg/max = 16/33/64 ms