本文档介绍如何在Cisco Nexus 7000系列交换机上配置对等交换机,以允许非虚拟端口通道(非vPC)连接在VLAN之间实现负载均衡。
启用对等交换机后,每台Nexus 7000交换机共享一个虚拟网桥ID,这允许两台交换机充当VLAN的根。对于vPC域中连接到每台Nexus 7000交换机但无法建立端口通道的设备,第2层(L2)拓扑依靠生成树协议(STP)来阻止冗余链路。对等交换机功能允许伪STP配置允许非vPC连接在两台Nexus 7000交换机之间对STP状态进行负载均衡。本文档详细讨论伪STP配置的原因以及它们如何影响非vPC和vPC链路。
vPC和非vPC链路的混合称为混合设置。
本文档中配置示例中使用的每台交换机的MAC地址为:
Cisco 建议您了解以下主题:
本文档中的信息基于带Supervisor 1模块的Cisco Nexus 7000系列交换机。
本文档中的信息都是基于特定实验室环境中的设备编写的。 本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
这是未启用对等交换机的混合设置的网络图。两台Nexus 7000交换机的优先级均配置为8192,用于所有VLAN。N7K-1赢得网桥选举,因为它具有较低的网桥ID。因此,您预期SW-1会阻塞来自N7K-2的链路。SW-2通过vPC连接到Nexus 7000交换机,并将处于转发状态。 SW-2仅从vPC中的主交换机(本例中为N7K-1)接收网桥协议数据单元(BPDU)。
SW-1# show span vlan 1VLAN0001
Spanning tree enabled protocol rstp
Root ID Priority 8193
Address 0024.986f.3b41
Cost 4
Port 295 (Ethernet2/39)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0024.986f.3b44
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Eth2/39 Root FWD 4 128.295 P2p
Eth2/40 Altn BLK 4 128.296 P2p
SW-1# show span vlan 1 detail
VLAN0001 is executing the rstp compatible Spanning Tree protocol
Bridge Identifier has priority 32768, sysid 1, address 0024.986f.3b44
Configured hello time 2, max age 20, forward delay 15
Current root has priority 8193, address 0024.986f.3b41
Root port is 295 (Ethernet2/39), cost of root path is 4
Topology change flag not set, detected flag not set
Number of topology changes 4 last change occurred 0:29:13 ago
from Ethernet2/39
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0
Port 295 (Ethernet2/39) of VLAN0001 is root forwarding
Port path cost 4, Port priority 128, Port Identifier 128.295
Designated root has priority 8193, address 0024.986f.3b41
Designated bridge has priority 8193, address 0024.986f.3b41
Designated port id is 128.260, designated path cost 0, Topology change is set
Timers: message age 16, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is point-to-point by default
BPDU: sent 4, received 898
Port 296 (Ethernet2/40) of VLAN0001 is alternate blocking
Port path cost 4, Port priority 128, Port Identifier 128.296
Designated root has priority 8193, address 0024.986f.3b41
Designated bridge has priority 8193, address 0024.986f.3b42 <-- Although same priority,
Designated port id is 128.272, designated path cost 2 advertising Bridge ID is higher
Timers: message age 16, forward delay 0, hold 0 and therefore this link is BLK
Number of transitions to forwarding state: 2
Link type is point-to-point by default
BPDU: sent 6, received 895
这是启用了对等交换机的混合设置的网络图。启用对等交换机后,每台Nexus 7000交换机共享一个虚拟网桥ID,允许两台交换机充当VLAN的根。vPC对等链路始终处于转发状态并运行L2网关互连协议(L2GIP),以防止桥接环路。
每台Nexus 7000交换机发送BPDU,其中根网桥由虚拟网桥ID标识。在vPC链路上,指定网桥ID也使用虚拟网桥ID。对于非vPC链路,指定网桥ID是相应Nexus 7000交换机的物理网桥ID。这允许非vPC交换机(SW-1)根据BPDU通告而不是端口优先级做出根决策。
启用对等交换机后,每台Nexus 7000交换机都会生成BPDU,根网桥设置为虚拟网桥ID,指定网桥设置为物理网桥ID。由于优先级相同,所有非vPC连接始终在连接到网桥ID较低的Nexus 7000交换机的链路上转发(本例中为N7K-1),并在连接到网桥ID较高的Nexus 7000交换机的链路上阻塞(本例中为N7K-2)。
SW-1# show span vlan 1
VLAN0001
Spanning tree enabled protocol rstp
Root ID Priority 8193
Address 0023.04ee.be01
Cost 4
Port 295 (Ethernet2/39)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0024.986f.3b44
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Eth2/39 Root FWD 4 128.295 P2p
Eth2/40 Altn BLK 4 128.296 P2p
SW-1# show span vlan 1 detail
VLAN0001 is executing the rstp compatible Spanning Tree protocol
Bridge Identifier has priority 32768, sysid 1, address 0024.986f.3b44
Configured hello time 2, max age 20, forward delay 15
Current root has priority 8193, address 0023.04ee.be01
Root port is 295 (Ethernet2/39), cost of root path is 4
Topology change flag not set, detected flag not set
Number of topology changes 6 last change occurred 0:25:38 ago
from Ethernet2/39
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0
Port 295 (Ethernet2/39) of VLAN0001 is root forwarding
Port path cost 4, Port priority 128, Port Identifier 128.295
Designated root has priority 8193, address 0023.04ee.be01 <---Root Bridge = virtual ID
Designated bridge has priority 8193, address 0024.986f.3b41 <---Designated Bridge ID = N7K-1
Designated port id is 128.260, designated path cost 0, Topology change is set
Timers: message age 16, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is point-to-point by default
BPDU: sent 4, received 2280
Port 296 (Ethernet2/40) of VLAN0001 is alternate blocking
Port path cost 4, Port priority 128, Port Identifier 128.296
Designated root has priority 8193, address 0023.04ee.be01 <---Root Bridge = virtual ID
Designated bridge has priority 8193, address 0024.986f.3b42 <---Designated Bridge ID = N7K-2
Designated port id is 128.272, designated path cost 0
Timers: message age 15, forward delay 0, hold 0
Number of transitions to forwarding state: 2
Link type is point-to-point by default
BPDU: sent 7, received 2278
启用对等交换机后,vPC连接将接收BPDU,根网桥和指定网桥均设置为虚拟网桥ID。
SW-2# show span vlan 1
VLAN0001
Spanning tree enabled protocol rstp
Root ID Priority 8193
Address 0023.04ee.be01
Cost 3
Port 4105 (port-channel10)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0024.986f.3b43
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po10 Root FWD 3 128.4105 P2p
SW-2# show span vlan 1 detail
VLAN0001 is executing the rstp compatible Spanning Tree protocol
Bridge Identifier has priority 32768, sysid 1, address 0024.986f.3b43
Configured hello time 2, max age 20, forward delay 15
Current root has priority 8193, address 0023.04ee.be01
Root port is 4105 (port-channel10), cost of root path is 3
Topology change flag not set, detected flag not set
Number of topology changes 5 last change occurred 0:21:40 ago
from port-channel10
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0
Port 4105 (port-channel10) of VLAN0001 is root forwarding
Port path cost 3, Port priority 128, Port Identifier 128.4105
Designated root has priority 8193, address 0023.04ee.be01 <--- Virtual Bridge ID
Designated bridge has priority 8193, address 0023.04ee.be01 <--- Virtual Bridge ID
Designated port id is 128.4105, designated path cost 0, Topology change is set
Timers: message age 15, forward delay 0, hold 0
Number of transitions to forwarding state: 2
Link type is point-to-point by default
BPDU: sent 96, received 2804
在默认对等交换机配置下,非vPC交换机上的所有VLAN都在单条链路上转发。为了在VLAN之间实现负载均衡,可以使用生成树伪信息配置手动设置通告的指定优先级和根优先级。思科建议,在故障切换条件下,pseduo-information下的根优先级应低于最佳生成树优先级,以防止拓扑更改通知(TCN)。在vPC域中的两台Nexus 7000交换机之间,可以对指定优先级进行负载均衡。
在本例中,两台Nexus 7000交换机上的全局生成树优先级均设置为8192。在伪信息下,根优先级配置为4096,比最佳优先级8192低。因此,参与启用对等交换机的交换机成为VLAN的根。为了在两台交换机之间实现负载均衡,VLAN 9和VLAN 10会交替指定优先级。对于与SW-1的非vPC连接,VLAN 9在链路上转发到N7K-1,VLAN 10在链路上转发到N7K-2。
对于VLAN 9,SW-1将伪根网桥优先级和网桥ID视为N7K-1和N7K-2的相同值。 但是,N7K-1和N7K-2都会发送其配置的伪指定优先级。因此,SW-1看到N7K-1的指定网桥优先级为8201(8192 + 9),N7K-2的指定网桥优先级为12297(12288 + 9);SW-1选择指向N7K-1的链路作为VLAN 9上的转发链路。
SW-1# show span vlan 9
VLAN0009
Spanning tree enabled protocol rstp
Root ID Priority 4105
Address 0023.04ee.be01
Cost 4
Port 295 (Ethernet2/39)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32777 (priority 32768 sys-id-ext 9)
Address 0024.986f.3b44
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Eth2/39 Root FWD 4 128.295 P2p
Eth2/40 Altn BLK 4 128.296 P2p
SW-1# show span vlan 9 detail
VLAN0009 is executing the rstp compatible Spanning Tree protocol
Bridge Identifier has priority 32768, sysid 9, address 0024.986f.3b44
Configured hello time 2, max age 20, forward delay 15
Current root has priority 4105, address 0023.04ee.be01
Root port is 295 (Ethernet2/39), cost of root path is 4
Topology change flag not set, detected flag not set
Number of topology changes 16 last change occurred 0:06:56 ago
from Ethernet2/39
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0
Port 295 (Ethernet2/39) of VLAN0009 is root forwarding
Port path cost 4, Port priority 128, Port Identifier 128.295
Designated root has priority 4105, address 0023.04ee.be01 <--- Root Virtual Bridge ID
Designated bridge has priority 8201, address 0024.986f.3b41 <--- Designated N7K-1, 8201
Designated port id is 128.260, designated path cost 0
Timers: message age 15, forward delay 0, hold 0
Number of transitions to forwarding state: 3
Link type is point-to-point by default
BPDU: sent 31, received 3486
Port 296 (Ethernet2/40) of VLAN0009 is alternate blocking
Port path cost 4, Port priority 128, Port Identifier 128.296
Designated root has priority 4105, address 0023.04ee.be01 <--- Root Virtual Bridge ID
Designated bridge has priority 12297, address 0024.986f.3b42 <--- Designated is N7K-2, 12297
Designated port id is 128.272, designated path cost 0
Timers: message age 15, forward delay 0, hold 0
Number of transitions to forwarding state: 4
Link type is point-to-point by default
BPDU: sent 31, received 3496
同样,对于VLAN 10,SW-1将伪根网桥优先级和网桥ID视为N7K-1和N7K-2中的相同值。 同样,N7K-1和N7K-2都发送其配置的伪指定优先级。 对于VLAN 10,SW-1从N7K-1看到指定网桥优先级12298(12288 + 10)和从N7K-2看到指定网桥优先级8202(8192 + 10);SW-1选择指向N7K-2的链路作为VLAN 10的转发链路。 这样,非vPC连接的交换机可以在N7K-1和N7K-2之间对VLAN STP状态进行负载均衡。
SW-1# show span vlan 10 detail
VLAN0010 is executing the rstp compatible Spanning Tree protocol
Bridge Identifier has priority 32768, sysid 10, address 0024.986f.3b44
Configured hello time 2, max age 20, forward delay 15
Current root has priority 4106, address 0023.04ee.be01
Root port is 296 (Ethernet2/40), cost of root path is 4
Topology change flag not set, detected flag not set
Number of topology changes 7 last change occurred 0:07:13 ago
from Ethernet2/40
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0
Port 295 (Ethernet2/39) of VLAN0010 is alternate blocking
Port path cost 4, Port priority 128, Port Identifier 128.295
Designated root has priority 4106, address 0023.04ee.be01 <--- Root Virtual Bridge ID
Designated bridge has priority 12298, address 0024.986f.3b41 <--- Designated N7K-1, 12298
Designated port id is 128.260, designated path cost 0, Topology change is set
Timers: message age 16, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is point-to-point by default
BPDU: sent 4, received 3497
Port 296 (Ethernet2/40) of VLAN0010 is root forwarding
Port path cost 4, Port priority 128, Port Identifier 128.296
Designated root has priority 4106, address 0023.04ee.be01 <--- Root Virtual Bridge ID
Designated bridge has priority 8202, address 0024.986f.3b42 <--- Designated N7K-2, 8202
Designated port id is 128.272, designated path cost 0
Timers: message age 16, forward delay 0, hold 0
Number of transitions to forwarding state: 3
Link type is point-to-point by default
BPDU: sent 10, received 3492
对于vPC链路,根和指定字段分别使用伪根优先级和虚拟网桥ID。
SW-2# show span vlan 9
VLAN0009
Spanning tree enabled protocol rstp
Root ID Priority 4105
Address 0023.04ee.be01
Cost 3
Port 4105 (port-channel10)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32777 (priority 32768 sys-id-ext 9)
Address 0024.986f.3b43
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po10 Root FWD 3 128.4105 P2p
SW-2# show span vlan 10
VLAN0010
Spanning tree enabled protocol rstp
Root ID Priority 4106
Address 0023.04ee.be01
Cost 3
Port 4105 (port-channel10)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)
Address 0024.986f.3b43
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po10 Root FWD 3 128.4105 P2p
SW-2#show span vlan 9 detail
VLAN0009 is executing the rstp compatible Spanning Tree protocol
Bridge Identifier has priority 32768, sysid 9, address 0024.986f.3b43
Configured hello time 2, max age 20, forward delay 15
Current root has priority 4105, address 0023.04ee.be01
Root port is 4105 (port-channel10), cost of root path is 3
Topology change flag not set, detected flag not set
Number of topology changes 12 last change occurred 0:04:29 ago
from port-channel10
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0
Port 4105 (port-channel10) of VLAN0009 is root forwarding
Port path cost 3, Port priority 128, Port Identifier 128.4105
Designated root has priority 4105, address 0023.04ee.be01 <--- Root Virtual Bridge ID
Designated bridge has priority 4105, address 0023.04ee.be01 <--- Root Virtual Bridge ID
Designated port id is 128.4105, designated path cost 0, Topology change is set
Timers: message age 15, forward delay 0, hold 0
Number of transitions to forwarding state: 2
Link type is point-to-point by default
BPDU: sent 119, received 4867
SW-2# show span vlan 10 detail
VLAN0010 is executing the rstp compatible Spanning Tree protocol
Bridge Identifier has priority 32768, sysid 10, address 0024.986f.3b43
Configured hello time 2, max age 20, forward delay 15
Current root has priority 4106, address 0023.04ee.be01
Root port is 4105 (port-channel10), cost of root path is 3
Topology change flag not set, detected flag not set
Number of topology changes 6 last change occurred 0:04:36 ago
from port-channel10
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0
Port 4105 (port-channel10) of VLAN0010 is root forwarding
Port path cost 3, Port priority 128, Port Identifier 128.4105
Designated root has priority 4106, address 0023.04ee.be01 <--- Root Virtual Bridge ID
Designated bridge has priority 4106, address 0023.04ee.be01 <--- Root Virtual Bridge ID
Designated port id is 128.4105, designated path cost 0, Topology change is set
Timers: message age 17, forward delay 0, hold 0
Number of transitions to forwarding state: 2
Link type is point-to-point by default
BPDU: sent 96, received 5179
请参阅Cisco Bug ID CSCub74914:在对等交换机设置中,在vPC链路上错误设置了伪STP优先级
当前没有可用于此配置的验证过程。
目前没有针对此配置的故障排除信息。
版本 | 发布日期 | 备注 |
---|---|---|
1.0 |
09-Aug-2013 |
初始版本 |