<a href="http://blog.51cto.com/attachment/201308/102037653.jpg" target="_blank"></a>
預期效果:配置成功之後,PC4 ping 1.1.1.1從R2走,PC5 ping 1.1.1.1從R3走。如果R2鍊路斷開,PC4和PC5的資料全部都從R3走,反之亦然。
R1配置:
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface Ethernet0/0
ip address 192.168.12.1 255.255.255.0
half-duplex
!
interface Ethernet0/1
ip address 192.168.13.1 255.255.255.0
router eigrp 100 (配置eigrp路由協定)
network 1.0.0.0
network 192.168.12.0
network 192.168.13.0
R2配置:
ip address 192.168.12.2 255.255.255.0
shutdown
interface Ethernet0/1 (e0/1口作為主接口,隻激活,不配置IP)
no ip address
interface Ethernet0/1.1 (開啟e0/1.1并設定IP,在該子接口封裝DOT.1Q,劃分在VLAN 2)
encapsulation dot1Q 2
ip address 192.168.1.100 255.255.255.0
standby 1 ip 192.168.1.1 (配置虛拟組IP)
standby 1 priority 200 (設定虛拟組1的優先級為200,那麼從1.1出去的資料将預設用e0/1.1轉發)
standby 1 preempt (開啟搶占機制)
standby 1 track Ethernet0/0 120 (追蹤e0/0接口,如果該接口down掉,将自己的優先級減120,變成80)
interface Ethernet0/1.2
encapsulation dot1Q 3
ip address 192.168.2.100 255.255.255.0
standby 2 ip 192.168.2.1 (配置虛拟組IP)
standby 2 preempt (開啟搶占機制)
standby 2 track Ethernet0/0 120 (追蹤e0/0接口,如果該接口down掉,将自己的優先級減120,變成80)
//該組未設定優先級,因為從2.1出去的資料預設要走R3,是以在此不設定優先級。
router eigrp 100
network 192.168.1.0
network 192.168.2.0
auto-summary
R3配置:
interface Ethernet0/0 (e0/0為主接口,隻激活,不配置IP)
interface Ethernet0/0.1
ip address 192.168.1.200 255.255.255.0
standby 1 ip 192.168.1.1
standby 1 preempt
standby 1 track Ethernet0/1 80
//該組不設定優先級,因為從1.1走的資料要讓它走R2。
interface Ethernet0/0.2
ip address 192.168.2.200 255.255.255.0
standby 2 ip 192.168.2.1
standby 2 priority 200
standby 2 preempt
standby 2 track Ethernet0/1 80
ip address 192.168.13.2 255.255.255.0
本文轉自 qq8658868 51CTO部落格,原文連結:http://blog.51cto.com/hujizhou/1284061,如需轉載請自行聯系原作者