配置热备份路由器HSRP协议

2025-10-04 22:04:41

1、我们首先配置拓扑图上路由器接口地址和PC地址。这里使用了3台2811路由器来模拟。

配置热备份路由器HSRP协议

2、配置R1路由器

R1(config)#interface lo 0

R1(config-if)#ip add 10.1.1.1 255.255.255.0

R1(config-if)#no shut

R1(config-if)#int s0/3/0

R1(config-if)#ip add 192.168.12.1 255.255.255.0

R1(config-if)#no shut

R1(config-if)#int s0/2/0

R1(config-if)#ip add 192.168.13.1 255.255.255.0

R1(config-if)#no shut

配置热备份路由器HSRP协议

3、配置R2路由器

R2(config)#interface s0/3/0

R2(config-if)#ip address 192.168.12.2 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#interface fa0/0

R2(config-if)#ip address 192.168.1.1 255.255.255.0

R2(config-if)#no shutdown

配置热备份路由器HSRP协议

4、配置R3路由器

R3(config)#interface s0/2/0

R3(config-if)#ip address 192.168.13.2 255.255.255.0

R3(config-if)#no shutdown

R2(config-if)#interface fa0/0

R3(config-if)#ip add 192.168.1.2 255.255.255.0

R3(config-if)#no shutdown

配置热备份路由器HSRP协议

5、配置R1的ospf路由协议

R1(config)#router ospf 1

R1(config-router)#network 192.168.12.1 0.0.0.0 area 0

R1(config-router)#network 192.168.13.1 0.0.0.0 area 0

R1(config-router)#network 10.1.1.1 0.0.0.0 area 0

配置热备份路由器HSRP协议

6、配置R2的ospf路由协议

R2(config)#router ospf 1

R2(config-router)#network 192.168.1.1 0.0.0.0 area 0

R2(config-router)#network 192.168.12.2 0.0.0.0 area 0

R2(config-router)#passive-interface fa0/0

配置热备份路由器HSRP协议

7、配置R3的ospf路由协议

R3(config)#router ospf 1

R3(config-router)#network 192.168.13.2 0.0.0.255 area 0

R3(config-router)#network 192.168.1.2 0.0.0.255 area 0

R2(config-router)#passive-interface fa0/0

配置热备份路由器HSRP协议

8、查看R2上的协议

R2#sh ip prot 

可以看到宣告了,但是不建立邻居关系。

配置热备份路由器HSRP协议

9、配置R2、R3的HSRP即将两台路由器虚拟成一台路由器网关地址

R2(config)#interface fa0/0

R2(config-if)#standby 1 ip 192.168.1.254

设置主路由R2(config-if)#standby 1 priority 110

R2(config-if)#standby 1 preempt

配置热备份路由器HSRP协议

10、配置R3路由器HSRP

R3(config)#interface fa0/0

R3(config-if)#standby 1 ip 192.168.1.254

R3(config-if)#standby 1 priority 105

R3(config-if)#standby 1 preempt

配置热备份路由器HSRP协议

11、配置PC0-PC3的默认网关

配置热备份路由器HSRP协议

12、这样我们就完成了hsrp热路由器备份。

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢