本文介紹Catalyst 2950和Catalyst 2948G-L3交換機之間的EtherChannel和802.1Q中繼的設定。EtherChannel可稱為快速EtherChannel(FEC)或Gigabit EtherChannel(GEC),具體取決於用來形成EtherChannel的介面或連線埠的速度。
注意:Catalyst 2950交換機僅支援802.1Q中繼,不支援交換機間鏈路協定(ISL)中繼。Catalyst 2948G-L3和Catalyst 4908G-L3交換器共用相同的軟體映像,因此本文中使用的Catalyst 2948G-L3組態也適用於Catalyst 4908G-L3交換器。
在此配置示例中,Catalyst 2950交換機上的兩個快速乙太網介面與Catalyst 2948G-L3交換機的兩個快速乙太網介面捆綁到一個FEC中。FEC、GEC、連線埠通道和通道群組是指EtherChannel。
如需文件慣例的詳細資訊,請參閱思科技術提示慣例。
本檔案介紹交換器的範例組態以及相關show命令的輸出。有關個別交換器的詳細資訊和特定警告或准則,請參閱以下檔案:
Catalyst 2950交換器設定EtherChannel
Catalyst 2950交換器設定VLAN中繼
本檔案中的資訊是根據以下軟體和硬體版本。
運行Cisco IOS®軟體12.0(14)W5(20)的Catalyst 2948G-L3交換機
執行Cisco IOS軟體12.1(12c)EA1的Catalyst 2950交換器
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您在即時網路中工作,請確保在使用任何命令之前瞭解其潛在影響。
從配置的角度來看,Catalyst 2948G-L3交換機是路由器。它使用Cisco IOS命令列,預設情況下,所有介面都是路由介面。
預設情況下,Catalyst 2948G-L3交換機不會擴展VLAN。由於所有介面都是路由介面,因此每個介面必須屬於不同的網路或子網。如果您希望兩個或多個介面屬於同一子網,則需要在這些介面上配置橋接。
Catalyst 2948G-L3交換器不支援其他Catalyst交換器上的交涉通訊協定,例如VLAN中繼線通訊協定(VTP)、動態中繼線通訊協定(DTP)和連線埠攻擊通訊協定(PAgP)。 建議在連線到Catalyst 2948G-L3交換機的Catalyst 2950介面上關閉這些協定。
在Catalyst 2948G-L3交換器上,主幹上本徵VLAN上接收的所有流量都會在軟體中路由。這表示此流量被傳送到CPU。當大量流量在此VLAN上傳送時,會導致Catalyst 2948G-L3交換機上的CPU負載過大,並對網路效能產生不利影響。建議建立一個虛擬VLAN(例如VLAN 99),它可以成為中繼的本徵VLAN。所有使用者流量都通過其他VLAN傳送,並在硬體中路由,從而獲得更好的效能。
本節提供用於設定本文件中所述功能的資訊。
注意:要查詢有關本文檔中使用的命令的其他資訊,請使用命令查詢工具(僅限註冊客戶)。
配置EtherChannel時,建議按照以下步驟建立埠通道。這樣可避免在設定過程中發生跨距樹狀目錄通訊協定(STP)可能的問題。如果一端配置為通道,而另一端配置為通道,則可能會發生STP環路。因此,交換器可以將環路中涉及的介面置於Errordisabled狀態。以下步驟是此特定組態方案的准則。
在Catalyst 2948G-L3交換機上:
配置要在管理性關閉模式下進行埠通道化時使用的介面。
建立埠通道(通道組)。 埠通道承載不同的VLAN,因此請為中繼中存在的每個VLAN建立一個子介面。在802.1Q中繼上,除了本徵VLAN上的流量外,所有通過中繼的資料包都將被標籤。因此,您需要通過在結尾處放置關鍵字「native」來區分與本地VLAN對應的子介面。如前所述,最好使用沒有使用者流量的虛擬VLAN。
預設情況下,Catalyst 2948G-L3交換機具有所有路由埠。為了使2948G-L3中的埠能夠在2950上的不同VLAN上通訊,您必須實施橋接。必須將屬於同一VLAN(網路或子網)的介面(和子介面)配置為屬於同一網橋組。要在這些不同的網橋組之間進行路由,必須啟用整合路由和橋接(IRB)。
在Catalyst 2950交換器上:
將屬於該通道的介面配置為中繼,並確保DTP已關閉。通過在物理介面上發出switchport nonegotiate命令來完成此操作。在VLAN資料庫中配置一個虛擬VLAN(在本例中為VLAN 99),該虛擬VLAN將用作中繼上的本地VLAN。除非另行指定,否則802.1Q中繼上的本徵VLAN是VLAN 1。您需要在兩個介面上指定使用VLAN 99作為本徵VLAN。發出switchport trunk native vlan 99 命令即可完成此操作。
建立埠通道並確保將通道模式設定為on(這會關閉PAgP)。
發出no shut 命令,重新啟用之前在Catalyst 2948G-L3交換機上禁用的介面。
本文檔使用下圖所示的網路設定。
本文檔使用如下所示的配置。
Catalyst 2948G-L3 |
---|
2948G-L3#show run !--- The following configuration shows how to configure Catalyst 2948G-L3 !--- for bridging and connect to a Catalyst 2950 with 802.1Q trunking !--- over EtherChannel. For configuring interVLAN-routing on Catalyst !--- 2948G-L3, refer to Catalyst 2948G-L3 Sample Configurations. Building configuration... Current configuration: ! ! version 12.0 no service pad service timestamps debug uptime service timestamps log datetime no service password-encryption ! hostname 2948G-L3 ! ! ip subnet-zero ! !--- Enable IRB when routing between different !--- bridge groups is needed. bridge irb ! !--- Configure a logical interface for the EtherChannel. interface Port-channel1 no ip address no ip directed-broadcast hold-queue 300 in ! !--- Create a subinterface for each VLAN on the port channel. ! interface Port-channel1.1 !--- Specify the encapsulation and VLAN number. encapsulation dot1Q 1 no ip redirects no ip directed-broadcast !--- Add the subinterface to the appropriate bridge group. !--- All the interfaces (and subinterfaces) that belong to the !--- same VLAN (network or subnet) should be configured to fall !--- in the same bridge group. bridge-group 1 ! !--- Configure a subinterface for the second VLAN. !--- This procedure must be repeated for every VLAN. ! interface Port-channel1.2 encapsulation dot1Q 2 no ip redirects no ip directed-broadcast bridge-group 2 ! !--- Configure a subinterface for the native VLAN. ! interface Port-channel1.99 encapsulation dot1Q 99 native no ip redirects no ip directed-broadcast !--- Note in this case you do not put any bridge group !--- statements under this subinterface. A dummy VLAN has been chosen !--- as the native VLAN on which you do not put any traffic, !--- so there is no need to have this routed. ! interface FastEthernet1 no ip address no ip directed-broadcast !--- Configure the port to channel 1. channel-group 1 ! interface FastEthernet2 no ip address no ip directed-broadcast !--- Configure the port to channel 1. channel-group 1 ! interface FastEthernet3 no ip address no ip directed-broadcast !--- The device connected on this interface belongs !--- to the same subnet (VLAN 1) as subinterface 1 on !--- the port channel, so this interface has to be added to !--- bridge-group 1. bridge-group 1 ! !--- If there are any other interfaces that belong to !--- the same VLAN (subnet), they all have to be added to !--- the respective bridge group. ( .... Output is suppressed) ! ! ! a routed interface for bridge-group 1 interface BVI1 ip address 1.1.1.1 255.255.255.0 no ip directed-broadcast no ip route-cache cef ! ! a routed interface for bridge-group 2 interface BVI2 ip address 2.2.2.1 255.255.255.0 no ip directed-broadcast no ip route-cache cef ! ip classless ! ! bridge 1 protocol ieee command enables bridging using the IEEE 802.1d spanning-tree bridge 1 protocol ieee ! The bridge 1 route ip command specifies that IP will be routed bridge 1 route ip ! bridge 2 protocol ieee command enables bridging using the IEEE 802.1d spanning-tree bridge 2 protocol ieee ! bridge 2 route ip command specifies that IP will be routed bridge 2 route ip ! line con 0 transport input none line aux 0 line vty 0 4 login ! end |
Catalyst 2950 |
---|
5-2950-24##show run Building configuration... Current configuration : 1986 bytes ! version 12.1 no service single-slot-reload-enable no service pad service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname 5-2950-24# ! ! ! !--- VLAN 2 is created for this lab set up, !--- and VLAN 1 is created by default. vlan 2 ip subnet-zero !--- For information on VTP, refer to !--- Understanding and Configuring VLAN Trunk Protocol (VTP) vtp domain cisco vtp mode transparent ! spanning-tree extend system-id ! !--- A logical port-channel interface is automatically created !--- when ports are grouped into a channel group. ! interface Port-channel1 !--- The switchport trunk native vlan 99 command is !--- issued on the Fast Ethernet interface. switchport trunk native vlan 99 !--- The switchport mode trunk command is !--- issued on the Fast Ethernet interface. switchport mode trunk !-- The switchport nonegotiate command is !--- issued on the Fast Ethernet interface. switchport nonegotiate no ip address flowcontrol send off ! interface FastEthernet0/1 !--- Configure the port to be in trunking mode. switchport mode trunk !--- Configure a dummy VLAN as the native VLAN. !--- For this example, VLAN 99 is used. switchport trunk native vlan 99 !--- Disable the DTP negotiation on this interface !--- (the Catalyst 2948G-L3 switch does not support these frames). switchport nonegotiate no ip address !--- Configure the port to channel without PAgP. channel-group 1 mode on ! interface FastEthernet0/2 !--- Configure the port to be in trunking mode. switchport mode trunk !--- Configure a dummy VLAN as the native VLAN. !--- For this example, VLAN 99 is used. switchport trunk native vlan 99 !--- Disable the DTP negotiation on this interface !--- (the Catalyst 2948G-L3 switch does not support these frames). switchport nonegotiate no ip address !--- Configure the port to channel without PAgP. channel-group 1 mode on ! interface FastEthernet0/3 !--- The PC2 on this interface belongs to VLAN 2. switchport access vlan 2 switchport mode access no ip address !--- On the userports, enable portfast to increase !--- the STP convergence time. spanning-tree portfast ! ( .... Output is suppressed) ! interface Vlan1 ip address 1.1.1.2 255.255.255.0 no ip route-cache ! ip http server ! ! line con 0 line vty 5 15 ! end |
本節提供的資訊可用於確認您的配置是否正常工作。
輸出直譯器工具(僅供註冊客戶使用)支援某些show命令,此工具可讓您檢視show命令輸出的分析。
以下show命令會驗證Catalyst 2950交換器的設定,如下輸出所示。
5-2950-24##show vlan VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa0/4, Fa0/5, Fa0/6, Fa0/7 Fa0/8, Fa0/9, Fa0/10, Fa0/11 Fa0/12, Fa0/13, Fa0/14, Fa0/15 Fa0/16, Fa0/17, Fa0/18, Fa0/19 Fa0/20, Fa0/21, Fa0/22, Fa0/23 Fa0/24, Gi0/1, Gi0/2 2 VLAN0002 active Fa0/3 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ 1 enet 100001 1500 - - - - - 0 0 2 enet 100002 1500 - - - - - 0 0 1002 fddi 101002 1500 - - - - - 0 0 1003 tr 101003 1500 - - - - - 0 0 1004 fdnet 101004 1500 - - - ieee - 0 0 1005 trnet 101005 1500 - - - ibm - 0 0 Remote SPAN VLANs ------------------------------------------------------------------------------ Primary Secondary Type Ports ------- --------- ----------------- ------------------------------------------ 5-2950-24##show interfaces port-channel 1 trunk Port Mode Encapsulation Status Native vlan Po1 on 802.1q trunking 99 Port Vlans allowed on trunk Po1 1-4094 Port Vlans allowed and active in management domain Po1 1-2 Port Vlans in spanning tree forwarding state and not pruned Po1 1-2 5-2950-24##show interface port-channel 1 Port-channel1 is up, line protocol is up Hardware is EtherChannel, address is 0005.7428.0e02 (bia 0005.7428.0e02) MTU 1500 bytes, BW 200000 Kbit, DLY 1000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set Full-duplex, 100Mb/s input flow-control is off, output flow-control is off Members in this channel: Fa0/1 Fa0/2 ARP type: ARPA, ARP Timeout 04:00:00 Last input 00:00:01, output 00:00:00, output hang never Last clearing of "show interface" counters never Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 Queueing strategy: fifo Output queue :0/40 (size/max) 5 minute input rate 25000 bits/sec, 39 packets/sec 5 minute output rate 39000 bits/sec, 59 packets/sec 11609 packets input, 955786 bytes, 0 no buffer Received 11590 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 0 watchdog, 11583 multicast, 0 pause input 0 input packets with dribble condition detected 17396 packets output, 1442093 bytes, 0 underruns 0 output errors, 0 collisions, 1 interface resets 0 babbles, 0 late collision, 0 deferred 0 lost carrier, 0 no carrier, 0 PAUSE output 0 output buffer failures, 0 output buffers swapped out 5-2950-24##show interface 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: Off Access Mode VLAN: 1 (default) Trunking Native Mode VLAN: 99 (Inactive) Administrative private-vlan host-association: none Administrative private-vlan mapping: none Operational private-vlan: none Trunking VLANs Enabled: ALL Pruning VLANs Enabled: 2-1001 Protected: false Voice VLAN: none (Inactive) Appliance trust: none 5-2950-24##show cdp neighbors Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S - Switch, H - Host, I - IGMP, r - Repeater Device ID Local Intrfce Holdtme Capability Platform Port ID 5-2948G-L3 Fas 0/1 144 R T Cat2948G Port-channe1 5-2948G-L3 Fas 0/2 178 R T Cat2948G Fas 2 5-2948G-L3 Fas 0/1 178 R T Cat2948G Fas 1 PC2#ping 1.1.1.3 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 1.1.1.3, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms
以下show命令用於驗證Catalyst 2948-L3交換機的配置,如下輸出所示。
5-2948G-L3#show interfaces port-channel 1 Port-channel1 is up, line protocol is up Hardware is FEChannel, address is 0001.43ff.1407 (bia 0000.0000.0000) MTU 1500 bytes, BW 200000 Kbit, DLY 100 usec, rely 255/255, load 1/255 Encapsulation ARPA, loopback not set, keepalive set (10 sec) Half-duplex, Unknown Speed, Media type unknown ARP type: ARPA, ARP Timeout 04:00:00 No. of active members in this channel: 2 Member 0 : FastEthernet1 Member 1 : FastEthernet2 Last input 00:00:00, output 00:00:00, output hang never Last clearing of "show interface" counters never Queueing strategy: fifo Output queue 0/40, 0 drops; input queue 0/300, 0 drops 5 minute input rate 2000 bits/sec, 4 packets/sec 5 minute output rate 1000 bits/sec, 1 packets/sec 27033 packets input, 2083710 bytes, 0 no buffer Received 6194 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort 0 watchdog, 0 multicast 0 input packets with dribble condition detected 12808 packets output, 1945983 bytes, 0 underruns 0 output errors, 0 collisions, 0 interface resets 0 babbles, 0 late collision, 0 deferred 0 lost carrier, 0 no carrier 0 output buffer failures, 0 output buffers swapped out 5-2948G-L3#show vlan Virtual LAN ID: 1 (IEEE 802.1Q Encapsulation) vLAN Trunk Interfaces: GigabitEthernet49 GigabitEthernet50.1 Port-channel1.1 This is configured as native Vlan for the following interface(s) : GigabitEthernet49 GigabitEthernet50 Protocols Configured: Address: Received: Transmitted: IP 10.10.10.1 0 0 Bridging Bridge Group 1 3418 5 Virtual LAN ID: 2 (IEEE 802.1Q Encapsulation) vLAN Trunk Interfaces: GigabitEthernet50.2 Port-channel1.2 Protocols Configured: Address: Received: Transmitted: IP 20.20.20.1 0 0 Bridging Bridge Group 2 3952 9 Virtual LAN ID: 21 (IEEE 802.1Q Encapsulation) vLAN Trunk Interface: GigabitEthernet49.1 Protocols Configured: Address: Received: Transmitted: Virtual LAN ID: 99 (IEEE 802.1Q Encapsulation) vLAN Trunk Interface: Port-channel1.99 This is configured as native Vlan for the following interface(s) : Port-channel1 Protocols Configured: Address: Received: Transmitted: 5-2948G-L3#show spanning-tree Bridge group 1 is executing the IEEE compatible Spanning Tree protocol Bridge Identifier has priority 32768, address 0001.43ff.1409 Configured hello time 2, max age 20, forward delay 15 We are the root of the spanning tree Topology change flag not set, detected flag not set Times: hold 1, topology change 35, notification 2 hello 2, max age 20, forward delay 15 Timers: hello 0, topology change 0, notification 0 bridge aging time 300 Port 6 (FastEthernet3) of Bridge group 1 is forwarding Port path cost 19, Port priority 128 Designated root has priority 32768, address 0001.43ff.1409 Designated bridge has priority 32768, address 0001.43ff.1409 Designated port is 6, path cost 0 Timers: message age 0, forward delay 0, hold 0 BPDU: sent 4107, received 2 Port 58 (Port-channel1.1 DOT1Q) of Bridge group 1 is forwarding Port path cost 12, Port priority 128 Designated root has priority 32768, address 0001.43ff.1409 Designated bridge has priority 32768, address 0001.43ff.1409 Designated port is 58, path cost 0 Timers: message age 0, forward delay 0, hold 0 BPDU: sent 5240, received 502 Bridge group 2 is executing the IEEE compatible Spanning Tree protocol Bridge Identifier has priority 32768, address 0000.0c00.d08c Configured hello time 2, max age 20, forward delay 15 Current root has priority 0, address 0010.0db1.804f Root port is 59 (Port-channel1.2), cost of root path is 50 Topology change flag not set, detected flag not set Times: hold 1, topology change 35, notification 2 hello 2, max age 20, forward delay 15 Timers: hello 0, topology change 0, notification 0 bridge aging time 300 Port 59 (Port-channel1.2 DOT1Q) of Bridge group 2 is forwarding Port path cost 12, Port priority 128 Designated root has priority 0, address 0010.0db1.804f Designated bridge has priority 32770, address 0005.7428.0e00 Designated port is 65, path cost 38 Timers: message age 3, forward delay 0, hold 0 BPDU: sent 1790, received 3964 PC1#ping 2.2.2.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms
目前尚無適用於此組態的具體疑難排解資訊。