A-A+
路由器的HSRP配置(热备份路由协议)
HSRP主要应用环境在核心层的双核心,主要用以核心设备的冗余。
HSRP 是cisco公司私有协议,VRRP(虚拟路由冗余协议)是IEEE 的国际性标准。
下面开始试验操作:
1、在R1上配置如下:
- R1(config)#interface fastEthernet 1/0
- R1(config-if)#ip address 192.168.1.1 255.255.255.0
- R1(config-if)#standby 1 ip 192.168.1.254
- //热备份组1 中虚拟路由器的IP 地址为192.168.1.254。
- R1(config-if)#standby 1 priority 200
- //R1 在热备份组1 中的优先级为200。
- R1(config-if)#standby 1 timers 5 15
- //热备份组1 的hello 时间为5 秒,保持时间为15 秒。
- R1(config-if)#no shutdown
2、在R2上配置:
- R2(config)#interface fastEthernet 1/0
- R2(config-if)#ip address 192.168.1.2 255.255.255.0
- R2(config-if)#standby 1 ip 192.168.1.254
- //热备份组1 中虚拟路由器的IP 地址为192.168.1.254。
- R2(config-if)#standby 1 priority 100
- //R2 在热备份组1 中的优先级为100。
- R2(config-if)#no shutdown
- R2(config-if)#standby 1 timers 5 15
3、在R3配置:
- R3(config)#interface fastEthernet 1/0
- R3(config-if)#ip address 192.168.1.1 255.255.255.0
- R3(config-if)#standby 1 ip 192.168.1.254
- //热备份组1 中虚拟路由器的IP 地址为192.168.1.254。
- R3(config-if)#standby 1 priority 50
- //R1 在热备份组1 中的优先级为50。
- R3(config-if)#standby 1 timers 5 15
- //热备份组1 的hello 时间为5 秒,保持时间为15 秒。
- R3(config-if)#no shutdown
在R1上验证效果:
- R1#show standby
- FastEthernet1/0 - Group 1
- Local state is Active, priority 200
- Hellotime 5 sec, holdtime 15 sec
- Next hello sent in 2.084
- Virtual IP address is 192.168.1.254 configured
- Active router is local
- Standby router is 192.168.1.2, priority 100 expires in 8.404
- Virtual mac address is 0000.0c07.ac01
- 2 state changes, last state change 00:01:42
- IP redundancy name is "hsrp-Fa1/0-1" (default)
在R1或者R2上随便断开一个接口,都能使ip 192.168.1.254 能通。
在断开R1时验证效果。