FRANK_SUI

导航

cisco HSRP实验

实验项目:HSRP

实验目的:

  1>     实现拓扑冗余备份。

  2>     测试HSRP主备网关倒换。

R0配置:

int F0/0

   ip add 192.168.1.2 255.255.255.0

   duplex auto

   speed auto

   standby 10 ip 192.168.1.254       // 配置HSRP10的虚拟IP

   standby 10 priority 120              // 配置HSRP10的优先级

   standby 10 preempt                   // 配置HSRP10的抢占

   standby 10 track F0/0  (30)   // 配置HSRP10跟踪上连端口Fa0/1,上连接口Down  (添不添加都可,意味着优先级减30)

int F0/1

  ip add 192.168.2.2 255.255.255.0

   duplex auto

   speed auto

   standby 20 ip 192.168.2.254      //配置HSRP20的虚拟IP

   standby 20 preempt             // 配置HSRP20的抢占

 

R1配置:

int  F0/0

   ip add 192.168.1.3 255.255.255.0

   duplex auto

   speed auto

   standby 10 ip 192.168.1.254         

   standby 10 preempt

 

int F0/1

   ip address 192.168.2.3 255.255.255.0

   duplex auto

   speed auto

   standby 20 ip 192.168.2.254

   standby 20 priority 120

   standby 20 preempt

   standby 20 track FastEthernet0/0 30       // 配置HSRP20跟踪上连端口Fa0/0,上连接口Down  则优先级减30

 

 

连通正常时信息:

R0#show standby brief

                     P indicates configured to preempt.

                     |

Interface   Grp Prio P State    Active          Standby         Virtual IP

Fa0/0       10  120  P Active   local           192.168.1.3     192.168.1.254

Fa0/1       20  100  P Standby  192.168.2.3     local           192.168.2.254

//F0/0 在组10 优先级为120,有抢字位

//P 本地状态活动  有一个备份IP192.168.1.3 

//本组虚拟IP 192.168.1.254

 

R0上接口f0/0 shutdown 后,HSRP信息:

R0#show standby brief                  |

Interface   Grp Prio P State    Active          Standby         Virtual IP

Fa0/0       10  120  P Init     unknown         unknown         192.168.1.254

Fa0/1       20  100   P Standby  192.168.2.3     local           192.168.2.254

 

注意:

R0上关闭端口f0/0进行主备切换时,pc0 ping pc1数据包不会丢失   如果R1上没有配置抢字位则数据会丢失

 

 

 

 

 

 

 

 

 

 

 

 

posted on 2013-10-17 16:30  Mr·Sui  阅读(1083)  评论(0)    收藏  举报