实验三十七、HSRP 的配置

一、 实验目的

1. 掌握热备份路由协议的配置

2. 理解热备份路由协议的原理

二、 应用环境

在企业网内部实现网关的冗余,提高可靠性

三、 实验设备

1. DCR-1751 两台

2. PC 机 一台

四、 实验拓扑

实验三十七、HSRP 的配置_职场

五、 实验要求

ROUTER-A ROUTER-B

F0/0 192.168.10.2/24 F0/0 192.168.10.3/24

优先级 200 100

Standby IP 192.168.10.1/24

PC 机IP:192.168.10.4/24 网关:192.168.10.1

目的:正常情况下A 为活跃路由器,当A 坏掉,B 成为活跃路由器,从PC 机PING 网关没有变化

六、 实验步骤

第一步:配置接口地址,并测试连通性

第二步:配置HSRP

路由器A 的配置:

Router-A_config#int f0/0

Router-A_config_f0/0#ip address 192.168.10.2 255.255.255.0

Router-A_config_f0/0#standby priority 200 !配置优先级

Router-A_config_f0/0#standby ip 192.168.10.1 !配置虚拟地址

Router-A_config_f0/0#stand authentication router !配置认证密码

路由器B 的配置

Router-B_config#int f0/0

Router-B_config_f0/0#ip address 192.168.10.3 255.255.255.0

Router-B_config_f0/0#standby priority 100

Router-B_config_f0/0#standby ip 192.168.10.1

Router-B_config_f0/0#stand authentication router

Router-B_config_f0/0#^Z

第三步:配置PC 机IP 地址和网关,并测试网关

实验三十七、HSRP 的配置_职场_02

第四步:验证

Router-A#sh standby

FastEthernet0/0 - Group 0

HSRP State is Active

Virtual IP address : 192.168.10.1/24 (config)

Virtual Mac address : 0000.0c07.ac00

Active Router IP : 192.168.10.2

Standby Router IP : 192.168.10.3

Preempt is not set

Current Priority is 200 Config Priority is 200

HSRP timer : hello 3 s(default) hold 10s (default)

HSRP current timer : hello 2 active 0 standby 9

Authentication string is router

Router-B#sh standby

FastEthernet0/0 - Group 0

HSRP State is Standby

Virtual IP address : 192.168.10.1/24 (config)

Virtual Mac address : 0000.0c07.ac00

Active Router IP : 192.168.10.2

Standby Router IP : 192.168.10.3

Preempt is not set

Current Priority is 100

Config Priority is 100

HSRP timer : hello 3 s(default) hold 10s (default)

HSRP current timer : hello 3 active 9 standby 0

Authentication string is router

第五步:关闭路由器A,从PC 机PING 网关