以下内容摘自笔者最新图书该书取得了互动出版网7天销售总榜的第1名.
本书在51CTO上的样章试读地址为:
9.3.5 通过千兆以太网通道配置802.1Q中继示例
本节及以下各小节所介绍的中继配置示例适用于
Catalyst 5000/4000 家族、 Catalyst 2926G/2926 系列,以及 Catalyst 2948G/2980G 型号交换机。 本节所例举的示例显示了如何通过在两台兼容802.1Q(可使用“
show port capabilities”命令查看你的硬件是否兼容802.1Q)的交换机间的千兆以太网通道配置802.1Q中继。
图9-12显示了两台交换机是通过4个1000BASE-SX千兆以太网端口连接的。
要配置交换机形成一个4端口千兆以太网通道绑定,并且配置这个千兆以太网通道为802.1Q中继链路,请按以下步骤进行。
(1)确保在Switch A和Switch B交换机中的所有端口分配到同一个VLAN中。这个VLAN是作为802.1Q中继的本地VLAN。在本示例中,是配置所有端口为VLAN 1成员。
Switch_A> (enable)
set vlan 1 2/3-6
---- -----------------------
Switch_B> (enable)
set vlan 1 3/3-6
---- -----------------------
(2)配置以太网通道中的一个端口去协商802.1Q中继。这一配置将自动应用到通道两端的所有端口上。本示例假设在Switch B上的端口是使用
dot1q中继
negotiate封装类型的
auto模式。系统日志记录802.1Q中继建立信息。
Switch_A> (enable)
set trunk 2/3
desirable dot1q Port(s) 2/3-6 trunk mode set to desirable.
Port(s) 2/3-6 trunk type set to dot1q.
Switch_A> (enable) %DTP-5-TRUNKPORTON:Port 2/3 has become dot1q trunk
!—以下是自动在以太网通道其他端口中的应用配置过程
%DTP-5-TRUNKPORTON:Port 2/4 has become dot1q trunk
%ETHC-5-PORTFROMSTP:Port 2/3 left bridge port 2/3-6
%DTP-5-TRUNKPORTON:Port 2/5 has become dot1q trunk
%ETHC-5-PORTFROMSTP:Port 2/4 left bridge port 2/3-6
%ETHC-5-PORTFROMSTP:Port 2/5 left bridge port 2/3-6
%DTP-5-TRUNKPORTON:Port 2/6 has become dot1q trunk
%ETHC-5-PORTFROMSTP:Port 2/6 left bridge port 2/3-6
%ETHC-5-PORTFROMSTP:Port 2/3 left bridge port 2/3
%ETHC-5-PORTTOSTP:Port 2/3 joined bridge port 2/3-6
%ETHC-5-PORTTOSTP:Port 2/4 joined bridge port 2/3-6
%ETHC-5-PORTTOSTP:Port 2/5 joined bridge port 2/3-6
%ETHC-5-PORTTOSTP:Port 2/6 joined bridge port 2/3-6
Switch_B> (enable) %DTP-5-TRUNKPORTON:Port 3/3 has become dot1q trunk
%DTP-5-TRUNKPORTON:Port 3/4 has become dot1q trunk
%ETHC-5-PORTFROMSTP:Port 3/3 left bridge port 3/3-6
%ETHC-5-PORTFROMSTP:Port 3/4 left bridge port 3/3-6
%ETHC-5-PORTFROMSTP:Port 3/5 left bridge port 3/3-6
%ETHC-5-PORTFROMSTP:Port 3/6 left bridge port 3/3-6
%DTP-5-TRUNKPORTON:Port 3/5 has become dot1q trunk
%DTP-5-TRUNKPORTON:Port 3/6 has become dot1q trunk
%ETHC-5-PORTFROMSTP:Port 3/5 left bridge port 3/3-6
%ETHC-5-PORTFROMSTP:Port 3/6 left bridge port 3/3-6
%ETHC-5-PORTTOSTP:Port 3/3 joined bridge port 3/3-6
%ETHC-5-PORTTOSTP:Port 3/4 joined bridge port 3/3-6
%ETHC-5-PORTTOSTP:Port 3/5 joined bridge port 3/3-6
%ETHC-5-PORTTOSTP:Port 3/6 joined bridge port 3/3-6
(3)在802.1Q中继链路协商完成后,分别在两台交换机上键入“
show trunk”命令来校验以上中继配置是否成功。
Switch_A> (enable)
show trunk Port Mode Encapsulation Status Native vlan
-------- ----------- ------------- ------------ -----------
2/3 desirable dot1q trunking 1
2/4 desirable dot1q trunking 1
2/5 desirable dot1q trunking 1
2/6 desirable dot1q trunking 1
Port Vlans allowed on trunk
-------- ---------------------------------------------------------------------
Port Vlans allowed and active in management domain
-------- ---------------------------------------------------------------------
Port Vlans in spanning tree forwarding state and not pruned
-------- ---------------------------------------------------------------------
Switch_B> (enable)
show trunk Port Mode Encapsulation Status Native vlan
-------- ----------- ------------- ------------ -----------
3/3 auto dot1q trunking 1
3/4 auto dot1q trunking 1
3/5 auto dot1q trunking 1
3/6 auto dot1q trunking 1
Port Vlans allowed on trunk
-------- ---------------------------------------------------------------------
Port Vlans allowed and active in management domain
-------- ---------------------------------------------------------------------
Port Vlans in spanning tree forwarding state and not pruned
-------- ---------------------------------------------------------------------
(4)分别在两台交换机上键入“
show port channel”和“
show trunk”命令,以确认交换机的端口通道配置和中继状态。
Switch_A> (enable)
show port channel Switch_A> (enable)
show trunk Switch_B>(enable)
show port channel Switch_B>(enable)
show trunk (5)配置Switch A上的端口协商邻居交换机Switch B绑定千兆以太网通道。这里只需要在一个交换机上进行配置,通道连接的另一交换机上的端口将自动配置。本示例假设Switch B上的端口是以太网通道
auto模式,系统日志记录以太网通道绑定建立信息。
Switch_A>(enable)
set port channel 2/3-6
desirable Port(s) 2/3-6 channel mode set to desirable.
Switch_A>enable) %PAGP-5-PORTFROMSTP:Port 2/3 left bridge port 2/3
%ETHC-5-PORTFROMSTP:Port 2/4 left bridge port 2/4
%ETHC-5-PORTFROMSTP:Port 2/5 left bridge port 2/5
%ETHC-5-PORTFROMSTP:Port 2/6 left bridge port 2/6
%ETHC-5-PORTFROMSTP:Port 2/4 left bridge port 2/4
%ETHC-5-PORTFROMSTP:Port 2/5 left bridge port 2/5
%ETHC-5-PORTFROMSTP:Port 2/6 left bridge port 2/6
%ETHC-5-PORTFROMSTP:Port 2/3 left bridge port 2/3
%ETHC-5-PORTTOSTP:Port 2/3 joined bridge port 2/3-6
%ETHC-5-PORTTOSTP:Port 2/4 joined bridge port 2/3-6
%ETHC-5-PORTTOSTP:Port 2/5 joined bridge port 2/3-6
%ETHC-5-PORTTOSTP:Port 2/6 joined bridge port 2/3-6
!—以下是Switch_B自动的以太网通道配置过程
Switch_B>(enable) %PAGP-5-PORTFROMSTP:Port 3/3 left bridge port 3/3
%ETHC-5-PORTFROMSTP:Port 3/4 left bridge port 3/4
%ETHC-5-PORTFROMSTP:Port 3/5 left bridge port 3/5
%ETHC-5-PORTFROMSTP:Port 3/6 left bridge port 3/6
%ETHC-5-PORTFROMSTP:Port 3/4 left bridge port 3/4
%ETHC-5-PORTFROMSTP:Port 3/5 left bridge port 3/5
%ETHC-5-PORTFROMSTP:Port 3/6 left bridge port 3/6
%ETHC-5-PORTFROMSTP:Port 3/3 left bridge port 3/3
%ETHC-5-PORTTOSTP:Port 3/3 joined bridge port 3/3-6
%ETHC-5-PORTTOSTP:Port 3/4 joined bridge port 3/3-6
%ETHC-5-PORTTOSTP:Port 3/5 joined bridge port 3/3-6
%ETHC-5-PORTTOSTP:Port 3/6 joined bridge port 3/3-6
(6)在以太网通道绑定协商完成后,在两交换机上分别键入“
show port channel”命令以校验以太钢通道配置是否协商成功。
Switch_A>(enable)
show port channel Port Status Channel Channel Neighbor Neighbor
----- ---------- --------- ----------- ------------------------- ----------
2/3 connected desirable channel WS-C4003 JAB023806(Sw 2/3
2/4 connected desirable channel WS-C4003 JAB023806(Sw 2/4
2/5 connected desirable channel WS-C4003 JAB023806(Sw 2/5
2/6 connected desirable channel WS-C4003 JAB023806(Sw 2/6
----- ---------- --------- ----------- ------------------------- ----------
Switch_B> (enable)
show port channel Port Status Channel Channel Neighbor Neighbor
----- ---------- --------- ----------- ------------------------- ----------
3/3 connected auto channel WS-C4003 JAB023806(Sw 2/3
3/4 connected auto channel WS-C4003 JAB023806(Sw 2/4
3/5 connected auto channel WS-C4003 JAB023806(Sw 2/5
3/6 connected auto channel WS-C4003 JAB023806(Sw 2/6
----- ---------- --------- ----------- ------------------------- ----------
Switch_B>(enable)
本文转自王达博客51CTO博客,原文链接http://blog.51cto.com/winda/196827如需转载请自行联系原作者
茶乡浪子