книги / Сети передачи данных
..pdfУбедимся в правильности приведенных на рис. 1.5 статусе и состоянии портов коммутаторов согласно разд. 1 пособия, исполь-
зуя вывод команд Show Spanning-Tree VLAN 1 и Show SpanningTree Detail. Состояние коммутаторов будет выглядеть так:
Sw1:
sw1.lab#show spanning-tree detail
VLAN0001 is executing the ieee compatible Spanning Tree protocol
Bridge Identifier has priority 32768, sysid 1, address 0019.3096.eb80
Configured hello time 2, max age 20, forward delay 15 We are the root of the spanning tree (здесь и далее цветом выделены важные элементы, к некоторым будут даны
пояснения)
Topology change flag not set, detected flag not set Number of topology changes 20 last change occurred
00:04:47 ago
Times: hold 1, topology change 35, notification 2 hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0,
aging 300
* Этот коммутатор стал корневым (Root Bridge для
VLAN 1).
Port 1 (FastEthernet0/1) of VLAN0001 is forwarding Port path cost 19, Port priority 128, Port Identi-
fier 128.1.
Designated root has priority 32769, address 0019.3096.eb80
Designated bridge has priority 32769, address 0019.3096.eb80
Designated port id is 128.1, designated path cost 0 Timers: message age 0, forward delay 0, hold 0 Number of transitions to forwarding state: 5
Link type is point-to-point by default
BPDU: sent 627, received 1981
* Path Cost для этого порта = 19, Port Priority = = 128, PID = 128.1.
31
Стр. 31 |
ЭБ ПНИПУ (elib.pstu.ru) |
Port 3 (FastEthernet0/3) of VLAN0001 is forwarding
Port path cost 19, Port priority 128, Port Identifier
128.3.
Designated root has priority 32769, address 0019.3096.eb80
Designated bridge has priority 32769, address 0019.3096.eb80
Designated port id is 128.3, designated path cost 0
Timers: message |
age 0, forward delay 0, hold 0 |
Number of transitions to forwarding state: 3 |
|
Link type is point-to-point by default |
|
BPDU: sent 179, |
received 1149 |
* Path Cost для |
этого порта = 19, Port Priority = |
= 128, PID = 128.3. |
|
Port 25 (GigabitEthernet0/1) of VLAN0001 is forwarding
Port path cost 4, Port priority 128, Port Identi-
fier 128.25.
Designated root has priority 32769, address 0019.3096.eb80
Designated bridge has priority 32769, address 0019.3096.eb80
Designated port id is 128.25, designated path cost 0 Timers: message age 0, forward delay 0, hold 0 Number of transitions to forwarding state: 3
Link type is point-to-point by default
BPDU: sent 169, received 2454
* Path Cost для этого порта = 4, Port Priority = = 128, PID = 128.25.
|
|
sw1.lab#show spanning-tree vlan 1 |
||
|
|
VLAN0001 |
||
|
|
Spanning tree enabled protocol ieee |
||
|
|
Root ID Priority 32769 |
||
|
|
Address 0019.3096.eb80 |
||
|
|
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 0019.3096.eb80 |
||
|
|
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec |
||
|
32 |
|
|
|
Стр. 32 |
|
ЭБ ПНИПУ (elib.pstu.ru) |
Aging Time 300 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
Interface |
Role |
|
Sts |
Cost |
Prio.Nbr |
Type |
||||||||||||
|
Fa0/1 |
|
Desg |
|
FWD |
|
19 |
|
|
|
128.1 |
|
|
|
P2p |
|
||
|
Fa0/3 |
|
Desg |
|
FWD |
|
19 |
|
|
|
128.3 |
|
|
|
P2p |
|
||
|
Gi0/1 |
|
Desg |
|
FWD |
|
4 |
|
|
|
128.25 |
|
|
P2p |
|
|||
* Role – |
роли портов на коммутаторе Sw1.lab. |
|
|
|
||||||||||||||
Sw2: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
sw2.lab#show |
spanning-tree detail |
|
|
|
|
|
|
|
|
VLAN0001 is executing the ieee compatible Spanning Tree protocol
Bridge Identifier has priority 32768, sysid 1, address 001c.b1de.6000
Configured hello time 2, max age 20, forward delay 15
Current root has priority 32769, address 0019.3096.eb80
Root port is 26 (GigabitEthernet0/2), cost of root path is 4
Topology change flag not set, detected flag not set Number of topology changes 24 last change occurred
00:04:59 ago
from GigabitEthernet0/1
Times: hold 1, topology change 35, notification 2 hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0,
aging 300
* Информация о том, что корневой Sw1, RPC = 4 от
Sw2 к Sw1.
Port 2 (FastEthernet0/2) of VLAN0001 is forwarding Port path cost 19, Port priority 128, Port Identi-
fier 128.2.
Designated root has priority 32769, address 0019.3096.eb80
Designated bridge has priority 32769, address 001c.b1de.6000
Designated port id is 128.2, designated path cost 4 Timers: message age 0, forward delay 0, hold 0 Number of transitions to forwarding state: 1
Link type is point-to-point by default
33
Стр. 33 |
ЭБ ПНИПУ (elib.pstu.ru) |
BPDU: sent 396, received 0
Port 25 (GigabitEthernet0/1) of VLAN0001 is forwarding
Port path cost 4, Port priority 128, Port Identi-
fier 128.25.
Designated root has priority 32769, address 0019.3096.eb80
Designated bridge has priority 32769, address 001c.b1de.6000
Designated port id is 128.25, designated path cost 4 Timers: message age 0, forward delay 0, hold 0 Number of transitions to forwarding state: 1
Link type is point-to-point by default BPDU: sent 755, received 2008
Port 26 (GigabitEthernet0/2) of VLAN0001 is forwarding
Port path cost 4, Port priority 128, Port Identi-
fier 128.26.
Designated root has priority 32769, address 0019.3096.eb80
Designated bridge has priority 32769, address 0019.3096.eb80
|
|
Designated port id is 128.25, designated path cost 0 |
||||
|
|
Timers: message age 2, forward delay 0, hold 0 |
||||
|
|
Number of transitions to forwarding state: 1 |
||||
|
|
Link type is point-to-point by default |
||||
|
|
BPDU: sent 2699, received 177 |
||||
|
|
Sw2.lab#show spanning-tree vlan 1 |
||||
|
|
VLAN0001 |
||||
|
|
Spanning tree enabled protocol ieee |
||||
|
|
|
|
|
|
|
|
|
Root ID Priority 32769 |
|
|
|
|
|
|
Address 0019.3096.eb80 |
|
|
|
|
|
|
Cost 4 |
|
|
|
|
|
|
Port 26 (GigabitEthernet0/2) |
|
|
||
|
|
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec |
|
|||
|
|
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) |
||||
|
|
Address 001c.b1de.6000 |
||||
|
|
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec |
||||
|
|
Aging Time 300 |
||||
|
34 |
|
|
|
|
|
Стр. 34 |
|
|
ЭБ ПНИПУ (elib.pstu.ru) |
Interface |
Role |
|
Sts |
Cost |
Prio.Nbr |
Type |
||||||||||||
|
Fa0/2 |
|
Desg |
|
FWD |
|
19 |
|
|
|
128.2 |
|
|
|
P2p |
|
||
|
Gi0/1 |
|
Desg |
|
FWD |
|
4 |
|
|
|
128.25 |
|
|
P2p |
|
|||
|
Gi0/2 |
|
Root |
|
FWD |
|
4 |
|
|
|
128.26 |
|
|
P2p |
|
|||
Sw3: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sw3.lab#show spanning-tree detail
VLAN0001 is executing the ieee compatible Spanning Tree protocol
Bridge Identifier has priority 32768, sysid 1, address 04fe.7f2b.e680
Configured hello time 2, max age 20, forward delay 15 Current root has priority 32769, address
0019.3096.eb80
Root port is 26 (GigabitEthernet0/2), cost of root path is 12
Topology change flag not set, detected flag not set Number of topology changes 42 last change occurred
00:04:28 ago
Times: hold 1, topology change 35, notification 2 hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0, aging 300
Port 1 (FastEthernet0/1) of VLAN0001 is alternate blocking
Port path cost 19, Port priority 128, Port Identifier 128.1.
Designated root has priority 32769, address 0019.3096.eb80
Designated bridge has priority 32769, address 0019.3096.eb80
Designated port id is 128.1, designated path cost 0 Timers: message age 1, forward delay 0, hold 0 Number of transitions to forwarding state: 4
Link type is point-to-point by default BPDU: sent 2488, received 933
Port 2 (FastEthernet0/2) of VLAN0001 is designated forwarding
35
Стр. 35 |
ЭБ ПНИПУ (elib.pstu.ru) |
Port path cost 19, Port priority 128, Port Identifier 128.2.
Designated root has priority 32769, address 0019.3096.eb80
Designated bridge has priority 32769, address 04fe.7f2b.e680
Designated port id is 128.2, designated path cost 12 Timers: message age 0, forward delay 0, hold 0 Number of transitions to forwarding state: 1
Link type is point-to-point by default BPDU: sent 380, received 0
Port 3 (FastEthernet0/3) of VLAN0001 is alternate blocking
Port path cost 19, Port priority 128, Port Identifier 128.3.
Designated root has priority 32769, address 0019.3096.eb80
Designated bridge has priority 32769, address 0019.3096.eb80
Designated port id is 128.3, designated path cost 0 Timers: message age 2, forward delay 0, hold 0 Number of transitions to forwarding state: 3
Link type is point-to-point by default BPDU: sent 1149, received 170
Port 26 (GigabitEthernet0/2) of VLAN0001 is root forwarding
Port path cost 4, Port priority 128, Port Identifier 128.26.
Designated root has priority 32769, address 0019.3096.eb80
Designated bridge has priority 32769, address 04fe.7f86.7980
Designated port id is 128.26, designated path cost 8 Timers: message age 4, forward delay 0, hold 0 Number of transitions to forwarding state: 1
Link type is point-to-point by default BPDU: sent 993, received 1758
Sw3.lab#show spanning-tree vlan 1
36
Стр. 36 |
ЭБ ПНИПУ (elib.pstu.ru) |
VLAN0001
Spanning tree enabled protocol ieee Root ID Priority 32769
Address 0019.3096.eb80 Cost 12
Port 26 (GigabitEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 04fe.7f2b.e680
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300
Interface |
Role |
|
Sts |
Cost |
Prio.Nbr |
Type |
||||||||||||
|
Fa0/1 |
|
Altn |
|
BLK |
|
19 |
|
|
|
128.1 |
|
|
|
P2p |
|
||
|
Fa0/2 |
|
Desg |
|
FWD |
|
19 |
|
|
|
128.2 |
|
|
|
P2p |
|
||
|
Fa0/3 |
|
Altn |
|
BLK |
|
19 |
|
|
|
128.3 |
|
|
|
P2p |
|
||
|
Gi0/2 |
|
Root |
|
FWD |
|
4 |
|
|
|
128.26 |
|
|
P2p |
|
|||
Sw4: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sw4.lab#show spanning-tree detail
VLAN0001 is executing the ieee compatible Spanning Tree protocol
Bridge Identifier has priority 32768, sysid 1, address 04fe.7f86.7980
Configured hello time 2, max age 20, forward delay 15
Current root has priority 32769, address
0019.3096.eb80
Root port is 25 (GigabitEthernet0/1), cost of root
path is 8
Topology change flag not set, detected flag not set Number of topology changes 18 last change occurred
00:04:12 ago
|
Times: hold 1, topology change 35, notification 2 |
|
hello 2, max age 20, forward delay 15 |
|
Timers: hello 0, topology change 0, notification 0, |
|
aging 300 |
|
Port 25 (GigabitEthernet0/1) of VLAN0001 is root |
|
forwarding |
|
37 |
Стр. 37 |
ЭБ ПНИПУ (elib.pstu.ru) |
Port path cost 4, Port priority 128, Port Identifier 128.25.
Designated root has priority 32769, address 0019.3096.eb80
Designated bridge has priority 32769, address 001c.b1de.6000
Designated port id is 128.25, designated path cost 4 Timers: message age 3, forward delay 0, hold 0 Number of transitions to forwarding state: 1
Link type is point-to-point by default BPDU: sent 2008, received 730
Port 26 (GigabitEthernet0/2) of VLAN0001 is designated forwarding
Port path cost 4, Port priority 128, Port Identifier 128.26.
Designated root has priority 32769, address 0019.3096.eb80
Designated bridge has priority 32769, address 04fe.7f86.7980
Designated port id is 128.26, designated path cost 8 Timers: message age 0, forward delay 0, hold 0 Number of transitions to forwarding state: 1
Link type is point-to-point by default BPDU: sent 1750, received 993
sw4.lab#show spanning-tree vlan 1
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0019.3096.eb80
Cost 8
Port 25 (GigabitEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 04fe.7f86.7980
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300
38
Стр. 38 |
ЭБ ПНИПУ (elib.pstu.ru) |
Interface |
Role |
|
Sts |
Cost |
Prio.Nbr |
Type |
||||||||
|
Gi0/1 |
|
Root |
|
FWD |
|
4 |
|
|
128.25 |
|
|
P2p |
|
|
Gi0/2 |
|
Desg |
|
FWD |
|
4 |
|
|
128.26 |
|
|
P2p |
|
1.2.2. Изменение места положения корня
Изменим место положения корневого коммутатора путем уменьшения поля приоритета в ВID. Например, чтобы Root Bridge стал Sw2 (рис. 1.12), изменим его приоритет в BID.
Рис. 1.12. Смена корневого моста
Настройте приоритет 4096 на Sw2:
Sw2:
sw2.lab#configure terminal
sw2.lab(config)# spanning-tree vlan 1 priority 4096
В результате вывод команды Show Spanning-Tree VLAN 1 на коммутаторах:
39
Стр. 39 |
ЭБ ПНИПУ (elib.pstu.ru) |
Sw1:
sw1.lab#show spanning-tree vlan 1
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 4097
Address 001c.b1de.6000
Cost 4
Port 25 (GigabitEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 0019.3096.eb80
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 15
Interface |
Role |
Sts |
Cost |
Prio.Nbr |
Type |
Fa0/1 |
Desg |
FWD |
19 |
128.1 |
P2p |
Fa0/3 |
Desg |
FWD |
19 |
128.3 |
P2p |
Gi0/1 |
Root |
FWD |
4 |
128.25 |
P2p |
*Информация о том, какой сейчас новый Root Bridge.
Sw2:
sw2.lab#show spanning-tree vlan 1
18w1d: %SYS-5-CONFIG_I: Configured from console by console
40
Стр. 40