当前位置: 首页 > news >正文

项目二 任务三 训练5 交换机的HSRP技术

在“项目二 任务三 训练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测试连通性

http://www.lryc.cn/news/41521.html

相关文章:

  • 计算机网络复习重点
  • 算法基础---基础算法
  • linux中写定时任务
  • 2023.3.21
  • 制作数据库框架
  • Winbond W25Qxx SPI FLASH 使用示例(基于沁恒CH32V307单片机)
  • 贪心算法的原理以及应用
  • WebRTC拥塞控制原理之一基本介绍
  • 选择 .NET 的 n 个理由
  • spark第三章:工程化代码
  • Vue实战【封装一个简单的列表组件,实现增删改查】
  • 微前端(无界)
  • 强烈推荐:0基础入门网安必备《网络安全知识图谱》
  • 网络技术与应用概论(上)——“计算机网络”
  • JAVASE/封装、继承、多态
  • SpringBoot ElasticSearch 【SpringBoot系列16】
  • Virtual box磁盘大小调整操作
  • MySQL注入秘籍【上篇】
  • 简单三步解决动态规划难题,记好这三步,动态规划就不难
  • 算法进阶指南打卡
  • Chapter6.2:其他根轨迹及综合实例分析
  • 3. 无重复字符的最长子串——滑动窗口
  • ChatGPT研究分享:机器第一次开始理解人类世界
  • 可换皮肤的Qt登录界面
  • Spring的常见问题汇总
  • yolov8训练筷子点数数据集
  • 使用 Python 从点云生成 3D 网格
  • vue使用split()将字符串分割数组join()将数组转字符串reverse()将数组反转
  • 队列实现及leetcode相关OJ题
  • 【Log4j2远程命令执行复现CVE-2021-12-09】