本檔案會使Catalyst OS(CatOS)使用者熟悉Cisco IOS®系統軟體使用的第2層(L2)組態。本檔案介紹CatOS和Cisco IOS軟體之間適用於連線埠/介面、主幹、通道、VLAN和虛擬主幹通訊協定(VTP)等命令和概念的相似之處和差異。 本檔案提供CatOS/Cisco IOS軟體命令表,以快速參考最常用的命令。
本文件沒有特定需求。
本文件所述內容不限於特定軟體和硬體版本。
如需文件慣例的詳細資訊,請參閱思科技術提示慣例。
Supervisor Engine上使用CatOS,MSFC上則使用Cisco IOS軟體(混合):CatOS 映像可作為系統軟體,在 Catalyst 6500/6000 交換器上執行 Supervisor Engine。如果安裝了選用的 MSFC,則會使用單獨的 Cisco IOS 軟體映像來執行 MSFC。
Supervisor Engine 和 MSFC 上皆使用 Cisco IOS 軟體(原生):單一 Cisco IOS 軟體映像可作為系統軟體,在 Catalyst 6500/6000 交換器上執行 Supervisor Engine 和 MSFC。
註:如需詳細資訊,請參閱適用於Cisco Catalyst 6500系列交換器的Cisco Catalyst和Cisco IOS作業系統的比較檔案。
Catalyst 6500/6000交換器可以選擇執行兩種軟體型別中的一種。
CatOS:此實作在邏輯上等價於具有路由交換器模組(RSM)的Catalyst 5500/5000系列交換器。 在CatOS模式下運行時,有兩個獨立的軟體映像。MSFC運行傳統的Cisco IOS軟體映像,而Supervisor Engine運行傳統的CatOS。每台裝置都有自己的配置檔案。
Cisco IOS軟體:此實現提供單一的「類似路由器」介面。路由器(具有路由處理器[RP]名稱)和交換機Supervisor引擎(具有交換機處理器[SP]名稱)之間的劃分對使用者是透明的。有一個控制檯連線、配置檔案和軟體映像。
注意:始終需要MSFC1引導映像才能正確載入MSFC1。引導映像對於硬體支援是必需的,而且引導映像為緊急恢復情況提供備份。軟體映像實際上會載入路由器完整功能所需的軟體。
除MSFC外,還需要策略功能卡(PFC)。
在CatOS中,交換器Supervisor Engine和MSFC執行不同的軟體映像。
針對Supervisor Engine,有兩種不同的映像型別:一個用於Supervisor Engine Is,另一個用於Supervisor Engine II。cat6000-sup字首後面的數字表示映像中的差異。
如果2位於cat6000-sup首碼之後,則映像用於Catalyst Supervisor Engine II。如果720位於cat6000-sup字首之後,則映像為Catalyst Supervisor Engine 720。如果2或720都不位於cat6000-sup字首之後,則映像為Catalyst Supervisor Engine I。例如,名為「cat6000-sup.6-2-3.bin」的檔案用於Supervisor Engine I。名為「cat6000-sup2.6-2-3.bin」的檔案用於Supervisor Engine II。要下載這些映像,請參閱軟體下載 — Catalyst 6500/6000 CatOS系統軟體(僅限註冊客戶)。
在MSFC1、MSFC2或MSFC3上運行搭載Cisco IOS軟體的CatOS時,每個MSFC型別都運行其自己的獨立映像。Download Software Area(僅供註冊客戶使用)現在包含這些映像。要下載MSFC1、MSFC2或MSFC3的映像,請轉到Cisco Software Download頁面。
Cisco IOS系統軟體為Supervisor Engine和MSFC子卡運行組合軟體映像。對於使用者,只有一個映像可載入到快閃記憶體中。Supervisor Engine和MSFC安裝的型別對每個映像進行分類。Download Software Area(僅限註冊客戶)中的映像類別為:
管理引擎720/MSFC3(CAT6000-SUP720/MSFC3)
Supervisor引擎2/MSFC2(CAT6000-SUP2/MSFC2)
Supervisor Engine 1/MSFC2(CAT6000-SUP1/MSFC2)
Supervisor Engine 1/MSFC1(CAT6000-SUP1/MSFC1)
要下載Cisco IOS系統軟體映像,請參閱軟體下載 — Catalyst 6500/6000 Cisco IOS系統軟體(僅限註冊客戶)。
註:Supervisor引擎II必須使用MSFC2子卡;supervisor引擎II無法使用原始MSFC子卡。
要確定當前運行的映像,請發出show version命令。
附註:在混合模式下,對各個模組發出show version命令,以確定它們正在運行的當前映像。
例如,此處,show version命令表示搭載MSFC2的Catalyst 6500在Supervisor Engine上執行CatOS,並在MSFC上執行Cisco IOS軟體。
Hybrid_Cat6500>(enable) show version WS-C6509 Software, Version NmpSW: 7.6(4) Copyright (c) 1995-2003 by Cisco Systems NMP S/W compiled on Nov 4 2003, 19:22:09 System Bootstrap Version: 5.3(1) System Boot Image File is 'bootflash:cat6000-supk8.7-6-4.bin' System Configuration register is 0x2102 Hardware Version: 2.0 Model: WS-C6509 Serial #: SCA043500S2 PS1 Module: WS-CAC-1300W Serial #: SON04340836 PS2 Module: WS-CAC-1300W Serial #: SNI05470791 Mod Port Model Serial # Versions --- ---- ------------------- ----------- -------------------------------------- 1 2 WS-X6K-SUP1A-2GE SAD04500AFW Hw : 7.4 Fw : 5.3(2) Fw1: 5.4(2) Sw : 7.6(4) Sw1: 7.6(4) WS-X6K-SUP1A-2GE SAD04500AFW Hw : 7.4 Sw : 2 2 WS-X6K-SUP1A-2GE SAL0549F477 Hw : 7.1 Fw : 5.3(1) Fw1: 5.4(2) Sw : 7.6(4) Sw1: 7.6(4) WS-X6K-SUP1A-2GE SAL0549F477 Hw : 7.1 Sw : 3 48 WS-X6148-GE-TX SAD0746052K Hw : 4.0 Fw : 7.2(1) Sw : 7.6(4) 4 48 WS-X6248-RJ-45 SAD04281CZY Hw : 1.2 Fw : 5.1(1)CSX Sw : 7.6(4) 5 48 WS-X6248-RJ-45 SAD042608NZ Hw : 1.2 Fw : 5.1(1)CSX Sw : 7.6(4) 6 48 WS-X6248-RJ-45 SAD04170CG9 Hw : 1.2 Fw : 5.1(1)CSX Sw : 7.6(4) 7 48 WS-X6248-RJ-45 SAD04270N9U Hw : 1.2 Fw : 5.1(1)CSX Sw : 7.6(4) 15 1 WS-F6K-MSFC2 SAD04520C65 Hw : 1.7 Fw : 12.1(19)E1 Sw : 12.1(19)E1 16 1 WS-F6K-MSFC2 SAL0548F2TE Hw : 2.0 Fw : 12.1(19)E1 Sw : 12.1(19)E1 DRAM FLASH NVRAM Module Total Used Free Total Used Free Total Used Free ------ ------- ------- ------- ------- ------- ------- ----- ----- ----- 2 130944K 50017K 80927K 16384K 10857K 5527K 512K 389K 123K Uptime is 142 days, 4 hours, 27 minutes
功能 | CatOS | Cisco IOS軟體 |
---|---|---|
配置檔案 | 兩個配置檔案:一個用於Supervisor Engine(NMP1),一個用於MSFC | 一個配置檔案 |
軟體映像 | 兩個影象:一個用於Supervisor Engine,另一個用於MSFC | 一個軟體映像;還需要MSFC引導映像才能正確載入MSFC |
預設埠模式 | 每個埠都是L2交換埠 | 每個埠都是L32路由埠(介面) |
預設埠狀態 | 每個埠都啟用 | 每個連線埠(介面)都處於關閉狀態 |
配置命令格式 | 命令關鍵字set位於每個配置命令之前 | 帶有全域性和介面級命令的Cisco IOS命令結構 |
配置模式 | 無配置模式(set、clear和show命令) | configure terminal和VLAN database命令啟用配置模式 |
移除/變更組態 | 使用clear、set和/或enable/disable命令 | 與Cisco IOS命令結構相同;關鍵字no否定命令 |
1 NMP =網路管理處理器
2 L3 =第3層
您將Cisco IOS軟體中的埠稱為介面。Cisco IOS軟體中有兩種介面模式:
L3路由介面
L2交換機介面
注意:預設值為L3路由介面。
要使埠/介面成為L2交換機介面,請在介面下新增switchport命令,如以下示例所示:
Cat6500# show running-config interface fastethernet 5/10 Building configuration... Current configuration: ! interface FastEthernet5/10 no ip address switchport end
L2交換機埠的預設介面配置與CatOS中的不同。例如,當連線埠具有L2連線埠設定時,主幹模式為desirable,而不是auto。show interface interface switchport命令會提供有關L2交換器連線埠目前組態的詳細資訊。以下是範例:
Cat6500# show interfaces fastethernet 5/10 switchport Name: Fa5/10 Switchport: Enabled Administrative Mode: dynamic desirable Operational Mode: down Administrative Trunking Encapsulation: negotiate Negotiation of Trunking: On Access Mode VLAN: 1 ( default) Trunking Native Mode VLAN: 1 (default) Trunking VLANs Enabled: ALL Pruning VLANs Enabled: 2-1001
Cisco IOS軟體中有三種主要的L2交換機埠模式:
存取:將介面設定為非中繼模式。
動態:將介面設定為動態協商訪問或中繼模式。此設定有兩個選項:
Desirable:如果鄰居裝置在desirable或auto模式下具有中繼配置,此配置允許埠成為中繼。當連線埠具有交換器連線埠組態時,理想模式是預設模式。
自動:如果另一個鄰居在desirable模式下有中繼配置,此配置允許埠成為中繼。
中繼:將介面設定為永久中繼模式。
功能 | CatOS |
---|---|
啟用PortFast | CatOS (enable) set spantree portfast 4/1 enable Warning: Spantree port fast start should only be enabled on ports connected to a single host. Connecting hubs, concentrators, switches, bridges, etc. to a fast start port can cause temporary spanning tree loops. Use with caution. Spantree port 4/1 fast start enabled. |
為主機訪問配置埠。此命令啟用PortFast並禁用CatOS中的中繼和通道化。 | CatOS (enable) set port host 4/2 Port(s) 4/2 channel mode set to off. Warning: Spantree port fast start should only be enabled on ports connected to a single host. Connecting hubs, concentrators, switches, bridges, etc. to a fast start port can cause temporary spanning tree loops. Use with caution. Spantree port 4/2 fast start enabled. Port(s) 4/2 trunk mode set to off. CatOS (enable) |
顯示埠狀態 | show port show port mod show port mod/port show port counters
show port counters mod/port
|
功能 | Cisco IOS軟體 |
---|---|
啟用PortFast | CiscoIOS(config)# interface fastethernet 4/2 CiscoIOS(config-if)# spanning-tree portfast Warning: portfast should only be enabled on ports connected to a single host. Connecting hubs, concentrators, switches, bridges, etc. to this interface when portfast is enabled can cause temporary spanning tree loops. Use with CAUTION Portfast has been configured on FastEthernet4/2 but will only have effect when the interface is in a non-trunking mode. CiscoIOS(config-if)# ^Z CiscoIOS# |
為主機訪問配置埠。此命令啟用PortFast並禁用CatOS中的中繼和通道化。 | CiscoIOS(config)# interface fastethernet 4/2 CiscoIOS(config-if)# switchport CiscoIOS(config-if)# switchport mode access CiscoIOS(config-if)# spanning-tree portfast %Warning: portfast should only be enabled on ports connected to a single host. Connecting hubs, concentrators, switches, bridges, etc. to this interface when portfast is enabled, can cause temporary spanning tree loops. Use with CAUTION %Portfast has been configured on FastEthernet4/2 but will only have effect when the interface is in a non-trunking mode. CiscoIOS(config-if)# ^Z CiscoIOS# |
顯示埠狀態 | show interface status
show interface status module mod
show interface status errordisabled
show interface counters error module mod
|
即使交換器執行Cisco IOS軟體,也可能會有大量的介面。因此,為了協助快速設定多個連線埠,Cisco IOS軟體允許您同時設定一系列介面,如在CatOS中。如果您發出range命令,則可以使用相同的配置快速配置許多介面。
CiscoIOS(config)# interface range gigabitethernet 1/1 -2, fastethernet 4/1 -24
注意:在此命令的語法中,第一個介面範圍和連字型大小之間有一個空格。語法很重要,而且必須絕對準確。如果沒有空格,命令列介面(CLI)將返回語法錯誤。
以下是range命令不正確使用的示例:
CiscoIOS(config)# interface range gigabitethernet 1/1-2,fastethernet 4/1-24 ^ % Invalid input detected at '^' marker. CiscoIOS(config)# interface range gigabitethernet 1/1 -2,fastethernet 4/1-24 ^ % Invalid input detected at '^' marker. CiscoIOS(config)# interface range gigabitethernet 1/1 -2,fastethernet 4/1 -24
此範例將VLAN 2中的連線埠從4/2-8設定:
NativeIOS(config)# interface range fastethernet 4/2 -8 CiscoIOS(config-if)# switchport CiscoIOS(config-if)# switchport access vlan 2 CiscoIOS(config-if)# no shut CiscoIOS(config-if)# ^Z CiscoIOS# show interface
使用range命令後,組態顯示如下:
interface FastEthernet4/4 no ip address switchport switchport access vlan 2 ! interface FastEthernet4/5 no ip address switchport switchport access vlan 2 ! interface FastEthernet4/6 no ip address switchport switchport access vlan 2 ! interface FastEthernet4/7 no ip address switchport switchport access vlan 2 ! interface FastEthernet4/8 no ip address switchport switchport access vlan 2 ! interface FastEthernet4/9 no ip address shutdown
Cisco IOS軟體支援交換器間連結通訊協定(ISL)和IEEE 802.1Q(dot1q)中繼模式。介面配置有不同的選項,如瞭解Cisco IOS系統軟體中的介面一節所述。中繼的工作方式與CatOS完全相同,不同之處在於Cisco IOS軟體中的預設設定為desirable而不是auto。
功能 | CatOS |
---|---|
啟用ISL中繼 | CatOS (enable) set trunk 4/1 on isl Port(s) 4/1 trunk mode set to on. Port(s) 4/1 trunk type set to isl. |
啟用dot1q trunk | CatOS (enable) set trunk 4/1 on dot1q Port(s) 4/1 trunk mode set to on. Port(s) 4/1 trunk type set to dot1q CatOS (enable) set vlan 2 4/1 VLAN 2 modified. VLAN 1 modified. VLAN Mod/Ports ---- ----------------------- 2 1/1 4/1 注意:對於dot1q,本徵VLAN匹配中繼鏈路非常重要。在CatOS中使用set vlan vlan-id mod/port 命令為中繼設定本地VLAN。 |
更改中繼模式 | CatOS (enable) set trunk mod/port {on | off | desirable | auto | nonegotiate} [vlans] [isl | dot1q | negotiate] |
顯示中繼狀態 | show trunk show trunk mod show port mod/port |
功能 | Cisco IOS軟體 |
---|---|
啟用ISL中繼 | CiscoIOS# configure terminal Enter configuration commands, one per line. End with CNTL/Z. CiscoIOS(config)# interface fastethernet 4/1 CiscoIOS(config-if)# switchport CiscoIOS(config-if)# switchport trunk encapsulation isl CiscoIOS(config-if)# switchport mode trunk 3d22h: %DTP-SP-5-TRUNKPORTON: Port Fa4/1 has become isl CiscoIOS(config-if)# ^Z CiscoIOS# |
啟用dot1q trunk | CiscoIOS# configure terminal Enter configuration commands, one per line. End with CNTL/Z. CiscoIOS(config)# interface fastethernet 4/1 CiscoIOS(config-if)# switchport CiscoIOS(config-if)# switchport trunk encapsulation dot1q CiscoIOS(config-if)# switchport mode trunk 3d22h: %DTP-SP-5-TRUNKPORTON: Port Fa4/1 has become dot1q CiscoIOS(config-if)# switchport trunk native vlan 2 CiscoIOS(config-if)# ^Z CiscoIOS# |
更改中繼模式 | CiscoIOS(config-if)# switchport mode {access | trunk | multi | dynamic {auto | desirable}} |
顯示中繼狀態 | show interfaces trunk show interfaces trunk module number show interfaces interface-type mod/port show interfaces status |
在Cisco IOS軟體中驗證中繼資訊的方法有多種。
注意:路由埠不是L2中繼埠。
show interfaces trunk命令顯示當前中繼的所有介面。此命令不顯示具有要中繼的配置的埠,但不主動中繼埠:
Switch# show interfaces trunk Port Mode Encapsulation Status Native vlan Po41 desirable n-isl trunking 1 Port Vlans allowed on trunk Po41 1-1005 Port Vlans allowed and active in management domain Po41 1-6,1002-1005 Port Vlans in spanning tree forwarding state and not pruned Po41 1-6,1002-1005
show interfaces trunk module number 命令會顯示指定模組上的所有介面,而不管中繼狀態如何。
Switch# show interfaces trunk module 4 Port Mode Encapsulation Status Native vlan Fa4/1 desirable n-isl trunk-inbndl 1 (Po41) Fa4/2 desirable n-isl trunk-inbndl 1 (Po41) Fa4/3 desirable n-isl trunk-inbndl 1 (Po41) Fa4/4 desirable n-isl trunk-inbndl 1 (Po41) Fa4/5 desirable negotiate not-trunking 1 Fa4/6 desirable negotiate not-trunking 1 Fa4/7 desirable negotiate not-trunking 1 Fa4/8 desirable negotiate not-trunking 1 Fa4/9 desirable negotiate not-trunking 1 Fa4/10 routed negotiate routed 1 Fa4/11 desirable negotiate not-trunking 1 Fa4/12 desirable negotiate not-trunking 1 Fa4/13 desirable negotiate not-trunking 1 Fa4/14 desirable negotiate not-trunking 1 Fa4/15 desirable negotiate not-trunking 1 Fa4/16 desirable negotiate not-trunking 1 Fa4/17 desirable negotiate not-trunking 1
您可以使用show interfaces interface-type mod/port trunk命令檢查特定介面的中繼狀態,而無需滾動多個螢幕。
Switch# show interfaces fastethernet 4/1 trunk Port Mode Encapsulation Status Native vlan Fa4/1 desirable n-isl trunk-inbndl 1 (Po41) Port Vlans allowed on trunk Fa4/1 1-1005 Port Vlans allowed and active in management domain Fa4/1 1-6,1002-1005 Port Vlans in spanning tree forwarding state and not pruned Fa4/1 1-6,1002-1005
show interfaces status命令為每個介面提供狀態和中繼狀態的一行顯示。
Switch# show interfaces status Port Name Status Vlan Duplex Speed Type Gi1/1 connected routed full 1000 1000BaseSX Gi1/2 connected 1 full 1000 1000BaseSX Gi3/1 notconnect routed full 1000 missing Gi3/2 notconnect routed full 1000 missing Gi3/3 notconnect routed full 1000 1000BaseSX Gi3/4 notconnect routed full 1000 1000BaseSX Gi3/5 notconnect routed full 1000 1000BaseSX Gi3/6 notconnect routed full 1000 1000BaseSX Gi3/7 notconnect routed full 1000 1000BaseSX Gi3/8 notconnect routed full 1000 1000BaseSX Fa4/1 connected trunk full 100 100BaseFX MM Fa4/2 connected trunk full 100 100BaseFX MM Fa4/3 connected trunk full 100 100BaseFX MM Fa4/4 connected trunk full 100 100BaseFX MM Fa4/5 notconnect 1 full 100 100BaseFX MM Fa4/6 notconnect 1 full 100 100BaseFX MM Fa4/7 notconnect 2 full 100 100BaseFX MM Fa4/8 notconnect 2 full 100 100BaseFX MM Fa4/9 notconnect 1 full 100 100BaseFX MM Fa4/10 notconnect routed full 100 100BaseFX MM Fa4/11 notconnect 1 full 100 100BaseFX MM
在Cisco IOS軟體中設定EtherChannel的方式與CatOS中的設定方式截然不同。要在Cisco IOS軟體的一組埠上啟用EtherChannel,需要使用埠通道介面。如果所有條件對埠組都有效,則它們形成埠通道。預設情況下,所有介面都禁用埠通道化,即使介面具有交換機埠配置也是如此。
要將一組介面配置為EtherChannel的一部分,必須在每個介面下分別發出命令channel-group group-number mode channel-mode 。如果從組態中移除switchport命令,則所有與該交換器連線埠相關的命令不會再顯示於該組態中。但是,將連線埠重新設定為交換器連線埠會返回所有先前的命令。因此,將連線埠設定和取消設定為交換器連線埠不會清除連線埠通道組資訊。
建立通道組後,必須在埠通道介面上發出所有配置,而不是在單個物理埠上發出。在連線埠通道上發出的任何命令都會透明地傳播到所有實體連線埠。在通道成員的物理介面上發出的命令可從通道組中刪除該介面。
功能 | CatOS |
---|---|
建立通道 | CatOS (enable) set port channel 4/3-4 on Port(s) 4/3-4 are assigned to admin group 613. Port(s) 4/3-4 channel mode set to on. CatOS (enable) |
設定通道模式 | CatOS (enable) set port channel
mod/port mode {on | off | desirable |
auto} [silent | non-silent]
|
顯示埠通道狀態 | show port channel show port channel mod/port show port channel channel-group |
功能 | Cisco IOS軟體 |
---|---|
建立通道 | CiscoIOS# configure terminal Enter configuration commands, one per line. End with CNTL/Z. CiscoIOS(config)# interface port-channel 1 CiscoIOS(config-if)# exit CiscoIOS(config)# interface fastethernet 4/3 CiscoIOS(config-if)# channel-group 1 mode on CiscoIOS(config-if)# interface fastethernet 4/4 CiscoIOS(config-if)# channel-group 1 mode on CiscoIOS(config-if)# |
設定通道模式 | CiscoIOS(config-if)# channel-group
channel-group_number mode {on | auto
[non-silent] | desirable [non-silent]}
|
顯示埠通道狀態 | show etherchannel
show etherchannel channel-group
show interfaces etherchannel
show interfaces interface-type mod/port etherchannel |
show etherchannel命令具有各種子命令,以顯示有關連線埠通道組態的資訊。
show etherchannel channel-group summary命令會給出通道組配置中所有介面的狀態。此命令對於快速查詢應該屬於某個通道組的介面非常有用。
CiscoIOS# show etherchannel 256 summary Flags: U - in use I - in port-channel S - suspended D - down I - stand-alone d - default setting Group Port-channel Ports -----+------------+----------------------------------------------------------- 256 Po256(U) Fa5/5(I) Fa5/6(I) Fa5/7(I) Fa5/8(I)
show interfaces etherchannel命令會顯示與通道組關聯的每個介面,而不管通道狀態如何。
CiscoIOS# show interfaces etherchannel ---- GigabitEthernet1/1: Port state = EC-Enbld Up In-Bndl Usr-Config Channel group = 254 Mode = Automatic Gcchange = 0 Port-channel = Po254 GC = 0x00FE0001 Port indx = 0 Load = 0x55 Flags: S - Device is sending Slow hello. C - Device is in Consistent state. A - Device is in Auto mode. P - Device learns on physical port. Timers: H - Hello timer is running. Q - Quit timer is running. S - Switching timer is running. I - Interface timer is running. Local information: Hello Partner PAgP Learning Group Port Flags State Timers Interval Count Priority Method Ifindex Gi1/1 SAC U6/S7 Q 30s 1 128 Any 56 Partner's information: Partner Partner Partner Partner Group Port Name Device ID Port Age Flags Cap. Gi1/1 69055180(STELLA) 0010.7bbe.50bb 3/4 12s SC 2
您可以使用show interfaces interface-type mod/port etherchannel命令檢查特定介面的通道狀態,而無需滾動多個螢幕。
CiscoIOS# show interfaces fastethernet 5/5 etherchannel Port state = EC-Enbld Up Cnt-bndl Sngl-port-Bndl Cnt-Bndl Not-in-Bndl Usr-Config Channel group = 256 Mode = Automatic Gcchange = 1 Port-channel = null GC = 0x11000002 Port indx = 0 Load = 0x00 Flags: S - Device is sending Slow hello. C - Device is in Consistent state. A - Device is in Auto mode. P - Device learns on physical port. Timers: H - Hello timer is running. Q - Quit timer is running. S - Switching timer is running. I - Interface timer is running. Local information: Hello Partner PAgP Learning Group Port Flags State Timers Interval Count Priority Method Ifindex Fa5/5 SAC U6/S7 Q 30s 1 128 Any 0 Partner's information: Partner Partner Partner Partner Group Port Name Device ID Port Age Flags Cap. Fa5/5 066549452(SINGHA) 00d0.bb3a.c0d9 4/17 29s SC 2 Age of the port in the current state: 00h:30m:31s Probable reason: pm - different in oper mode (1) with Fa5/8(2)
show interfaces port-channel channel-group etherchannel命令會顯示連線埠通道中目前處於作用中成員的連線埠。
CiscoIOS# show interfaces port-channel 256 etherchannel Age of the Port-channel = 05h:52m:49s Logical slot/port = 13/64 Number of ports = 2 GC = 0x01000001 HotStandBy port = null Port state = Port-channel Ag-Inuse Ports in the Port-channel: Index Load Port EC state Configuration ------+------+------+-----------+-------------- 1 55 Fa5/7 auto user 0 AA Fa5/8 auto user Time since last port bundled: 00h:46m:51s Fa5/7 Time since last port Un-bundled: 00h:46m:54s Fa5/8
Cisco IOS軟體和CatOS之間VLAN的概念和功能是相同的。但是,這兩種實現之間的配置方法差異很大。set命令在CatOS中建立VLAN時,VLAN建立會通過Cisco IOS軟體中的VLAN資料庫配置模式進行。
功能 | CatOS |
---|---|
建立VLAN | CatOS (enable) set vlan 2 Vlan 2 configuration successful |
刪除VLAN | CatOS (enable) clear vlan 2 This command will deactivate all ports on vlan 2 Do you want to continue(y/n) [n]?y Vlan 2 deleted |
將埠分配給VLAN | CatOS (enable) set vlan 2 1/1 VLAN 2 modified. VLAN 10 modified. VLAN Mod/Ports ---- ----------------------- 2 1/1 |
檢視VLAN狀態 | show vlan |
功能 | Cisco IOS軟體 |
---|---|
建立VLAN | CiscoIOS# vlan database CiscoIOS(vlan)# vlan 2 VLAN 2 added: Name: VLAN0002 CiscoIOS(vlan)# exit APPLY completed. Exiting.... |
刪除VLAN | NativeIOS# vlan database CiscoIOS(vlan)# no vlan 2 Deleting VLAN 2... CiscoIOS(vlan)# exit APPLY completed. Exiting.... |
將埠分配給VLAN | CiscoIOS# configure terminal Enter configuration commands, one per line. End with CNTL/Z. CiscoIOS(config)# interface gigabitethernet2/2 CiscoIOS(config-if)# switchport CiscoIOS(config-if)# switchport access vlan 2 CiscoIOS(config-if)# ^Z CiscoIOS# |
檢視VLAN狀態 | show vlan |
要檢查VLAN的狀態,請使用show vlan命令。
Router# show vlan VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active 2 VLAN0002 active 10 VLAN0010 active 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 10 enet 100010 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 Primary Secondary Type Ports ------- --------- ----------------- ------------------------------------------
VTP是一種在VTP域中同步VLAN資料庫的L2協定。新增、刪除或修改同一個VTP域內的VLAN時,VTP會同步同一個VTP域內所有成員上的VLAN資料庫。VTP修剪通過減少不需要傳播的VLAN的不必要廣播和組播流量來最小化中繼上的流量。
在Cisco IOS軟體中,VLAN資料庫模式定義VTP配置。對VLAN資料庫和VTP的更改發生在VLAN資料的應用中。當使用者退出VLAN資料庫配置模式時會發生這種情況。預設Cisco IOS軟體VTP配置如下所示:
注意:預設VTP模式是Server。
CiscoIOS# show vtp status VTP Version : 2 Configuration Revision : 0 Maximum VLANs supported locally : 1005 Number of existing VLANs : 6 VTP Operating Mode : Server VTP Domain Name : null VTP Pruning Mode : Disabled VTP V2 Mode : Disabled VTP Traps Generation : Disabled MD5 digest : 0xE2 0x4F 0xC0 0xD6 0x94 0xBB 0x31 0x9A Configuration last modified by 0.0.0.0 at 6-27-01 02:04:20 Local updater ID is 0.0.0.0 (no valid interface found)
功能 | CatOS |
---|---|
配置VTP | CatOS (enable) set vtp domain cisco VTP domain cisco modified |
更改VTP模式 | CatOS (enable) set vtp mode client VTP domain cisco modified CatOS (enable) set vtp mode server VTP domain cisco modified CatOS (enable) set vtp mode transparent VTP domain cisco modified |
啟用VTP修剪 | CatOS (enable) set vtp pruning enable This command will enable the pruning function in the entire management domain. All devices in the management domain should be pruning-capable before enabling. Do you want to continue (y/n) [n]? y VTP domain cisco modified |
顯示VTP配置 | CatOS (enable) show vtp domain |
功能 | Cisco IOS軟體 |
---|---|
配置VTP | CiscoIOS# vlan database CiscoIOS(vlan)# vtp domain cisco Changing VTP domain name from null to cisco CiscoIOS(vlan)# exit APPLY completed. Exiting.... |
更改VTP模式 | CiscoIOS# vlan database CiscoIOS(vlan)# vtp client Setting device to VTP CLIENT mode. CiscoIOS(vlan)# vtp server Setting device to VTP SERVER mode. CiscoIOS(vlan)# vtp transparent Setting device to VTP TRANSPARENT mode. CiscoIOS(vlan)# exit APPLY completed. Exiting.... |
啟用VTP修剪 | CiscoIOS# vlan database CiscoIOS(vlan)# vtp pruning Pruning switched ON CiscoIOS(vlan)# exit APPLY completed. |
顯示VTP配置 | CiscoIOS# show vtp status |
下表簡要列出了CatOS命令以及等效於Cisco IOS軟體的命令。下表有助於快速參考從CatOS遷移到Cisco IOS軟體。該表是常用命令的縮寫清單。此表未列出每個命令的所有引數。請參閱Catalyst 6500系列Cisco IOS命令參考12.2SX以瞭解完整的命令語法和引數。
本節中的註釋提供了有關特定命令的幫助。註釋以斜體顯示。
CatOS指令 | Cisco IOS軟體命令 |
---|---|
clear vlan vlan | 無vlan 此命令是VLAN資料庫命令。 |
set cam agingtime | mac-address-table aging-time 此命令設定每個VLAN的MAC地址老化時間。 |
set cam set cam {static |永久} | mac-address-table static 所有靜態條目也是永久性的。 |
set errdisable-timeout interval | 錯誤停用復原間隔30-86400 此命令會設定錯誤停用復原時間。 |
set mls | mls 多層交換(MLS)在Cisco IOS軟體中透明執行。 |
set option errport | 錯誤停用復原原因 此命令可配置錯誤停用選項。 |
set port channel 預設模式為自動。 | channel-group group mode 預設模式為關閉。 |
set port duplex | 雙工 預設行為會有所不同,具體取決於線卡。 |
set port flowcontrol send [desired |關閉 |on ] | flowcontrol send [desired |關閉 |在] |
set port flowcontrol receive [desired |關閉 |on ] | flowcontrol receive [desired |關閉 |在] |
set port host | switchport switchport mode access spanning-tree portfast 接入埠自動關閉了通道/中繼。 |
set port negotiation mod/port disable | 快速非協商 僅在千兆埠上使用此命令。對10/100 Mbps埠使用速度和雙工命令。 |
set port negotiation mod/port enable | 無速度非協商 僅在千兆埠上使用此命令。對10/100 Mbps埠使用速度和雙工命令。 |
set port speed | 速度 預設行為會有所不同,具體取決於線卡。 |
設定qos | mls qos |
set span | 監控會話 |
set spantree | 生成樹 |
set system crossbar-fallback | service internal [no] fabric switching-mode allow [bus-only |已截斷] |
set test diaglevel | 診斷級別 這是啟動診斷級別。 |
set trace | debug 請謹慎使用此命令。有些調試是干擾性的。 |
set trunk 預設模式為自動。 | switchport mode trunk 預設模式為desirable。 |
set udld | udld 可以全域性配置此命令,也可以按介面配置。 |
set vlan | vlan switchport access vlan 此命令是VLAN資料庫命令。 該命令是介面命令,不會建立VLAN。 |
set vtp | vtp 此命令是VLAN資料庫命令。 |
show boot | show bootvar 此命令顯示引導引數。 |
show cam dynamic | show mac-address-table dynamic |
show channel info show port channel | show etherchannel summary |
show errordetection | show errdisable detect |
show errdisable-timeout | show errdisable recovery |
show port show mac | 顯示介面 |
顯示連線埠狀態 | 顯示介面狀態 |
show span | 顯示監視器 |
show sprom | show idprom 此命令有助於確定機箱序列號。 |
show system crossbar-fallback | show fabric switching-mode |
show test [diaglevel | mod] | show diagnostic [level | mod module] |
show qos | show mls qos |
顯示流量 | show catalyst6000 traffic-meter 此命令顯示底板利用率。 |
show trunk show port trunk | show interfaces trunk |
show udld | show udld |
show vlan | show vlan |
show vtp domain | show vtp status |
交換器主控台 | 遠端登入 此命令僅與思科技術支援結合使用,以進行特定故障排除。 |