本檔案將提供執行Catalyst OS(CatOS)的Catalyst 6500系列交換器和Catalyst 2948G-L3交換器之間的IEEE 802.1Q主幹組態範例。本文包含使用Catalyst 2948G-L3作為核心交換機,Catalyst 6500作為接入層交換機的示例網路。在簡要說明802.1Q中繼機制後,將說明Catalyst 6500交換機和Catalyst 2948G-L3交換機上的配置。
本文件沒有特定需求。
本文中的資訊係根據以下軟體和硬體版本:
執行Cisco IOS®軟體版本12.0(18)W5(22b)的Catalyst 2948G-L3交換器路由器
執行CatOS 8.5軟體的Catalyst 6500系列交換器
中繼通過兩台裝置之間的點對點鏈路傳輸來自多個VLAN的流量。中繼的兩種方法是交換機間鏈路(ISL)協定(Cisco專有協定)或802.1Q(IEEE標準)。 本文檔專門介紹802.1Q中繼。在本例中,Catalyst 6500中的VLAN通過802.1Q中繼鏈路擴展到Catalyst 2948G-L3。
Catalyst 2948G-L3是執行Cisco IOS的路由器,預設情況下,所有介面都是路由介面。您必須使用網橋組才能使用Catalyst 2948G-L3上的VLAN概念。每個網橋組都被視為一個單獨的VLAN。這些網橋組對應於所連線交換機的VLAN號。為了在Catalyst 2948G-L3上支援VLAN間路由,整合路由和橋接(IRB)和橋接虛擬介面(BVI)設定為在不同的VLAN之間路由IP。
Catalyst 2948G-L3不支援多個面向第2層的通訊協定,例如虛擬終端通訊協定(VTP)、分散式診斷和服務網路(DDSN)傳輸通訊協定(DTP)和連線埠彙總通訊協定(PAgP)。 Catalyst 2948G-L3 Cisco IOS軟體版本12.0(7)W5(15d)及更低版本不支援在802.1Q子介面上橋接。
Catalyst 2948G-L3已達到壽命終止(EoL)。 有關資訊和推薦的更換產品,請參閱適用於Cisco Catalyst 2948G-L3和4908G-L3交換機的EoL/EoS。
在本例中,Catalyst 2948G-L3部署為VLAN間路由器。Catalyst 6500執行CatOS並使用802.1Q中繼連結連線到Catalyst 2948G-L3交換器。Catalyst 6500被設定為具有兩個VLAN(20和30)的存取層交換器。這兩個VLAN之間的路由是由Catalyst 2948G-L3提供的。Catalyst 6500和Catalyst 2948G-L3之間的802.1Q主幹組態,以及Catalyst 2948G-L3交換器上的VLAN間路由組態,均在本檔案中說明。
本節提供用於設定本文件中所述功能的資訊。
註:使用Command Lookup Tool(僅供已註冊客戶使用)可獲取本節中使用的命令的詳細資訊。
本檔案會使用以下網路設定:
本檔案會使用以下設定:
Catalyst 6500 |
---|
Current configuration: ! version 8.1 ! hostname 6500 ! Catalyst 6500(enable)# set vtp mode transparent !--- In this example, the VTP mode is set to be transparent. !--- Set the VTP mode accordingly. This depends on your network. ! #module 3 : 48-port 10/100BaseTX Ethernet set vlan 20 3/20 set vlan 30 3/40 !--- The ports are assigned to the single VLAN and are !--- used as access ports. set trunk 3/30 nonegotiate dot1q !--- Port 3/30 is configured as dot1q trunk port and !--- the trunk mode is set to nonegotiate. !--- Trunk mode should be nonegotiate because 2948G-L3 does not support DTP. set port enable 3/20,3/30,3/40 !--- Use the set port enable command !--- to enable a port or a range of ports. !--- Output is suppressed. |
Catalyst 2948G-L3 |
---|
Current configuration: ! version 12.0 hostname 2948G-L3 ! interface FastEthernet 20 no ip address no ip directed-broadcast bridge-group 20 !--- The bridge-group 20 command adds the !--- Fast Ethernet 20 interface to bridge group 20. interface FastEthernet 40 no ip address no ip directed-broadcast bridge-group 30 !--- The bridge-group 30 command adds the !--- Fast Ethernet 40 interface to bridge group 30. ! interface Fast Ethernet 30 no ip address no ip redirects no ip directed-broadcast int fast ethernet 30.1 encapsulation dot1q 30 bride-group 30 exit int fast ethernet 30.2 encapsulation dot1q 20 bridge-group 20 exit int fast ethernet 30.3 encapsultion dot1q 1 native bridge-group 1 exit !--- Fast Ethernet 30 acts as a trunk port that carries VLANs 30 and 20. !--- Subinterfaces that belong to the same VLAN (network or subnet) must !--- be configured to belong to the same bridge group. !--- VLAN 1 is the native VLAN by default. bridge irb !--- The bridge irb command enables IRB on !--- the router, which allows you to route traffic within the bridge groups. bridge 30 protocol ieee bridge 20 protocol ieee !--- Choose IEEE as the Spanning Tree Protocol (STP). bridge 30 route ip bridge 20 route ip !--- The bridge number route ip command allows you !--- to route IP traffic between the BVI interface !--- and the other IP interfaces on the router. interface bvi 20 ip address 192.168.20.1 255.255.255.0 exit interface bvi 30 ip address 192.168.30.1 255.255.255.0 exit !--- Creates BVI interfaces for bridges 20 and 30. These interfaces act !--- as the gateway for VLANs 20 and 30. !--- Output is suppressed. |
注意:10/100介面上Catalyst 2948G-L3上的四個相鄰埠(例如f1至f4或f45至f48)都必須使用相同的VLAN封裝。VLAN封裝為ISL或802.1Q。
使用本節內容,確認您的組態是否正常運作。
輸出直譯器工具(僅供已註冊客戶使用)(OIT)支援某些show命令。使用OIT檢視show命令輸出的分析。
2948G-L3#show vlan virtual LAN ID: 30 (IEEE 802.1Q Encapsulation) vLAN Trunk Interface: FastEthernet30.1 This is configured as native Vlan for the following interface(s) : FastEthernet30 Protocols Configured: Address: Received: Transmitted: Bridging Bridge Group 20 1 0 Virtual LAN ID: 20 (IEEE 802.1Q Encapsulation) vLAN Trunk Interface: FastEthernet30.2 Protocols Configured: Address: Received: Transmitted: Bridging Bridge Group 30 921 0
2948G-L3#show bridge 20 Total of 300 station blocks, 298 free Codes: P - permanent, S - self Bridge Group 20: Address Action Interface 0009.11b9.1a75 forward Fa30.2
show trunk — 此命令驗證中繼配置,如以下輸出所示:
Console> (enable) show trunk 3/30 * - indicates vtp domain mismatch # - indicates dot1q-all-tagged enabled on the port $ - indicates non-default dot1q-ethertype value Port Mode Encapsulation Status Native vlan -------- ----------- ------------- ------------ ----------- 3/30 nonegotiate dot1q trunking 1 Port Vlans allowed on trunk -------- --------------------------------------------------------------------- 3/30 1-1005,1025-4094 Port Vlans allowed and active in management domain -------- --------------------------------------------------------------------- 3/30 1,20,30
show vlan — 此命令顯示與相應VLAN相符的連線埠:
VLAN Name Status IfIndex Mod/Ports, Vlans ---- -------------------------------- --------- ------- ------------------------ 1 default active 6 1/1-2 3/1-19,3/21-39,3/41-48 20 VLAN0020 active 71 3/20 30 VLAN0030 active 69 3/40 1002 fddi-default active 7 1003 token-ring-default active 10 1004 fddinet-default active 8 1005 trnet-default active 9
本節提供的資訊可用於對組態進行疑難排解。
輸出直譯器工具(僅供已註冊客戶使用)(OIT)支援某些show命令。使用OIT檢視show命令輸出的分析。
附註:使用 debug 指令之前,請先參閱有關 Debug 指令的重要資訊。
PC2#ping 192.168.20.3 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.20.3, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms PC1#ping 192.168.30.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.30.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms PC1#ping 192.168.20.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.20.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms
修訂 | 發佈日期 | 意見 |
---|---|---|
1.0 |
13-Jul-2006 |
初始版本 |