项目二 任务三 训练5 交换机的HSRP技术
迪丽瓦拉
2025-05-31 23:11:16
0

在“项目二 任务三 训练4 交换机的DHCP技术”基础上继续完成下列操作:

1、二层交换机50-2的配置

50-2>en

50-2#conf t

Enter configuration commands, one per line. End with CNTL/Z.

50-2(config)#int

50-2(config)#interface g

50-2(config)#interface gigabitEthernet 0/2

50-2(config-if)#switchport mode trunk

50-2(config-if)#

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to up

50-2(config-if)#

2、三层交换机50-3的配置

Switch>en

Switch#

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#hostname 50-3

50-3(config)#vtp domain wgj

Changing VTP domain name from NULL to wgj

50-3(config)#vtp mode client

Setting device to VTP CLIENT mode.

50-3(config)#


50-3(config)#ip routing

50-3(config)#interface vlan 50

50-3(config-if)#

%LINK-5-CHANGED: Interface Vlan50, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan50, changed state to up

50-3(config-if)#ip address 192.168.50.253 255.255.255.0

50-3(config-if)#interface vlan 60

50-3(config-if)#

%LINK-5-CHANGED: Interface Vlan60, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan60, changed state to up

50-3(config-if)#ip address 192.168.60.253 255.255.255.0

50-3(config)#

3、三层交换机50-1的配置

50-1>

50-1>en

50-1#conf t

Enter configuration commands, one per line. End with CNTL/Z.

50-1(config)#int

50-1(config)#interface vlan 50

50-1(config-if)#standby 50 priority 110

50-1(config-if)#standby 50 ip 192.168.50.252

50-1(config-if)#standby 50 preempt

%HSRP-6-STATECHANGE: Vlan50 Grp 50 state Speak -> Standby

%HSRP-6-STATECHANGE: Vlan50 Grp 50 state Standby -> Active

50-1(config-if)#standby 50 track gigabitEthernet 0/2

50-1(config-if)#exit


50-1(config)#interface vlan 60

50-1(config-if)#standby 60 priority 100

50-1(config-if)#standby 60 ip 192.168.60.252

50-1(config-if)#exit

50-1(config)#

%HSRP-6-STATECHANGE: Vlan60 Grp 60 state Speak -> Standby

%HSRP-6-STATECHANGE: Vlan60 Grp 60 state Standby -> Active

50-1(config)#

4、三层交换机50-3配置

50-3>

50-3>en

50-3#conf t

Enter configuration commands, one per line. End with CNTL/Z.

50-3(config)#interface vlan 50

50-3(config-if)#st

50-3(config-if)#standby 50 ip 192.168.50.252

50-3(config-if)#exit

50-3(config)#interface vlan 60

%HSRP-6-STATECHANGE: Vlan50 Grp 50 state Speak -> Standby

50-3(config-if)#standby 60 priority 110

50-3(config-if)#standby 60 ip 192.168.60.252

50-3(config-if)#standby 60 preempt

50-3(config-if)#

%HSRP-6-STATECHANGE: Vlan60 Grp 60 state Standby -> Active

50-3(config-if)#standby 60 track gigabitEthernet 0/2

50-3(config-if)#exit

50-3(config)#

 5、查看交换机50-1的HSRP服务

 6、未断开50-1交换机测试

 7、断开50-1交换机测试

 发现不通,思考什么原因。

检测PC配置发现为获取正确的IP地址,问题找到。

 8、配置50-3的DHCP服务

50-3(config)#ip dhcp pool vlan50

50-3(dhcp-config)#network 192.168.50.0 255.255.255.0

50-3(dhcp-config)#dns-server 114.114.114.114

50-3(dhcp-config)#default-router 192.168.50.253

50-3(dhcp-config)#exit

50-3(config)#ip dhcp pool vlan60

50-3(dhcp-config)#network 192.168.60.0 255.255.255.0

50-3(dhcp-config)#dns-server 114.114.114.114

50-3(dhcp-config)#default-router 192.168.60.253

50-3(dhcp-config)#

9、PC重新获取IP地址,发现网关发生变化

10、ping测试连通性

相关内容

热门资讯

linux入门---制作进度条 了解缓冲区 我们首先来看看下面的操作: 我们首先创建了一个文件并在这个文件里面添加了...
C++ 机房预约系统(六):学... 8、 学生模块 8.1 学生子菜单、登录和注销 实现步骤: 在Student.cpp的...
A.机器学习入门算法(三):基... 机器学习算法(三):K近邻(k-nearest neigh...
数字温湿度传感器DHT11模块... 模块实例https://blog.csdn.net/qq_38393591/article/deta...
有限元三角形单元的等效节点力 文章目录前言一、重新复习一下有限元三角形单元的理论1、三角形单元的形函数(Nÿ...
Redis 所有支持的数据结构... Redis 是一种开源的基于键值对存储的 NoSQL 数据库,支持多种数据结构。以下是...
win下pytorch安装—c... 安装目录一、cuda安装1.1、cuda版本选择1.2、下载安装二、cudnn安装三、pytorch...
MySQL基础-多表查询 文章目录MySQL基础-多表查询一、案例及引入1、基础概念2、笛卡尔积的理解二、多表查询的分类1、等...
keil调试专题篇 调试的前提是需要连接调试器比如STLINK。 然后点击菜单或者快捷图标均可进入调试模式。 如果前面...
MATLAB | 全网最详细网... 一篇超超超长,超超超全面网络图绘制教程,本篇基本能讲清楚所有绘制要点&#...