跟我学交换机配置(六)

简介:

以下内容摘自笔者最新图书Cisco/H3C交换机配置与管理完全手册》该书取得了互动出版网7天销售总榜的第1名.

本书在51CTO上的样章试读地址为:http://book.51cto.com/art/200908/142118.htm

 
  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千兆以太网端口连接的。
clip_image002
图9-12 通过以太钢通道形成中继链路示例
要配置交换机形成一个4端口千兆以太网通道绑定,并且配置这个千兆以太网通道为802.1Q中继链路,请按以下步骤进行。
(1)确保在Switch A和Switch B交换机中的所有端口分配到同一个VLAN中。这个VLAN是作为802.1Q中继的本地VLAN。在本示例中,是配置所有端口为VLAN 1成员。
Switch_A> (enable)  set vlan 1 2/3-6
VLAN Mod/Ports
---- -----------------------
1 2/3-6
Switch_A> (enable)
Switch_B> (enable)  set vlan 1 3/3-6
VLAN Mod/Ports
---- -----------------------
1 3/3-6
Switch_B> (enable)
(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
-------- ---------------------------------------------------------------------
2/3 1-1005, 1025-4094
2/4 1-1005, 1025-4094
2/5 1-1005, 1025-4094
2/6 1-1005, 1025-4094
Port Vlans allowed and active in management domain
-------- ---------------------------------------------------------------------
2/3 1-1005, 1025-4094
2/4 1-1005, 1025-4094
2/5 1-1005, 1025-4094
2/6 1-1005, 1025-4094
Port Vlans in spanning tree forwarding state and not pruned
-------- ---------------------------------------------------------------------
2/3 1-1005, 1025-4094
2/4 1-1005, 1025-4094
2/5 1-1005, 1025-4094
2/6 1-1005, 1025-4094
Switch_A> (enable)
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
-------- ---------------------------------------------------------------------
3/3 1-1005, 1025-4094
3/4 1-1005, 1025-4094
3/5 1-1005, 1025-4094
3/6 1-1005, 1025-4094

Port Vlans allowed and active in management domain
-------- ---------------------------------------------------------------------
3/3 1-1005, 1025-4094
3/4 1-1005, 1025-4094
3/5 1-1005, 1025-4094
3/6 1-1005, 1025-4094
Port Vlans in spanning tree forwarding state and not pruned
-------- ---------------------------------------------------------------------
3/3 1-1005, 1025-4094
3/4 1-1005, 1025-4094
3/5 1-1005, 1025-4094
3/6 1-1005, 1025-4094
Switch_B> (enable)
(4)分别在两台交换机上键入“ show port channel”和“ show trunk”命令,以确认交换机的端口通道配置和中继状态。
Switch_A> (enable)  show port channel
No ports channelling
Switch_A> (enable)  show trunk
No ports trunking.
Switch_A>(enable)
Switch_B>(enable)  show port channel
No ports channelling
Switch_B>(enable)  show trunk
No ports trunking.
Switch_B>(enable)
(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
mode status device port
----- ---------- --------- ----------- ------------------------- ----------
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_A> (enable)
Switch_B> (enable)  show port channel
Port Status Channel Channel Neighbor Neighbor
mode status device port
----- ---------- --------- ----------- ------------------------- ----------
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如需转载请自行联系原作者


茶乡浪子

相关文章
|
8月前
交换机的基本原理与配置(三)
交换机的基本原理与配置(三)
167 0
|
1月前
|
网络协议 网络虚拟化 网络架构
交换机入门快速配置
交换机入门快速配置
|
20天前
|
网络协议 安全 网络安全
二层交换机与防火墙对接上网配置示例
二层交换机指的是仅能够进行二层转发,不能进行三层转发的交换机。也就是说仅支持二层特性,不支持路由等三层特性的交换机。 二层交换机一般部署在接入层,不能作为用户的网关
|
6月前
|
网络虚拟化
华为交换机Trunk配置
华为交换机Trunk配置
109 0
|
7月前
|
网络架构
交换机与路由器技术-24-OSPF单区域配置
交换机与路由器技术-24-OSPF单区域配置
43 0
|
7月前
|
网络架构
交换机与路由器技术-17-生成树协议配置
交换机与路由器技术-17-生成树协议配置
30 0
|
7月前
|
网络架构
交换机与路由器技术-14-三层交换机配置
交换机与路由器技术-14-三层交换机配置
38 0
|
7月前
|
网络架构
交换机与路由器技术-08-路由器上配置DHCP
交换机与路由器技术-08-路由器上配置DHCP
21 0
|
7月前
|
网络架构
交换机与路由器技术-07-静态路由配置
交换机与路由器技术-07-静态路由配置
30 0
|
8月前
|
存储 网络安全
交换机的基本原理与配置(二)
交换机的基本原理与配置(二)
109 0