项目二 任务三 训练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

相关内容

热门资讯

在岸人民币兑美元收盘大跌479... 11月12日消息,在岸人民币兑美元收盘大跌479点至7.2378元,创8月1日以来新低。
香港将促进大湾区内的跨境低空飞... 11月12日消息,香港新一份施政报告宣布成立“发展低空经济工作组”,香港特区政府财政司副司长黄伟纶今...
上交所就世茂能源筹划发行股份购... 11月12日消息,今日,上交所就世茂能源筹划发行股份购买资产事项下发监管工作函,涉及对象为上市公司、...
重庆前10月重点项目投资超40... 11月12日消息,重庆市发改委最新统计数据显示,1—10月,市级重点建设项目已完成投资4003亿元,...
李子柒时隔3年公开更新视频 11月12日消息,2024年11月12日,李子柒时隔3年在社交平台公开更新视频,表示“很想你们”。文...
2025北京会议策划公司推荐|... 2025北京会议策划公司推荐|政企+商务+北京飞鸟创意首选! 在北京这座汇聚了国家部委、世界500强...
方洪波:“生成式”美的未来 方洪波有其理想主义的一面,但更是一位极其务实的改革者。文|《中国企业家》记者 梁宵编辑|米娜头图摄影...
优迅股份登陆科创板 国产光通信... 中经记者 谭伦 北京报道12月19日,厦门优迅芯片股份有限公司(688807.SH,以下简称“优迅股...
一年消失三百多家,中小银行遭遇... 放在以前,银行的工作,可都被大家称之为“铁饭碗”,毕竟只要有人花钱,银行这“存钱”跟“借钱”的生意基...
ALL IN中国供应链,拼多多... *此图由AI生成作者| 史大郎&猫哥来源| 是史大郎&大猫财经Pro“3年时间Temu走了拼多多差不...