A-A+

路由器的HSRP配置(热备份路由协议)

2015年11月27日 站长资讯 暂无评论

HSRP主要应用环境在核心层的双核心,主要用以核心设备的冗余。

HSRP 是cisco公司私有协议,VRRP(虚拟路由冗余协议)是IEEE 的国际性标准。

下面开始试验操作:

1、在R1上配置如下:

  1. R1(config)#interface fastEthernet 1/0  
  2. R1(config-if)#ip address 192.168.1.1 255.255.255.0  
  3. R1(config-if)#standby 1 ip 192.168.1.254  
  4. //热备份组1 中虚拟路由器的IP 地址为192.168.1.254。  
  5. R1(config-if)#standby 1 priority 200  
  6. //R1 在热备份组1 中的优先级为200。  
  7. R1(config-if)#standby 1 timers 5 15  
  8. //热备份组1 的hello 时间为5 秒,保持时间为15 秒。  
  9. R1(config-if)#no shutdown  

2、在R2上配置:

  1. R2(config)#interface fastEthernet 1/0  
  2. R2(config-if)#ip address 192.168.1.2 255.255.255.0  
  3. R2(config-if)#standby 1 ip 192.168.1.254  
  4. //热备份组1 中虚拟路由器的IP 地址为192.168.1.254。  
  5. R2(config-if)#standby 1 priority 100  
  6. //R2 在热备份组1 中的优先级为100。  
  7. R2(config-if)#no shutdown  
  8. R2(config-if)#standby 1 timers 5 15  

3、在R3配置:

  1. R3(config)#interface fastEthernet 1/0  
  2. R3(config-if)#ip address 192.168.1.1 255.255.255.0  
  3. R3(config-if)#standby 1 ip 192.168.1.254  
  4. //热备份组1 中虚拟路由器的IP 地址为192.168.1.254。  
  5. R3(config-if)#standby 1 priority 50  
  6. //R1 在热备份组1 中的优先级为50。  
  7. R3(config-if)#standby 1 timers 5 15  
  8. //热备份组1 的hello 时间为5 秒,保持时间为15 秒。  
  9. R3(config-if)#no shutdown  

在R1上验证效果:

  1. R1#show standby  
  2. FastEthernet1/0 - Group 1  
  3. Local state is Active, priority 200  
  4. Hellotime 5 sec, holdtime 15 sec  
  5. Next hello sent in 2.084  
  6. Virtual IP address is 192.168.1.254 configured  
  7. Active router is local  
  8. Standby router is 192.168.1.2, priority 100 expires in 8.404  
  9. Virtual mac address is 0000.0c07.ac01  
  10. 2 state changes, last state change 00:01:42  
  11. IP redundancy name is "hsrp-Fa1/0-1" (default)  

在R1或者R2上随便断开一个接口,都能使ip 192.168.1.254 能通。

在断开R1时验证效果。

标签:

给我留言