Типовая схема для использования VPC:

Предполагается использование пары в качестве STP root в сети, командой system priority value устанавливается приоритет системы для отправки в VPC порты. Должен быть одинаковый на обоих устройствах. При этом, если установлено значение, отличное от допустимых для приоритета STP/RSTP, число будет округлено в меньшую сторону. Например, если использовать system priority 101, то в приоритете STP/RSTP будет установлен 0.
Конфигурация vpc-домена:
Switch_1
vpc domain 1
peer detection
peer detection ipaddr 1.1.1.2 1.1.1.1
peer keepalive
role priority 1
system priority 101
peer link port-channel 1
exit
Switch_2
vpc domain 1
peer detection
peer detection ipaddr 1.1.1.1 1.1.1.2
peer keepalive
role priority 2
system priority 101
peer link port-channel 1
exit
В качестве Root ID и Bridge ID парой используется system-mac-addr вида 00:02:bc:00:82:01, где 01 - номер домена.
Просмотр состояния STP на всех устройствах схемы:
Switch_1#show spanning-tree active
Spanning tree enabled mode: RSTP
Default port cost method: long
Loopback guard: Disabled
TC protection: Disabled
Root ID Priority: 0
Address: 00:02:bc:00:82:01
This switch is the root
Hello Time: 2 sec Max Age: 20 sec Forward Delay: 15 sec
Number of TC BPDU handled 6
Number of topology changes: 5 last change occurred: 00:08:31 ago
from Po2
Times: hold: 1, topology change: 35, notification: 2
hello: 2, max age: 20, forward delay: 15
Interfaces
Name State Prio.Nbr Cost Sts Role PortFast Type
---------- -------- --------- -------- ------ ---- -------- -----------------
Po1 enabled 128.1000 2000 Frw Desg No P2P (RSTP)
Po2 enabled 128.1001 2000 Frw Desg No P2P (RSTP)
Po3 enabled 128.1002 2000 Frw Desg No P2P (RSTP)
Switch_2#show spanning-tree active
Spanning tree enabled mode: RSTP
Default port cost method: long
Loopback guard: Disabled
TC protection: Disabled
Root ID Priority: 0
Address: 00:02:bc:00:82:01
This switch is the root
Hello Time: 2 sec Max Age: 20 sec Forward Delay: 15 sec
Number of TC BPDU handled 6
Number of topology changes: 4 last change occurred: 00:08:31 ago
from Po2
Times: hold: 1, topology change: 35, notification: 2
hello: 2, max age: 20, forward delay: 15
Interfaces
Name State Prio.Nbr Cost Sts Role PortFast Type
---------- -------- --------- -------- ------ ---- -------- -----------------
Po1 enabled 128.1000 2000 Frw Desg No P2P (RSTP)
Po2 enabled 128.1001 2000 Frw Desg No P2P (RSTP)
Po3 enabled 128.1002 2000 Frw Desg No P2P (RSTP)
Access_1# show spanning-tree active
*********************************** Process 0 ***********************************
Spanning tree enabled mode RSTP
Default port cost method: long
Loopback guard: Disabled
Loop guard default: Disabled
TC protection: Disabled
Root ID Priority 0
Address 00:02:bc:00:82:01
Cost 1000
Port Po1
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768
Address e4:5a:d4:d3:66:40
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Number of TC BPDU handled 24
Number of topology changes 2 last change occurred 00:08:32 ago
from Po1
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Interfaces
Name State Prio.Nbr Cost Sts Role PortFast Type
--------- --------- -------- -------- ------ ---- -------- ----------------------------
Po1 enabled 128.1000 1000 Frw Root No P2P (RSTP)
Access_2#show spanning-tree active
*********************************** Process 0 ***********************************
Spanning tree enabled mode RSTP
Default port cost method: long
Loopback guard: Disabled
Loop guard default: Disabled
TC protection: Disabled
Root ID Priority 0
Address 00:02:bc:00:82:01
Cost 1000
Port Po1
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768
Address e4:5a:d4:6a:16:00
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Number of TC BPDU handled 12
Number of topology changes 2 last change occurred 00:08:31 ago
from Po1
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Interfaces
Name State Prio.Nbr Cost Sts Role PortFast Type
--------- --------- -------- -------- ------ ---- -------- ----------------------------
Po1 enabled 128.1000 1000 Frw Root No P2P (RSTP)
Если Root в сети должно быть какое-либо другое устройство, то конфигурация пары меняется, STP-приоритет паре устанавливается командой spanning-tree priority value. Должен быть одинаковым на обоих устройствах.
В примере Access_1 выбран в качестве STP root.
Switch_1#show running-config
spanning-tree priority 8192
!
vlan database
vlan 10,1001
exit
!
vpc
vpc domain 1
peer detection
peer detection ipaddr 1.1.1.2 1.1.1.1
peer keepalive
role priority 1
peer link port-channel 1
exit
Switch_1#show spanning-tree active
Spanning tree enabled mode: RSTP
Default port cost method: long
Loopback guard: Disabled
TC protection: Disabled
Root ID Priority: 0
Address: e4:5a:d4:d3:66:40
Cost: 2000
Port: Po2
Hello Time: 2 sec Max Age: 20 sec Forward Delay: 15 sec
Bridge ID Priority: 8192
Address: 00:02:bc:00:82:01
Hello Time: 2 sec Max Age: 20 sec Forward Delay: 15 sec
Number of TC BPDU handled 9
Number of topology changes: 6 last change occurred: 00:25:31 ago
from Po2
Times: hold: 1, topology change: 35, notification: 2
hello: 2, max age: 20, forward delay: 15
Interfaces
Name State Prio.Nbr Cost Sts Role PortFast Type
---------- -------- --------- -------- ------ ---- -------- -----------------
Po1 enabled 128.1000 2000 Frw Desg No P2P (RSTP)
Po2 enabled 128.1001 2000 Frw Root No P2P (RSTP)
Po3 enabled 128.1002 2000 Frw Desg No P2P (RSTP)
Если STP BPDU попадает на Primary коммутатор, то через Peer-Link информация передается к Secondary в служебных VPC-сообщениях. Аналогично механизм работает, если STP BPDU поступает на Secondary.
При падении Root-интерфейса на одном из коммутаторов пары, новым Root-интерфейсом будет Peer-Link.
15-Aug-2024 02:27:06 %LINK-W-Down: te1/0/12
15-Aug-2024 02:27:06 %TRUNK-W-PORTREMOVED: Port te1/0/12 removed from Po2
15-Aug-2024 02:27:06 %STP-N-ROOTBRIDGECHANGE: This bridge is root.
15-Aug-2024 02:27:06 %LINK-W-Down: Po2
15-Aug-2024 02:27:06 %STP-N-ROOTBRIDGECHANGE: New root bridge e4:5a:d4:d3:66:40 is on Po1.
Switch_1#show spanning-tree active
Spanning tree enabled mode: RSTP
Default port cost method: long
Loopback guard: Disabled
TC protection: Disabled
Root ID Priority: 0
Address: e4:5a:d4:d3:66:40
Cost: 4000
Port: Po1
Hello Time: 2 sec Max Age: 20 sec Forward Delay: 15 sec
Bridge ID Priority: 8192
Address: 00:02:bc:00:82:01
Hello Time: 2 sec Max Age: 20 sec Forward Delay: 15 sec
Number of TC BPDU handled 9
Number of topology changes: 6 last change occurred: 00:26:28 ago
from Po2
Times: hold: 1, topology change: 35, notification: 2
hello: 2, max age: 20, forward delay: 15
Interfaces
Name State Prio.Nbr Cost Sts Role PortFast Type
---------- -------- --------- -------- ------ ---- -------- -----------------
Po1 enabled 128.1000 2000 Frw Root No P2P (RSTP)
Po3 enabled 128.1002 2000 Frw Desg No P2P (RSTP)
Комментарии (11)