分类:
2012-12-11 15:27:08
成功之后,PC4 ping 1.1.1.1从R2走,PC5 ping 1.1.1.1从R3走。如果R2链路断开,PC4和PC5的数据全部都从R3走,反之亦然。
R1配置:
Loopback0
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
half-duplex
router eigrp 100 (配置eigrp路由协议)
network 1.0.0.0
network 192.168.12.0
network 192.168.13.0
R2配置:
interface Ethernet0/0
ip address 192.168.12.2 255.255.255.0
shutdown
half-duplex
!
interface Ethernet0/1 (e0/1口作为主接口,只激活,不配置IP)
no ip address
half-duplex
!
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
network 192.168.12.0
auto-summary
R3配置:
interface Ethernet0/0 (e0/0为主接口,只激活,不配置IP)
no ip address
half-duplex
!
interface Ethernet0/0.1
encapsulation dot1Q 2
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
encapsulation dot1Q 3
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
!
interface Ethernet0/1
ip address 192.168.13.2 255.255.255.0
half-duplex