SWA
Switch>en Switch#conf t
Switch(config)#no ip do lookup
Switch(config)#no ip domain-lookup Switch(config)#lin con 0
Switch(config-line)#logging sy Switch(config-line)#exec-t 0 Switch(config-line)#exit //交换机基础设置
Switch(config)#ho SWA //交换机改名为SWA
SWA(config)#
SWA(config)#int r f0/22-24 SWA(config-if-range)#sw m tr SWA(config-if-range)#
SWA(config-if-range)#no shu SWA(config-if-range)#exit SWA(config)#int r f0/1 - 2 SWA(config-if-range)#sw m tr SWA(config-if-range)#
SWA(config-if-range)#no shu SWA(config-if-range)#exit
//设置端口22-24 和端口1-2为trunk 并激活端口
SWA(config)#vtp do abc SWA(config)#vtp m s
SWA(config)#vtp m server SWA(config)#vtp v 2
//设置vtp域名为abc 交换机A为vtp服务器 SWA(config)#vl 10
SWA(config-vlan)#na 10 SWA(config-vlan)#vl 20 SWA(config-vlan)#na 20 SWA(config-vlan)#vl 30 SWA(config-vlan)#na 30 SWA(config-vlan)#vl 40 SWA(config-vlan)#na 40 SWA(config-vlan)#exit
//建立vlan10 vlan20 vlan30 vlan40 四个vlan
SWA(config)#int vl 1
SWA(config-if)#ip add 192.168.1.100 255.255.255.0 SWA(config-if)#no shu SWA(config-if)# SWA(config-if)#exit
//设置交换机A的ip地址为 192.168.1.100 子网掩码为 255.255.255.0
SWA(config)#do sh vtp st do sh vtp st
VTP Version : 2 Configuration Revision : 9
Maximum VLANs supported locally : 1005 Number of existing VLANs : 10
VTP Operating Mode : Server VTP Domain Name : abc VTP Pruning Mode : Disabled VTP V2 Mode : Enabled VTP Traps Generation : Disabled
MD5 digest : 0x26 0xB8 0x3B 0xC2 0x33 0x47 0xBF 0xD1
Configuration last modified by 192.168.1.100 at 3-1-93 01:03:39
Local updater ID is 192.168.1.100 on interface Vl1 (lowest numbered VLAN interface found) //查看vtp信息
SWA(config)#do sh vl br
VLAN Name Status Ports ---- -------------------------------- --------- -------------------------------
1 default active Fa0/3, Fa0/4, Fa0/5, Fa0/6 Fa0/7, Fa0/8, Fa0/9, Fa0/10
Fa0/11, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/21, Gig0/1
Gig0/2 10 10 active 20 20 active 30 30 active 40 40 active 1002 fddi-default active
1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active // 查看vlan信息
将22-24和1-2端口激活并设置成trunk 设置SWA为vpt 服务器
建立vl10 vl20 vl30 vl40
设置SWA ip:192.168.1.100 255.255.255.0
SWA(config)#spanning-tree vlan 10 root primary SWA(config)#do sh sp VLAN0001
Spanning tree enabled protocol ieee Root ID Priority 32769
Address 0002.4A2C.3908 Cost 19
Port 1(FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 0010.11A2.9154
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Root FWD 19 128.1 P2p Fa0/22 Desg FWD 19 128.22 P2p Fa0/23 Desg FWD 19 128.23 P2p Fa0/24 Altn BLK 19 128.24 P2p Fa0/2 Altn BLK 19 128.2 P2p
VLAN0010
Spanning tree enabled protocol ieee Root ID Priority 24586
Address 0010.11A2.9154 This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 24586 (priority 24576 sys-id-ext 10) Address 0010.11A2.9154
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Desg FWD 19 128.1 P2p Fa0/22 Desg FWD 19 128.22 P2p Fa0/23 Desg FWD 19 128.23 P2p Fa0/24 Desg LSN 19 128.24 P2p Fa0/2 Desg LSN 19 128.2 P2p
VLAN0020
Spanning tree enabled protocol ieee Root ID Priority 32788
Address 0002.4A2C.3908 Cost 19
Port 1(FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32788 (priority 32768 sys-id-ext 20) Address 0010.11A2.9154
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Root FWD 19 128.1 P2p Fa0/22 Desg FWD 19 128.22 P2p Fa0/23 Desg FWD 19 128.23 P2p Fa0/24 Altn BLK 19 128.24 P2p Fa0/2 Altn BLK 19 128.2 P2p
VLAN0030
Spanning tree enabled protocol ieee Root ID Priority 32798
Address 0002.4A2C.3908 Cost 19
Port 1(FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32798 (priority 32768 sys-id-ext 30) Address 0010.11A2.9154
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Root FWD 19 128.1 P2p Fa0/22 Desg FWD 19 128.22 P2p Fa0/23 Desg FWD 19 128.23 P2p Fa0/24 Altn BLK 19 128.24 P2p Fa0/2 Altn BLK 19 128.2 P2p
VLAN0040
Spanning tree enabled protocol ieee Root ID Priority 32808
Address 0002.4A2C.3908 Cost 19
Port 1(FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32808 (priority 32768 sys-id-ext 40) Address 0010.11A2.9154
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
SWA(config)#spanning-tree vlan 20 root primary
//将在交换机A上修改vlan10 vlan20 的根网桥优先级,修改后SWA是vlan10 vlan20的根网桥
SWA(config)#in r f0/1 -2
SWA(config-if-range)#channel-group 1 mode on SWA(config-if-range)# SWA(config-if-range)#end //设置以太网通道 组号为1 SWA#
SWA#sh etherchannel summary
Flags: D - down P - in port-channel I - stand-alone s - suspended H - Hot-standby (LACP only) R - Layer3 S - Layer2
U - in use f - failed to allocate aggregator u - unsuitable for bundling w - waiting to be aggregated d - default port
Number of channel-groups in use: 1 Number of aggregators: 1
Group Port-channel Protocol Ports
------+-------------+-----------+----------------------------------------------
1 Po1(SU) PAgP Fa0/1(P) Fa0/2(P) SWA#
//查看以太网通道(P) : 代表成功 (D):代表失败 SWA(config)#do sh sp VLAN0001
Spanning tree enabled protocol ieee Root ID Priority 32769
Address 0002.4A2C.3908 Cost 9
Port 27(Port-channel 1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 0010.11A2.9154
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Desg FWD 19 128.1 P2p Fa0/22 Desg FWD 19 128.22 P2p Fa0/23 Desg FWD 19 128.23 P2p Fa0/24 Altn BLK 19 128.24 P2p Fa0/2 Desg FWD 19 128.2 P2p Po1 Root FWD 9 128.27 Shr
VLAN0010
Spanning tree enabled protocol ieee Root ID Priority 24586
Address 0010.11A2.9154 This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 24586 (priority 24576 sys-id-ext 10) Address 0010.11A2.9154
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p Fa0/22 Desg FWD 19 128.22 P2p Fa0/23 Desg FWD 19 128.23 P2p Fa0/24 Desg FWD 19 128.24 P2p Fa0/2 Desg FWD 19 128.2 P2p Po1 Desg FWD 9 128.27 Shr
VLAN0020
Spanning tree enabled protocol ieee Root ID Priority 24596
Address 0002.4A2C.3908 Cost 9
Port 27(Port-channel 1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 24596 (priority 24576 sys-id-ext 20) Address 0010.11A2.9154
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Desg FWD 19 128.1 P2p Fa0/22 Desg FWD 19 128.22 P2p Fa0/23 Desg FWD 19 128.23 P2p Fa0/24 Altn BLK 19 128.24 P2p Fa0/2 Desg FWD 19 128.2 P2p Po1 Root FWD 9 128.27 Shr
VLAN0030
Spanning tree enabled protocol ieee Root ID Priority 24606
Address 0002.4A2C.3908 Cost 9
Port 27(Port-channel 1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32798 (priority 32768 sys-id-ext 30) Address 0010.11A2.9154
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p Fa0/22 Desg FWD 19 128.22 P2p Fa0/23 Desg FWD 19 128.23 P2p Fa0/24 Altn BLK 19 128.24 P2p Fa0/2 Desg FWD 19 128.2 P2p Po1 Root FWD 9 128.27 Shr
VLAN0040
Spanning tree enabled protocol ieee Root ID Priority 24616
Address 0002.4A2C.3908 Cost 9
Port 27(Port-channel 1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32808 (priority 32768 sys-id-ext 40) Address 0010.11A2.9154
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Desg FWD 19 128.1 P2p Fa0/22 Desg FWD 19 128.22 P2p Fa0/23 Desg FWD 19 128.23 P2p Fa0/24 Altn BLK 19 128.24 P2p Fa0/2 Desg FWD 19 128.2 P2p Po1 Root FWD 9 128.27 Shr
VLAN0050
Spanning tree enabled protocol ieee Root ID Priority 32818
Address 0002.4A2C.3908 Cost 9
Port 27(Port-channel 1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32818 (priority 32768 sys-id-ext 50) Address 0010.11A2.9154
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p Fa0/22 Desg FWD 19 128.22 P2p Fa0/23 Desg FWD 19 128.23 P2p Fa0/24 Altn BLK 19 128.24 P2p Fa0/2 Desg FWD 19 128.2 P2p Po1 Root FWD 9 128.27 Shr //在后面又建立一个vlan50 查看所有的生成树 SWA#
设置vlan10 vlan20 的根网桥为SWA 设置以太网通道
SWB
Switch>en Switch#conf t
Switch(config)#ho SWB
SWB(config)#no ip domain lookup SWB(config)#lin con 0 SWB(config-line)#logg
SWB(config-line)#logging sy SWB(config-line)#exec-t 0 SWB(config-line)#exit SWB(config)#int r f0/22-24 SWB(config-if-range)#sw m tr SWB(config-if-range)#
SWB(config-if-range)#no shu SWB(config-if-range)#int r f0/1-2 SWB(config-if-range)#sw m tr SWB(config-if-range)#no shu SWB(config-if-range)#exit SWB(config)#
设置22-24和1-2端口激活并设置trunk 交换机基础配置
SWB(config)#vtp do abc SWB(config)#vtp m c SWB(config)#do sh vtp st
VTP Version : 2 Configuration Revision : 9
Maximum VLANs supported locally : 1005 Number of existing VLANs : 9
VTP Operating Mode : Client VTP Domain Name : abc
VTP Pruning Mode : Disabled VTP V2 Mode : Enabled VTP Traps Generation : Disabled
MD5 digest : 0x84 0x71 0xFA 0x24 0xBC 0xAE 0xE6 0x29
Configuration last modified by 192.168.1.100 at 3-1-93 00:14:19
SWB(config)#do sh vl br
VLAN Name Status Ports ---- -------------------------------- --------- -------------------------------
1 default active Fa0/3, Fa0/4, Fa0/5, Fa0/6 Fa0/7, Fa0/8, Fa0/9, Fa0/10
Fa0/11, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/21, Gig0/1
Gig0/2 10 10 active 20 20 active 30 30 active 40 40 active 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active SWB(config)#
设置vtp为客户端 学习到vtp中 vlan信息
spanning-tree vl 30 root primary
SWB(config)#spanning-tree vl 40 root primary SWB(config)#do sh sp VLAN0001
Spanning tree enabled protocol ieee Root ID Priority 32769
Address 0002.4A2C.3908 This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 0002.4A2C.3908
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Desg FWD 19 128.1 P2p Fa0/2 Desg FWD 19 128.2 P2p Fa0/22 Desg FWD 19 128.22 P2p Fa0/23 Desg FWD 19 128.23 P2p Fa0/24 Desg FWD 19 128.24 P2p
VLAN0010
Spanning tree enabled protocol ieee Root ID Priority 24586
Address 0010.11A2.9154 Cost 19
Port 1(FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32778 (priority 32768 sys-id-ext 10) Address 0002.4A2C.3908
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Root FWD 19 128.1 P2p Fa0/2 Altn BLK 19 128.2 P2p Fa0/22 Desg FWD 19 128.22 P2p Fa0/23 Desg FWD 19 128.23 P2p Fa0/24 Altn BLK 19 128.24 P2p
VLAN0020
Spanning tree enabled protocol ieee Root ID Priority 24596
Address 0002.4A2C.3908 This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 24596 (priority 24576 sys-id-ext 20) Address 0002.4A2C.3908
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Desg FWD 19 128.1 P2p Fa0/2 Desg FWD 19 128.2 P2p Fa0/22 Desg FWD 19 128.22 P2p Fa0/23 Desg FWD 19 128.23 P2p Fa0/24 Desg FWD 19 128.24 P2p
VLAN0030
Spanning tree enabled protocol ieee Root ID Priority 24606
Address 0002.4A2C.3908 This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 24606 (priority 24576 sys-id-ext 30) Address 0002.4A2C.3908
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Desg FWD 19 128.1 P2p Fa0/2 Desg FWD 19 128.2 P2p Fa0/22 Desg FWD 19 128.22 P2p Fa0/23 Desg FWD 19 128.23 P2p Fa0/24 Desg FWD 19 128.24 P2p
VLAN0040
Spanning tree enabled protocol ieee Root ID Priority 24616
Address 0002.4A2C.3908 This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 24616 (priority 24576 sys-id-ext 40) Address 0002.4A2C.3908
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p Fa0/2 Desg FWD 19 128.2 P2p Fa0/22 Desg FWD 19 128.22 P2p Fa0/23 Desg FWD 19 128.23 P2p Fa0/24 Desg FWD 19 128.24 P2p
SWB(config)#
设置vlan30 vlan40的根网桥为SWB 查看生成树
SWB(config)#in r f0/1 -2
SWB (config-if-range)#channel-group 1 mode on SWB (config-if-range)# SWB (config-if-range)#end //设置以太网通道 组号为1 SWB#
SWB#sh etherchannel summary
Flags: D - down P - in port-channel I - stand-alone s - suspended H - Hot-standby (LACP only) R - Layer3 S - Layer2
U - in use f - failed to allocate aggregator u - unsuitable for bundling w - waiting to be aggregated d - default port
Number of channel-groups in use: 1 Number of aggregators: 1
Group Port-channel Protocol Ports
------+-------------+-----------+----------------------------------------------
1 Po1(SU) PAgP Fa0/1(P) Fa0/2(P) SWB#
//查看以太网通道(P) : 代表成功 (D):代表失败
SWC Switch> Switch>en Switch#conf t
Switch(config)#ho SWC
SWC(config)#no ip domain lookup
SWC(config)#lin con 0
SWC(config-line)#logging sy SWC(config-line)#exec-t 0 SWC(config-line)#exit SWC(config)#int r f0/22-23 SWC(config-if-range)#sw m tr SWC(config-if-range)#no shu SWC(config-if-range)#exit SWC(config)#vtp do abc
Domain name already set to abc. SWC(config)#vtp m c SWC(config)#do sh vl br
VLAN Name Status Ports ---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/24, Gig1/1, Gig1/2
10 10 active 20 20 active 30 30 active 40 40 active 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active SWC(config)#
设置22-23端口为trunk并激活 设置vtp为客户端 学习vlan信息
SWC SWC(config )#int r f0/1-20
SWC(config-if-range)#spanning-tree portfast
SWC(config-if-range)#do sh sp VLAN0001
Spanning tree enabled protocol ieee Root ID Priority 32769
Address 0002.4A2C.3908 Cost 19
Port 23(FastEthernet0/23)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 0030.A342.7D15
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Desg FWD 19 128.1 P2p Fa0/22 Altn BLK 19 128.22 P2p Fa0/23 Root FWD 19 128.23 P2p
VLAN0010
Spanning tree enabled protocol ieee Root ID Priority 24586
Address 0010.11A2.9154 Cost 19
Port 22(FastEthernet0/22)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32778 (priority 32768 sys-id-ext 10) Address 0030.A342.7D15
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- -------------------------------- Fa0/22 Root FWD 19 128.22 P2p Fa0/23 Altn BLK 19 128.23 P2p
VLAN0020
Spanning tree enabled protocol ieee Root ID Priority 24596
Address 0002.4A2C.3908 Cost 19
Port 23(FastEthernet0/23)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32788 (priority 32768 sys-id-ext 20) Address 0030.A342.7D15
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- -------------------------------- Fa0/22 Altn BLK 19 128.22 P2p Fa0/23 Root FWD 19 128.23 P2p
VLAN0030
Spanning tree enabled protocol ieee Root ID Priority 24606
Address 0002.4A2C.3908 Cost 19
Port 23(FastEthernet0/23)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32798 (priority 32768 sys-id-ext 30) Address 0030.A342.7D15
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- -------------------------------- Fa0/22 Altn BLK 19 128.22 P2p Fa0/23 Root FWD 19 128.23 P2p
VLAN0040
Spanning tree enabled protocol ieee Root ID Priority 24616
Address 0002.4A2C.3908 Cost 19
Port 23(FastEthernet0/23)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32808 (priority 32768 sys-id-ext 40) Address 0030.A342.7D15
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- -------------------------------- Fa0/22 Altn BLK 19 128.22 P2p
Fa0/23 Root FWD 19 128.23 P2p
SWC(config-if-range)#spanning-tree uplinkfast
设置成1-20端口为速端口 设置速链路
查看生成树 检验:1、SWA 是vlan10和vlan20的根网桥吗 2、SWB是vlan30 vlan40的根网桥吗
SWD Switch> Switch>en Switch#conf t
Switch(config)#no ip domain lookup Switch(config)#lin con 0
Switch(config-line)#logging sy Switch(config-line)#exec-t 0 Switch(config-line)#exit Switch(config)#int r f0/22-23 Switch(config-if-range)#sw m tr Switch(config-if-range)#no shu Switch(config-if-range)#exit Switch(config)#vtp do abc Switch(config)#vtp m c Switch(config)#do sh vl br
VLAN Name Status Ports ---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/24, Gig1/1, Gig1/2
10 10 active 20 20 active 30 30 active
40 40 active 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active Switch(config)#
设置22-23端口为trunk并激活 设置vtp为客户端 学习vlan信息
Switch(config)#do sh sp VLAN0001
Spanning tree enabled protocol ieee Root ID Priority 32769
Address 0002.4A2C.3908 Cost 19
Port 22(FastEthernet0/22)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 0060.3EC2.E1DA
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Desg FWD 19 128.1 P2p Fa0/22 Root FWD 19 128.22 P2p Fa0/23 Altn BLK 19 128.23 P2p
VLAN0010
Spanning tree enabled protocol ieee Root ID Priority 24586
Address 0010.11A2.9154 Cost 19
Port 23(FastEthernet0/23)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32778 (priority 32768 sys-id-ext 10) Address 0060.3EC2.E1DA
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- -------------------------------- Fa0/22 Altn BLK 19 128.22 P2p Fa0/23 Root FWD 19 128.23 P2p
VLAN0020
Spanning tree enabled protocol ieee Root ID Priority 24596
Address 0002.4A2C.3908 Cost 19
Port 22(FastEthernet0/22)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32788 (priority 32768 sys-id-ext 20) Address 0060.3EC2.E1DA
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- -------------------------------- Fa0/22 Root FWD 19 128.22 P2p Fa0/23 Altn BLK 19 128.23 P2p
VLAN0030
Spanning tree enabled protocol ieee Root ID Priority 24606
Address 0002.4A2C.3908 Cost 19
Port 22(FastEthernet0/22)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32798 (priority 32768 sys-id-ext 30) Address 0060.3EC2.E1DA
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- -------------------------------- Fa0/22 Root FWD 19 128.22 P2p Fa0/23 Altn BLK 19 128.23 P2p
VLAN0040
Spanning tree enabled protocol ieee Root ID Priority 24616
Address 0002.4A2C.3908
Cost 19
Port 22(FastEthernet0/22)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32808 (priority 32768 sys-id-ext 40) Address 0060.3EC2.E1DA
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- -------------------------------- Fa0/22 Root FWD 19 128.22 P2p Fa0/23 Altn BLK 19 128.23 P2p
Switch(config)#int r f0/1 - 20
Switch(config-if-range)#spanning-tree portfast Switch(config)#spanning-tree uplinkfast 设置成1-20端口为速端口 设置速链路
查看生成树 检验:1、SWA 是vlan10和vlan20的根网桥吗 2、SWB是vlan30 vlan40的根网桥吗
因篇幅问题不能全部显示,请点此查看更多更全内容