侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

HSRP配置

2022-12-04 星期日 / 0 评论 / 0 点赞 / 62 阅读 / 2894 字

拓扑及ip如下:R1配置:(一)R1#config tR1(config)#interface GigabitEthernet 0/0R1(config-if)#ip address 10.10.1.

.

拓扑及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 开启抢占权





.

广告 广告

评论区