项目二 任务三 训练3 交换机的生成树技术
创始人
2025-05-31 17:17:50
0

按图所示设置PC的IP地址,交换机主机名。

1、交换机的基本配置

(1)配件交换机50-1为vtp服务端并创建vlan;

Switch>en

Switch#conf t

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

Switch(config)#host

Switch(config)#hostname 50-1

50-1(config)#vtp domain wgj

Changing VTP domain name from NULL to wgj

50-1(config)#vtp mode server

Device mode already VTP SERVER.

50-1(config)#vlan 10

50-1(config-vlan)#vlan 20

50-1(config-vlan)#exit

50-1(config)#

(2)配件交换机50-2为vtp客户端;

Switch>

Switch>en

Switch#conf t

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

Switch(config)#hostname 50-2

50-2(config)#vtp domain wgj

Changing VTP domain name from NULL to wgj

50-2(config)#vtp mode client

Setting device to VTP CLIENT mode.

50-2(config)#

  使用show vlan命令检验vtp中继的结果,发现并没有创建vlan;(思考问题出在哪里?)

(3)配件交换机50-3为vtp客户端,使用show vlan命令检验vtp中继的结果,同样发现并没有创建vlan;

Switch>en

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)#

 2、在各交换机上完成Trunk链路配置

(1)配置交换机50-1

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

50-1(config-if-range)#channel-group 1 mode on

50-1(config-if-range)#

Creating a port-channel interface Port-channel 1

%LINK-5-CHANGED: Interface Port-channel 1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 1, changed state to up

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

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

%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-1(config-if-range)#exit

50-1(config)#interface port-channel 1

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

50-1(config-if)#

%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 1, changed state to up

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

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

%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-1(config-if-range)#switchport trunk allowed vlan all

50-1(config-if)#exit

50-1(config)#interface fastEthernet 0/24

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

50-1(config-if)#

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

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

50-1(config-if)#switchport trunk allowed vlan all

50-1(config-if)#exit

50-1(config)#

使用show vlan命令检验vtp中继的结果,发现创建了vlan,问题解决;

 3、在交换机中启用RSTP(快速生成树协议)

50-1(config)#spanning-tree mode rapid-pvst

50-2(config)#spanning-tree mode rapid-pvst

50-3(config)#spanning-tree mode rapid-pvst

4、修改生成树根网桥和优先级

(1)设置交换机50-1为Vlan 10的根网桥,为Vlan 20的备用。

50-1(config)#spanning-tree vlan 10 priority 4096

50-1(config)#spanning-tree vlan 20 root secondary

(2)设置交换机50-2为Vlan 20的根网桥,为Vlan 10的备用。

50-2(config)#spanning-tree vlan 20 priority 4096

50-2(config)#spanning-tree vlan 10 root secondary

 

 5、配置Vlan的负载均衡

50-1(config-if)#spanning-tree vlan 10 Port-priority 112

相关内容

热门资讯

A股玻尿酸巨头出手!2700字... 医美龙头巨子生物“成分争议”风波持续发酵。日前,美妆博主大嘴博士(香港大学化学博士郝宇)发文,质疑巨...
计算机组成原理实验1---运算...     本实验为哈尔滨工业大学计算机组成原理实验,实验内容均为个人完成,...
3 ROS1通讯编程提高(1) 3 ROS1通讯编程提高3.1 使用VS Code编译ROS13.1.1 VS Code的安装和配置...
前端-session、jwt 目录:   (1)session (2&#x...
前端学习第三阶段-第4章 jQ... 4-1 jQuery介绍及常用API导读 01-jQuery入门导读 02-JavaScri...
EL表达式JSTL标签库 EL表达式     EL:Expression Language 表达式语言     ...
数字温湿度传感器DHT11模块... 模块实例https://blog.csdn.net/qq_38393591/article/deta...
【内网安全】 隧道搭建穿透上线... 文章目录内网穿透-Ngrok-入门-上线1、服务端配置:2、客户端连接服务端ÿ...
【Spring Cloud A... 文章目录前言Metadata元数据ClassMetadataSpring中常见的一些元注解Nacos...
React篇-关于React的... 一.简介1.介绍用于构建用户界面的 JavaScript 库2.创建项目(1)手动创建Documen...
win7 Pro 英文版添加中... win7pro x64英文版添加中文语言包1、下载语言包,并解压成lp.cab,复制到...
Android开发-Andro... 01  Android UI 1.1  UI 用户界面(User Interface,...
基于springboot教师人... 基于springboot教师人事档案管理系统【源码+论文】 开发语言:Jav...
编写软件界面的方式 本文重点解决如下问题:编写软件的界面有哪几种方式?通常情形下࿰...
keil调试专题篇 调试的前提是需要连接调试器比如STLINK。 然后点击菜单或者快捷图标均可进入调试模式。 如果前面...
GO语言小锤硬磕十三、数组与切... 数组用来保存一组相同类型的数据,go语言数组也分一维数组和多维数组。 直接上代码看一下...
三级数据库备考--数据库应用系... 1.数据库应用系统设计包括概念设计、逻辑设计、物理设计3个步骤,每个步骤的设计活动按照...
prometheus数据持久化... https://segmentfault.com/a/1190000015710814 promet...
孩子用什么样的灯对眼睛没有伤害... 现代社会高速发展,越来越多的人开始重视身体健康,尤其是很多家长ÿ...
微软Bing GPT支持AI绘... 我想要一张图片:大象、珊瑚、火山、云朵我想要一张图片:亚特兰蒂斯...