生成树配置

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Sw0:

Switch>en

Switch#conf t

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

Switch(config)#vlan 2

Switch(config-vlan)#exit

Switch(config)#int range f0/23 - 24

Switch(config-if-range)#switch mode trunk

Sw1:

Switch>en

Switch#conf t

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

Switch(config)#vlan 2

Switch(config-vlan)#exit

Switch(config)#int range f0/23 -24

Switch(config-if-range)#switch mode trunk

Sw0:

Switch(config)#spanning-tree vlan 1 root primary

Switch(config)#int f0/23

Switch(config-if)#spanning-tree vlan 1 port-priority 240

Sw1:

Switch(config)#int range f0/23 -24

Switch(config-if-range)#switch mode trunk

Switch(config-if-range)#exit

Switch(config)#spanning-tree vlan 2 root secondary指定根网桥(可选参数primary和secondary)

Switch(config)#int f0/24

Switch(config-if)#spanning-tree vlan 1 port-priority 240 修改端口优先等级为240(可选参数0-240)

Switch#sh spanning-tree vlan 1 查看生成树运行信息

Switch(config)#spanning-tree vlan +vlan号+primary和secondary启动生成树指定网桥Switch(config-if)#spanning-tree vlan +vlan号cost 19 修改端口路径成本为19即百兆宽带Switch(config)#int range f0/1 -20

Switch(config-if-range)#spanning-tree portfast 配置为速端口

Switch(config)#spanning-tree uplinkfast 配置上行链路

Sw0:

Switch>

Switch>en

Switch>en

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#vtp domain winsnet

Changing VTP domain name from NULL to winsnet

Switch(config)#vtp mode server

Device mode already VTP SERVER.

Switch(config)#vlan 2

Switch(config-vlan)#vlan 3

Switch(config-vlan)#vlan 4

Switch(config-vlan)#exit

Switch(config)#int range f 0/22 - 24

Switch(config-if-range)#switch trunk encapsulation dot1q Switch(config-if-range)#switch mode trunk

Sw1:

Switch>en

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#vtp domain winsnet

Changing VTP domain name from NULL to winsnet

Switch(config)#vtp mode client

Setting device to VTP CLIENT mode.

Switch(config)#int range f 0/24 - 23

Switch(config-if-range)#switch trunk encapsulation dot1q Switch(config-if-range)#switch mode trunk

Sw0二层;

Switch>en

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#vtp domain winsnet

Changing VTP domain name from NULL to winsnet

Switch(config)#vtp mode client

Setting device to VTP CLIENT mode.

Switch(config)#int range f 0/23 - 22

Switch(config-if-range)#switch mode trunk

Sw1二层:

Switch>en

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#vtp domain winsnet

Changing VTP domain name from NULL to winsnet

Switch(config)#vtp mode client

Setting device to VTP CLIENT mode.

Switch(config)#int range f 0/23 - 22

Switch(config-if-range)#switch mode trunk

Sw0:

Switch(config)#spanning-tree vlan 1 root primary

Switch(config)#spanning-tree vlan 2 root primary

Sw1:

Switch(config)#spanning-tree vlan 3 root secondary

Switch(config)#spanning-tree vlan 4 root secondary

如果在gns3上面要注意命令:

如果是创建vlan,必须在vlan数据库模式下

建立vtp也必须在vlan数据库模式下

使用show vlan命令必须加上;show vlan-switch

Vtp domain wisnet

Vtp mode server mode可以不要

包括加域也不要mode,直接输入:vtp client就好了

相关文档
最新文档