本文提供執行Catalyst OS(CatOS)的Catalyst 5500和5000交換器之間的802.1Q(dot1q)主幹上的組態範例。 在此案例中,可以使用任何執行CatOS的Catalyst 4000、5000或6000系列成員來取得相同的結果。
主幹通過一條鏈路傳輸多個VLAN的流量,並允許您在整個網路中擴展VLAN。實現乙太網中繼的兩種方法是:
InterSwitch Link(ISL)協定 — ISL是Cisco專有的中繼封裝。有關ISL的詳細資訊,請參閱InterSwitch鏈路幀格式。
802.1Q(IEEE標準) — 802.1Q是業界標準的中繼封裝。有關802.1Q的詳細資訊,請參閱使用802.1Q封裝的Catalyst 4000、5000和6000系列交換機之間的中繼。
如需文件慣例的詳細資訊,請參閱思科技術提示慣例。
本檔案顯示CatOS交換器的組態檔,以及相關範例show命令的輸出。有關如何在Catalyst交換器之間設定802.1Q主幹的詳細資訊,請參閱以下檔案:
若要建立本檔案中的範例,以下交換器在已清除的組態下的實驗室環境中使用:
執行Catalyst OS 6.4(2)軟體的Catalyst 5500交換器
執行Catalyst OS 6.4(2)軟體的Catalyst 6500交換器
已使用clear config all命令清除所有裝置上的配置,以確保它們具有預設配置。
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您在即時網路中工作,請確保在使用任何命令之前瞭解其潛在影響。
請注意以下事項:
Catalyst 4000系列交換機(包括Catalyst 2948G和Catalyst 2980G)僅支援802.1Q中繼,而不是ISL中繼。有關詳細資訊,請參閱實施中繼的系統要求。
Catalyst 6000/6500上的所有乙太網路連線埠都支援802.1Q和ISL封裝,但10-Gigabit乙太網路交換模組除外,該模組不支援ISL。
根據模組的不同,支援Catalyst 5000中繼的埠僅支援ISL封裝,或同時支援ISL和802.1Q。驗證這一點的最佳方式是發出show port capabilities命令。中繼容量已明確說明。例如:
cat5509> show port capabilities 2/1 Model WS-X5550 Port 2/1 Type 1000BaseSX Speed 1000 Duplex full Trunk encap type 802.1Q,ISL !-- This particular port supports both 802.1Q and ISL. Trunk mode on,off,desirable,auto,nonegotiate Channel no Broadcast suppression percentage(0-100) Flow control receive-(off,on,desired),send-(off,on,desired) Security no Dot1x yes Membership static Fast start yes QOS scheduling rx-(none),tx-(none) CoS rewrite no ToS rewrite no Rewrite no UDLD yes AuxiliaryVlan no SPAN source,destination cat5509> (enable)
有關中繼的系統要求的詳細資訊,請參閱實施中繼的系統要求。
確保中繼鏈路上的中繼模式匹配。如果鏈路的一端配置為ISL中繼,則鏈路的另一端也應配置為ISL。同樣,如果鏈路的一端配置為802.1Q,鏈路的另一端也應配置為802.1Q。
在802.1Q中繼中,除了本徵VLAN外,所有VLAN資料包都標籤在中繼鏈路上。本徵VLAN資料包在TRUNK鏈路上無標籤傳送。因此,為中繼配置的兩台交換機上的本地VLAN應該相同。這樣,當收到沒有標籤的幀時,我們可以推斷出幀屬於哪個VLAN。預設情況下,VLAN 1是所有交換機上的本地VLAN。
在CatOS中,本徵VLAN可以透過發出set vlan vlan-id mod/port 命令來變更,其中mod/port 為主干連線埠。
如需詳細資訊,請參閱使用802.1Q封裝的Catalyst 4000、5000和6000系列交換器之間的主干連線。
本節提供用於設定本文件中所述功能的資訊。
注意:要查詢有關本文檔中使用的命令的其他資訊,請使用命令查詢工具(僅限註冊客戶)。
本文檔使用下圖所示的網路設定。
本文檔使用如下所示的配置。
註:輸出之間的註釋以藍色斜體新增。
Catalyst 5509 |
---|
#version 6.4(2) ! set option fddi-user-pri enabled set password $2$q.J7$O5n.pwx7aEC6NHWJfXadx1 set enablepass $2$o.h/$bAxfjJ4XUA/RMUHqBr1YQ0 ! #errordetection set errordetection portcounter enable ! #system set system name cat5509 ! #frame distribution method set port channel all distribution mac both ! #vtp !--- In this example, the VTP mode is set to be transparent. !--- Depending on your network, set the VLAN Trunking Protocol (VTP) !--- mode accordingly. set vtp mode transparent !--- For details on VTP, refer to Configuring VTP on Catalyst Switches. set vlan 1 name default type ethernet mtu 1500 said 100001 state active set vlan 1002 name fddi-default type fddi mtu 1500 said 101002 state active set vlan 1004 name fddinet-default type fddinet mtu 1500 said 101004 state active stp ieee set vlan 1005 name trnet-default type trbrf mtu 1500 said 101005 state active stp ibm set vlan 2 set vlan 1003 name token-ring-default type trcrf mtu 1500 said 101003 state acti ve mode srb aremaxhop 7 stemaxhop 7 backupcrf off ! #ip !--- IP address used for management. set interface sc0 1 10.10.10.2/255.255.255.0 10.10.10.255 ! #set boot command set boot config-register 0x2102 set boot system flash slot0:cat5000-supg.6-4-2.bin ! # default port status is enable ! ! #module 1 empty ! #module 2 : 2-port 1000BaseX Supervisor IIIG !--- The dot1q trunking mode is set to on. Depending on your network !--- and requirements, set the trunking mode accordingly. set trunk 2/1 on dot1q 1-1005 !--- For details on different trunking modes, refer to !--- Configuring VLAN Trunks on Fast Ethernet and Gigabit Ethernet Ports. ! #module 3 empty ! #module 4 empty #module 5 : 24-port 10/100BaseTX Ethernet !--- Ports 5/3-24 have been assigned to VLAN 2. set vlan 2 5/3-24 !--- Portfast has been enabled on the ports connected to the workstations. set spantree portfast 5/2-24 enable !--- For details on why to enable portfast,refer to !--- Using PortFast and Other Commands to Fix Workstation Startup Connectivity Delays. ! #module 6 empty ! !--- Output suppressed. end |
Catalyst 6500 |
---|
#Version 6.4(2) ! set option fddi-user-pri enabled set password $2$J75L$Ug4163kfeHTDcLJZ/L9es1 set enablepass $2$h/BN$i3S54iNvIXknFelh6gOve0 ! #errordetection set errordetection portcounter enable ! #system set system name cat6500 ! #frame distribution method set port channel all distribution Mac both ! #vtp !--- In this example, the VTP mode is set to be transparent. !--- Depending on your network, set the VTP mode accordingly. set vtp mode transparent !--- For details on VTP, refer to !--- Configuring VTP on Catalyst Switches. set vlan 1 name default type ethernet mtu 1500 said 100001 state active set vlan 1002 name fddi-default type fddi mtu 1500 said 101002 state active !--- The lines below are wrapped around for display reasons. set vlan 1004 name fddinet-default type fddinet mtu 1500 said 101004 state active stp IEEE set vlan 1005 name trnet-default type trbrf mtu 1500 said 101005 state active stp IBM set vlan 2 set vlan 1003 name token-ring-default type trcrf mtu 1500 said 101003 state active mode srb aremaxhop 7 stemaxhop 7 backupcrf off ! #ip !--- IP address used for management. set interface sc0 1 10.10.10.3/255.255.255.0 10.10.10.255 ! #set boot command set boot config-register 0x2102 set boot system flash slot0:cat6000-sup2.6-4-2.bin ! # default port status is enable ! ! #module 1 : 2-port 1000BaseX Supervisorset module name 1 ! #module 2 : 12-port 10/100BaseTX Ethernet ! #module 3 : 8-port 1000BaseX Ethernet set module name 3 !--- The dot1q trunking mode is set to on. Depending on your network !--- and requirements, set the trunking mode accordingly. set trunk 3/1 on dot1q 1-1005,1025-4094 !--- For details on different trunking modes, refer to !--- Configuring VLAN Trunks on Fast Ethernet and Gigabit Ethernet Ports. ! #module 4 : 48-port 10/100BaseTX Ethernet !--- Ports 4/3-24 have been assigned to VLAN 2. set vlan 2 4/3-48 !--- Portfast has been enabled on the ports connected to the workstations. set spantree portfast 4/2-48 enable !--- For details on why to enable portfast, refer to !--- Using PortFast and Other Commands to Fix Workstation Startup Connectivity Delays. ! #module 5 : 12-port 10BaseFL Ethernet end !--- Output suppressed. |
本節提供的資訊可用於確認您的組態是否正常運作。
Output Interpreter工具(僅供註冊客戶使用)支援某些show命令,這允許您檢視show命令輸出的分析。
show port capabilities module/port
show port module/port
show trunk
show vtp domain
以下是用於驗證中繼配置的一些命令:
show port capabilities module/port — 此命令用於驗證連線埠是否可建立主干連線。
cat5509> (enable) show port capabilities 2/1 Model WS-X5550 Port 2/1 Type 1000BaseSX Speed 1000 Duplex full Trunk encap type 802.1Q,ISL !--- This particular port supports both 802.1Q and ISL Trunk mode on,off,desirable,auto,nonegotiate Channel no Broadcast suppression percentage(0-100) Flow control receive-(off,on,desired),send-(off,on,desired) Security no Dot1x yes Membership static Fast start yes QOS scheduling rx-(none),TX(1q4t) COs rewrite no ToS rewrite no Rewrite no UDLD yes AuxiliaryVlan no SPAN source,destination cat5509> (enable)
show port module/port — 此命令會說明特定連線埠的狀態,以及它是否為主幹。
cat5509> (enable) show port 2/1 Port Name Status Vlan Level Duplex Speed Type ----- ------------------ ---------- ---------- ------ ------ ----- ------------ 2/1 connected trunk normal full 1000 1000BaseSX Port Trap IfIndex ----- -------- ------- 2/1 disabled 47 Port Broadcast-Limit Broadcast-Drop -------- --------------- -------------- 2/1 - 0 Port Send FlowControl Receive FlowControl RxPause TxPause Unsupported admin oper admin oper opcodes ----- -------- -------- --------- --------- ---------- ---------- ----------- 2/1 desired off off off 0 0 0 Port Align-Err FCS-Err Xmit-Err Rcv-Err UnderSize ----- ---------- ---------- ---------- ---------- --------- 2/1 0 0 0 2 0 Port Single-Col Multi-Coll Late-Coll Excess-Col Carri-Sen Runts Giants ----- ---------- ---------- ---------- ---------- --------- --------- --------- 2/1 0 0 0 0 0 0 - !--- Output suppressed.
show trunk — 此命令用於驗證中繼狀態和配置。
cat5500> (enable) show trunk * - indicates vtp domain mismatch Port Mode Encapsulation Status Native vlan -------- ----------- ------------- ------------ ----------- 4/1 on dot1q trunking 1 Port Vlans allowed on trunk -------- --------------------------------------------------------------------- 4/1 1-1005 Port Vlans allowed and active in management domain -------- --------------------------------------------------------------------- 4/1 1-2 Port Vlans in spanning tree forwarding state and not pruned -------- --------------------------------------------------------------------- 4/1 1-2
show vtp domain — 此命令用於檢查VTP資訊。
cat5500> (enable) show vtp domain Domain Name Domain Index VTP Version Local Mode Password -------------------------------- ------------ ----------- ----------- ---------- 1 2 Transparent - Vlan-count Max-vlan-storage Config Revision Notifications ---------- ---------------- --------------- ------------- 6 1023 0 disabled Last Updater V2 Mode Pruning PruneEligible on Vlans --------------- -------- -------- ------------------------- 10.10.10.2 disabled disabled 2-1000
如果您的Cisco裝置具有show-tech support指令的輸出,可以使用Output Interpreter(僅限註冊客戶)顯示潛在問題和修正程式。
以下是一些用於驗證中繼配置的命令:
show port capabilities module/port — 此命令用於驗證連線埠是否可建立主干連線。
cat6500> (enable) show port capabilities 3/1 Model WS-X6408A-GBIC Port 3/1 Type 1000BaseSX Speed 1000 Duplex full Trunk encap type 802.1Q,ISL Trunk mode on,off,desirable,auto,nonegotiate Channel yes Broadcast suppression percentage(0-100) Flow control receive-(off,on),send-(off,on) Security yes Dot1x yes Membership static,dynamic Fast start yes QOS scheduling rx-(1p1q4t),tx-(1p2q2t) CoS rewrite yes ToS rewrite DSCP UDLD yes Inline power no AuxiliaryVlan no SPAN source,destination COPS port group 3/1-4 Link debounce timer yes
show port module/port — 此命令會說明特定連線埠的狀態,以及它是否為主幹。
cat6500> (enable) show port 3/1 Port Name Status Vlan Duplex Speed Type ----- -------------------- ---------- ---------- ------ ----- ------------ 3/1 connected trunk full 1000 1000BaseSX Port Security Violation Shutdown-Time Age-Time Max-Addr Trap IfIndex ----- -------- --------- ------------- -------- -------- -------- ------- 3/1 disabled shutdown 0 0 1 disabled 61 !--- Output suppressed.
show trunk — 此命令用於驗證中繼狀態和配置。
cat6500> (enable) show trunk * - indicates vtp domain mismatch Port Mode Encapsulation Status Native vlan -------- ----------- ------------- ------------ ----------- 3/1 on dot1q trunking 1 Port Vlans allowed on trunk -------- --------------------------------------------------------------------- 3/1 1-1005,1025-4094 Port Vlans allowed and active in management domain -------- --------------------------------------------------------------------- 3/1 1-2 Port Vlans in spanning tree forwarding state and not pruned -------- --------------------------------------------------------------------- 3/1 1-2
show vtp domain — 此命令用於檢查VTP資訊。
cat5000> (enable) show vtp domain Domain Name Domain Index VTP Version Local Mode Password -------------------------------- ------------ ----------- ----------- ---------- 1 2 Transparent - Vlan-count Max-vlan-storage Config Revision Notifications ---------- ---------------- --------------- ------------- 6 1023 0 disabled Last Updater V2 Mode Pruning PruneEligible on Vlans --------------- -------- -------- ------------------------- 10.10.10.3 disabled disabled 2-1000
目前尚無適用於此組態的具體疑難排解資訊。