实验目的:

验证HSRP的工作原理

掌握HSRP的配置

测试HSRP的作用

实验环境拓扑图及要求:

image

 

clip_image002

要求:

1、 路由器A为HSRP组10 中的备份路由器,组172中的活跃路由器,实现路由器的冗余备份和负载均衡。

2、 路由器B为HSRP组10 中活跃的路由器,组172中的备份路由器,实现路由器的冗余备份和负载均衡。

3、 各路由器开启占先权和端口跟踪, 实现HSRP的正常工作。

4、 查看路由器A的standby状态信息,在哪个备份组是活跃状态。

5、 查看路由器B的standby状态信息,在哪个备份组是活跃状态。

6、 测试正常情况下跟踪PC2到PC1的路由信息,将经过路由器(A/B)?

7、 验证HSRP的占先权工作。将路由器A的F0/0端口关闭,查看路由器A在备份组172内的状态信息,状态为(备份/活跃)?查看路由器B在备份组172内的状态信息。状态为(备份/活跃)?跟踪PC2到PC1的路由信息,将经过路由器(A/B)?

8、 验证HSRP的端口跟踪工作。将路由器A的F0/0端口关闭,查看路由器A在备份组172内的状态信息,状态为(备份/活跃)?优先级变化成多少?查看路由器B在备份组172内的状态信息。状态为(备份/活跃)?优先级变化成多少?跟踪PC2到PC1的路由信息,将经过路由器(A/B)?

实验步骤:【必写】

分类写出你的实验进行中的步骤,可用文字或图片加水印标记

配置文档:

(这里交换机可以不做配置。不过我先用了交换机的管理IP实验了下,所以交换机上也配置了。)

基本思路:

对于路由器:

1:命名

2:配置端口IP地址

3:配置相应端口为相应的HSRP组

4:配置相应端口的HSRP优先级

5:配置相应端口占有权

6:配置相应的端口跟踪

对于二层交换机:

1:命名

2:配置网关

对于PC:(这里用路由器当PC用)

1:命名

2:禁用路由功能

3:配置IP地址

查看命令:

1:查看HSRP的配置:

show standby

2:显示HSRP路由器的状态

show standby brief

--------------------------------------------------------------

RA:

en

conf t

host RA

no ip domain-lo

int f1/0

ip add 10.10.10.1 255.255.255.0 //配置端口IP地址

no sh //激活端口

standby 10 ip 10.10.10.254 //配置加入备份组10,并指向网关地址

standby 10 priority 110 //配置这个接口在10组的优先级

standby 10 preempt //配置这个接口在10组的占先权

exit

int f0/0

ip add 172.16.10.1 255.255.255.0

no sh

standby 172 ip 172.16.10.254

standby 172 priority 120

standby 172 preempt

end

RA:

en

conf t

int f0/0

standby 172 track fast 1/0 100 //配置在该接口的172组的跟踪端口和减少多少优先级数

sh

-------------------------------------------------------------------

RB:

en

conf t

host RB

no ip domain-lo

int f1/0

ip add 10.10.10.2 255.255.255.0

no sh

standby 10 ip 10.10.10.254

standby 10 priority 120

standby 10 preempt

exit

int f0/0

ip add 172.16.10.2 255.255.255.0

no sh

standby 172 ip 172.16.10.254

standby 172 priority 110

standby 172 preempt

end

RB:

en

conf t

int f1/0

standby 10 track fast 0/0 100

-------------------------------------------------------------------

SWA:

en

conf t

host SWA

no ip routing //禁用路由功能

int vlan 1 //配置vlan1的管理IP

ip add 10.10.10.11 255.255.255.0

no sh

exit

ip default-gateway 10.10.10.254 //配置网关地址

end

--------------------------------------------------------------------

SWB:

en

conf t

host SWB

no ip routing

int vlan 1

ip add 172.16.10.11 255.255.255.0

no sh

exit

ip default-gateway 172.16.10.254

end

--------------------------------------------------------------------

PC1:

en

conf t

host PC1

no ip domain-lo

no ip routing

int f0/0

ip add 10.10.10.10 255.255.255.0

no sh

exit

ip default-gateway 10.10.10.254

end

----------------------------------------------------------------------

PC2:

en

conf t

host PC2

no ip domain-lo

no ip routing

int f0/0

ip add 172.16.10.10 255.255.255.0

no sh

exit

ip default-gateway 172.16.10.254

end

----------------------------------------------------------------------

clip_image002[4]clip_image004clip_image006clip_image008 clip_image010clip_image012clip_image014clip_image016clip_image018clip_image020