您的位置:首页 > 其它

HSRP多组基础配置实验

2013-08-28 10:21 337 查看



预期效果:配置成功之后,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
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

本文出自 “我还活着呢” 博客,请务必保留此出处http://hujizhou.blog.51cto.com/514907/1284061
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: