首页 > 其他 > 详细

HSRP配置

时间:2016-11-27 08:12:16      阅读:276      评论:0      收藏:0      [点我收藏+]

拓扑及ip如下:

技术分享

R1配置:

(一)

R1#config t

R1(config)#interface GigabitEthernet 0/0

R1(config-if)#ip address 10.10.1.2 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#exit

R1(config)#interface GigabitEthernet 0/1

R1(config-if)#ip address 10.1.1.2 255.255.255.252

R1(config-if)#no shutdown

R1(config)#ip route 0.0.0.0 0.0.0.0 10.1.1.1 配置路由

(二)

R1(config)#interface GigabitEthernet 0/0

R1(config-if)#standby 1 ip 10.10.1.1 设置虚拟的IP地址

R1#show standby 查看是否为活跃路由

技术分享

R2配置:

(一)

R2(config)#interface GigabitEthernet 0/0

R2(config-if)#ip address 10.10.1.3 255.255.255.0

R2(config-if)#no shutdown

R2(config)#interface GigabitEthernet 0/1

R2(config-if)#ip address 10.1.1.6 255.255.255.252

R2(config-if)#no shutdown

R2(config)ip route 0.0.0.0 0.0.0.0 10.1.1.5

(二)

R2(config)#interface GigabitEthernet 0/0

R2(config-if)#stantby 1 ip 10.10.1.1  同样设置 组1虚拟ip为10.10.1.1

使用show standby命令查看优先级、是否有占先权、是否为活跃路由,preemption 为disabled说明为开启占先权。

技术分享

R3配置:

R3(config)#interface GigabitEthernet 0/0

R3(config-if)#ip address 10.1.1.1 255.255.255.252

R3(config-if)#no shutdown

R3(config)#interface GigabitEthernet 0/1

R3(config-if)#ip address 10.1.1.5 255.255.255.252

R3(config-if)#no shutdown

R3(config)#interface loopback 1 创建loopback接口

R3(config-if)#ip address 10.10.1.99 255.255.255.0

R3(config-if)#no shutdown

R3(config)#ip route 10.10.1.0 255.255.255.0 10.1.1.2 

R3(config)#ip route 10.10.1.0 255.255.255.0 10.1.1.6


配置PC0 iP地址:

技术分享

测试ping loopback地址 及 虚拟10.10.1.1,并且查看arp缓存

技术分享

可以在R1和R2上创建组2,在R1和R2上分别设置为活跃路由,相互备份,实现负载均担,

R1(config)#interface GigabitEthernet 0/0

R1(config-if)#standby 2 ip 10.10.1.1

R1(config-if)#standby 2 priority 120 配置优先级为120(0-255)

R1(config-if)#standby 2 preempt 开启抢占权





HSRP配置

原文:http://hfine.blog.51cto.com/1938015/1876929

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!