本文档提供了 Cisco Catalyst 第 2 层 (L2) 固定配置交换机和 Cisco 路由器之间的快速以太通道 (FEC) 和 IEEE 802.1Q 中继的配置示例。Catalyst L2 固定配置交换机包括 2900/3500XL、2940、2950/2955 和 2970 交换机。本文档使用的是 Cisco 7200 路由器,但是您可以使用支持 EtherChannel 和 802.1Q 中继的其他路由器取得同样结果。本文档的要求部分提供支持 EtherChannel 和 802.1Q 中继的路由器列表。
尝试进行此配置之前,请注意以下要求:
FEC 和 802.1Q 中继功能在运行 Cisco IOS® 软件 12.0(5.2)WC(1) 版及更新版本的 Catalyst L2 固定配置交换机上可用。由于硬件的限制,Catalyst 2940 和 2955/2950 交换机不支持交换机间链路协议 (ISL) 中继。
Cisco 路由器支持 Cisco IOS 软件 12.0(T) 版及更新版本中的 EtherChannel 和 802.1Q 中继功能。但是,并非所有路由器都支持这两项功能。使用下表可以确定哪个路由器平台支持 FEC 以及 802.1Q 中继功能:
路由器平台 | EtherChannel | IEEE 802.1Q 封装 |
---|---|---|
Cisco 1710 路由器 | 无 | Yes |
Cisco 1751 路由器 | 无 | Yes |
Cisco 2600 系列 | 不支持1 | Yes |
Cisco 3600 系列 | 不支持1 | Yes |
Cisco 3700 系列 | 不支持1 | Yes |
Cisco 4000-M 系列(4000-M、4500-M、4700-M) | 无 | Yes |
思科 7000 系列(RSP2 7000、RSP 7000CI) | Yes | Yes |
Cisco 7100 | 无 | Yes |
Cisco 7200 系列 | Yes | Yes |
Cisco 7500 系列(RSP1、RSP2、RSP4) | Yes | Yes |
1 如果安装了 NM-16ESW 或 NM-36ESW 以太网交换机网络模块,则思科 2600、3600 和 3700 系列路由器上将不支持 EtherChannel。每个模块最多支持六个 EtherChannel,每个 EtherChannel 捆绑中最多八个端口。
2 RSP = 路由交换处理器
此配置使用以下软件和硬件版本开发并测试:
运行 Cisco IOS 软件版本 12.1(9)EA1d 的 Catalyst 2950 交换机
运行 Cisco IOS 软件版本 12.2(3) 的 Cisco 7200 路由器。
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
有关文件规则的更多信息请参见“ Cisco技术提示规则”。
EtherChannel 通过将多个等速端口分配到同一个逻辑信道小组,在快速以太网(FE)和千兆以太网(GE)之间提供递增速度。EtherChannel 结合了速率高达 800 Mbps 的多个 FE 或速率高达 8 Gbps 的 GE。该组合提供交换机、路由器和服务器之间的容错、高速链路。中继是指在二个设备之间的点到点链路上传输来自多个 VLAN 的数据流。在交换机和路由器之间配置中继的目的是提供 VLAN 间通信。在园区网络中,将中继配置在 EtherChannel 链路上,以便在高带宽通道上传输多个 VLAN 信息。
本部分提供有关如何配置本文档所述功能的信息。
有关本文档中所使用的命令的解释,请参阅以下文档:
在Catalyst 2950上配置VLAN的配置VLAN中继部分
注意:本文档中的Catalyst 2950交换机命令和配置适用于运行Cisco IOS软件版本12.1(6)EA2及更高版本的交换机。如果运行的是 Cisco IOS 软件 12.0(5.2)WC(1) 版,则需要为配置使用不同的命令。有关运行 Cisco IOS 软件 12.0(5.2)WC(1) 版的交换机的配置,请参阅以下文档:
管理交换机的Catalyst 2950中的Creating EtherChannel Port Groups部分
在Catalyst 2950上创建和维护VLAN的VLAN中继如何工作部分
注:要查找有关本文档中使用的命令的其他信息,请使用命令查找工具 (仅注册客户)。
本文档使用以下网络设置:
注意:本征VLAN是在Catalyst接口上配置中继之前在该接口上配置的VLAN。默认情况下,所有接口都在VLAN 1中。因此,VLAN 1是您可以更改的本征VLAN。在 802.1Q 中继上,除本地 VLAN 以外的所有 VLAN 数据包都被标记。在中继的两边必须以同样的方式配置本地 VLAN。这样,路由器或交换机在接收到没有标记的帧时能够认定该帧属于哪个 VLAN。在此部分的图表中,VLAN 10 已配置为本地 VLAN。对于 VLAN 间路由,务必在连接到交换机的所有工作站上配置默认网关。此默认网关是您在子接口上配置的 IP 地址。您要在路由器上为每个 VLAN 创建子接口。在本示例中,工作站1配置了默认网关10.10.10.1。此网关是子接口端口通道1.10的IP地址。工作站2配置了默认网关10.10.11.1。此网关是子接口端口通道1.20的IP地址。
本文档使用以下配置:
Catalyst 2950 交换机 |
---|
Cat2950# Cat2950# configure terminal Enter configuration commands, one per line. End with CNTL/Z. !--- Set the VLAN Trunk Protocol (VTP) mode to server, !--- and set the VTP domain name to cisco. Cat2950(config)# vtp mode server Setting device to VTP SERVER mode Cat2950(config)# vtp domain cisco Changing VTP domain name from VitalCom to cisco !--- Create two VLANs: VLAN 10 and VLAN 20. Cat2950(config)# vlan 10 Cat2950(config-vlan)# exit Cat2950(config)# vlan 20 Cat2950(config-vlan)# exit !--- Configure ports Fa0/5 through Fa0/14 in VLAN 10, !--- and configure ports Fa0/15 through Fa0/26 in VLAN 20. Cat2950(config)# interface range fa0/5 - 14 Cat2950(config-if-range)# switchport access vlan 10 Cat2950(config-if-range)# exit Cat2950(config)# interface range fa0/15 - 26 Cat2950(config-if-range)# switchport access vlan 20 Cat2950(config-if-range)# ^Z Cat2950# 00:32:39: %SYS-5-CONFIG_I: Configured from console by console !--- Configure the management interface so that you can access !--- the switch remotely with Telnet. Cat2950# configure terminal Cat2950(config)# interface vlan 10 Cat2950(config-if)# ip address 10.10.10.10 255.255.255.0 Cat2950(config-if)# no shutdown 00:24:07: %LINK-3-UPDOWN: Interface Vlan10, changed state to up Cat2950(config-if)# ^Z 00:24:12: %SYS-5-CONFIG_I: Configured from console by console Cat2950# configure terminal Enter configuration commands, one per line. End with CNTL/Z. !--- Configure the default gateway so that you can access !--- the switch from any VLAN. The default gateway is !--- the IP address of the subinterface on the router for VLAN 10. Cat2950(config)# ip default-gateway 10.10.10.1 !--- Configure a logical channel interface. Cat2950(config)# interface port-channel 1 Cat2950(config-if)# exit !--- Assign ports to the logical channel interface in order to form !--- an EtherChannel. !--- Note: Set the channel mode on the switch to on because the Cisco 7200 !--- router on the other end does not support Port Aggregation Protocol (PAgP). Cat2950(config)# interface fa0/2 Cat2950(config-if)# channel-group 1 mode on Cat2950(config-if)# exit Cat2950(config)# 00:25:38: %LINK-3-UPDOWN: Interface Port-channel1, changed state to up 00:25:39: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up Cat2950(config)# interface fa0/3 Cat2950(config-if)# channel-group 1 mode on Cat2950(config-if)# exit !--- In order to configure trunking over EtherChannel, enable trunking !--- over the logical channel interface. Cat2950(config)# interface port-channel 1 Cat2950(config-if)# switchport mode trunk Cat2950(config-if)# 00:27:14: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down 00:27:14: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down 00:27:14: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to down 00:27:17: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up 00:27:17: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up 00:27:18: %LINK-3-UPDOWN: Interface Port-channel1, changed state to up 00:27:19: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up !--- Configure VLAN 10 as the native VLAN for untagged traffic. Cat2950(config-if)# switchport trunk native vlan 10 Cat2950(config-if)# ^Z 00:24:12: %SYS-5-CONFIG_I: Configured from console by console Cat2950# |
Cat2950# show running-config Building configuration... Current configuration : 2390 bytes ! version 12.1 no service pad service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname Cat2950 ! ! ip subnet-zero vtp domain VitalCom vtp mode transparent ! vlan 10 ! vlan 20 ! spanning-tree extend system-id ! ! interface Port-channel1 switchport trunk native vlan 10 switchport mode trunk no ip address flowcontrol send off ! interface FastEthernet0/1 no ip address ! interface FastEthernet0/2 switchport trunk native vlan 10 switchport mode trunk no ip address channel-group 1 mode on ! interface FastEthernet0/3 switchport trunk native vlan 10 switchport mode trunk no ip address channel-group 1 mode on ! interface FastEthernet0/4 no ip address ! interface FastEthernet0/5 switchport access vlan 10 no ip address ! !--- Output suppressed. ! interface FastEthernet0/15 switchport access vlan 20 no ip address ! !--- Output suppressed. interface FastEthernet0/26 switchport access vlan 20 no ip address ! interface Vlan10 ip address 10.10.10.10 255.255.255.0 no ip route-cache ! ip default-gateway 10.10.10.1 ip http server ! ! line con 0 line vty 5 15 ! end Cat2950# |
Cisco 7200 路由器 |
---|
Cisco7200# Cisco7200# configure terminal Enter configuration commands, one per line. End with CNTL/Z. !--- Create a logical channel interface in order to form an EtherChannel. Cisco7200(config)# interface port-channel 1 Cisco7200(config-if)# exit !--- Configure the ports Fa3/0 and Fa4/0 as members of the !--- logical channel in order to form an EtherChannel group. Cisco7200(config)# interface fa3/0 Cisco7200(config-if)# channel-group 1 FastEthernet3/0 added as member-1 to port-channel1 Cisco7200(config-if)# exit Cisco7200(config)# 00:25:06: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up Cisco7200(config)# interface fa4/0 Cisco7200(config-if)# channel-group 1 FastEthernet4/0 added as member-2 to port-channel1 Cisco7200(config-if)# exit !--- Configure subinterfaces over port channel for VLAN 10 and VLAN 20 !--- in order to configure trunking over EtherChannel. Assign the IP address !--- to interVLAN routing. Configure VLAN 10 as the native VLAN !--- for untagged traffic. Cisco7200(config)# interface port-channel 1.10 Cisco7200(config-subif)# encapsulation dot1Q 10 native Cisco7200(config-subif)# ip address 10.10.10.1 255.255.255.0 Cisco7200(config-subif)# exit Cisco7200(config)# interface port-channel 1.20 Cisco7200(config-subif)# encapsulation dot1Q 20 Cisco7200(config-subif)# ip address 10.10.11.1 255.255.255.0 Cisco7200(config-subif)# exit Cisco7200(config)# exit Cisco7200# |
Cisco7200# show running-config Building configuration... Current configuration : 987 bytes ! version 12.2 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname Cisco7200 ! ! ip subnet-zero ! ! ! call rsvp-sync ! ! interface Port-channel1 no ip address hold-queue 150 in ! interface Port-channel1.10 encapsulation dot1Q 10 native ip address 10.10.10.1 255.255.255.0 ! interface Port-channel1.20 encapsulation dot1Q 20 ip address 10.10.11.1 255.255.255.0 ! !--- Output suppressed. ! interface FastEthernet3/0 no ip address channel-group 1 ! interface FastEthernet4/0 no ip address channel-group 1 ! ip classless no ip http server ! ! ! gatekeeper shutdown ! ! line con 0 line aux 0 line vty 5 15 ! end |
本部分提供可用于确认您的配置是否正常运行的信息。
命令输出解释程序工具(仅限注册用户)支持某些 show 命令,使用此工具可以查看对 show 命令输出的分析。
show etherchannel
show interfaces interface-id switchport
show interfaces interface-id trunk
show etherchannel
show etherchannel 命令显示 EtherChannel 信息。此命令还显示负载均衡或帧分配方案、端口和端口信道信息。命令语法为:
show etherchannel [channel-group-number] {brief | detail | load-balance | port |
port-channel | summary}
注意:此命令应位于一行上。
Cat2950# show etherchannel 1 detail Group state = L2 Ports: 2 Maxports = 8 Port-channels: 1 Max Port-channels = 1 Ports in the group: ------------------- Port: Fa0/2 ------------ Port state = Up Mstr In-Bndl Channel group = 1 Mode = On/FEC Gcchange = 0 Port-channel = Po1 GC = 0x00010001 Pseudo port-channel = Po1 Port index = 0 Load = 0x00 Age of the port in the current state: 00d:17h:51m:49s Port: Fa0/3 ------------ Port state = Up Mstr In-Bndl Channel group = 1 Mode = On/FEC Gcchange = 0 Port-channel = Po1 GC = 0x00010001 Pseudo port-channel = Po1 Port index = 0 Load = 0x00 Age of the port in the current state: 00d:17h:51m:49s Port-channels in the group: ---------------------- Port-channel: Po1 ------------ Age of the Port-channel = 00d:17h:54m:02s Logical slot/port = 1/0 Number of ports = 2 GC = 0x00010001 HotStandBy port = null Port state = Port-channel Ag-Inuse Ports in the Port-channel: Index Load Port EC state ------+------+------+------------ 0 00 Fa0/2 on 0 00 Fa0/3 on Time since last port bundled: 00d:17h:51m:50s Fa0/3 Time since last port Un-bundled: 00d:17h:51m:53s Fa0/3 Cat2950#
show interfaces interface-id switchport
show interfaces interface-id switchport 命令在输出的管理模式和管理中继封装字段显示交换端口配置。
Cat2950# show interfaces port-channel 1 switchport Name: Po1 Switchport: Enabled Administrative Mode: trunk Operational Mode: trunk Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: dot1q Negotiation of Trunking: On Access Mode VLAN: 1 (default) Trunking Native Mode VLAN: 10 (VLAN0010) Trunking VLANs Enabled: ALL Pruning VLANs Enabled: 2-1001 Protected: false Voice VLAN: none (Inactive) Appliance trust: none Cat2950#
show interfaces interface-id trunk
show interfaces interface-id trunk 命令显示接口的中继配置。
Cat2950# show interfaces port-channel 1 trunk Port Mode Encapsulation Status Native vlan Po1 on 802.1q trunking 10 Port Vlans allowed on trunk Po1 1-4094 Port Vlans allowed and active in management domain Po1 1,10,20 Port Vlans in spanning tree forwarding state and not pruned Po1 1,10,20 Cat2950#
show interfaces port-channel channel-number
您可以使用 show interfaces port-channel channel-number 命令来验证端口信道接口和信道成员端口。
Cisco7200# show interfaces port-channel 1 Port-channel1 is up, line protocol is up Hardware is FEChannel, address is 00d0.63b2.8854 (bia 0000.0000.0000) MTU 1500 bytes, BW 200000 Kbit, DLY 100 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation 802.1Q Virtual LAN, Vlan ID 1., loopback not set Keepalive set (10 sec) ARP type: ARPA, ARP Timeout 04:00:00 No. of active members in this channel: 2 Member 0 : FastEthernet3/0 , Unknown duplex, 100Mb/s Member 1 : FastEthernet4/0 , Unknown duplex, 100Mb/s Last input 00:00:00, output never, output hang never Last clearing of "show interface" counters never Queueing strategy: fifo Output queue 0/80, 0 drops; input queue 0/150, 0 drops 5 minute input rate 0 bits/sec, 1 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 79434 packets input, 6020431 bytes Received 2099 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 0 watchdog 0 input packets with dribble condition detected 1137 packets output, 359153 bytes, 0 underruns(0/0/0) 6 output errors, 0 collisions, 6 interface resets 0 babbles, 0 late collision, 0 deferred 0 lost carrier, 0 no carrier 0 output buffer failures, 0 output buffers swapped out Cisco7200#
show interfaces interface.subinterface
您可以使用 show interfaces interface.subinterface 命令来验证中继配置。
Cisco7200# show interfaces port-channel 1.10 Port-channel1.10 is up, line protocol is up Hardware is FEChannel, address is 00d0.63b2.8854 (bia 0000.0000.0000) Internet address is 10.10.10.1/24 MTU 1500 bytes, BW 200000 Kbit, DLY 100 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation 802.1Q Virtual LAN, Vlan ID 10. ARP type: ARPA, ARP Timeout 04:00:00 Cisco7200# Cisco7200# show interfaces port-channel 1.20 Port-channel1.20 is up, line protocol is up Hardware is FEChannel, address is 00d0.63b2.8854 (bia 0000.0000.0000) Internet address is 10.10.11.1/24 MTU 1500 bytes, BW 200000 Kbit, DLY 100 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation 802.1Q Virtual LAN, Vlan ID 20. ARP type: ARPA, ARP Timeout 04:00:00 Cisco7200#
目前没有针对此配置的故障排除信息。