After you log into a Cisco switch, you can verify the switch software and hardware status by using several commands that you execute from privileged EXEC mode. These commands include the show interfaces, show version, and show running-config commands. Here is a look at each of these commands in more detail.
登入 Cisco 交換器後,你可以在特權 EXEC 模式下執行多個指令,以驗證交換器的軟體與硬體狀態。這些指令包括 show interfaces、show version 與 show running-config。以下逐一詳細介紹這些指令。
Switch show interfaces Command
交換器 show interfaces 指令
The show interfaces command displays the status and statistical information for the network interfaces of the switch. The resulting output varies, depending on the network for which a particular interface has been configured. You usually enter this command with the options type and slot/number. The type option allows values such as FastEthernet and GigabitEthernet. The slot/number option indicates the slot number and the port number on the selected interface (for example, fa0/1).
show interfaces 指令會顯示交換器網路介面的狀態與統計資訊。輸出結果會因特定介面所設定的網路而有所不同。你通常會搭配 type 與 slot/number 選項來輸入此指令。type 選項可接受 FastEthernet、GigabitEthernet 等數值;slot/number 選項則指出所選介面的插槽編號與連接埠編號(例如 fa0/1)。
The table shows some of the fields in the example display that you will find useful for verifying fundamental switch details:
下表列出範例輸出中一些有助於驗證交換器基本詳細資訊的欄位:
Fundamental Switch Details
交換器基本詳細資訊
Output 輸出 | Description 說明 |
FastEthernet0/1 is up, line protocol is up (connected) FastEthernet0/1 is up, line protocol is up (connected) | Indicates the status of the interface. The first part is the hardware status, and the second part is the line protocol. The hardware status is the status of the OSI physical layer, and the line protocol is the status of the OSI data link layer; together, the two are the status of the TCP/IP link layer. In this example, the entire link layer is active and ready; In other words, the interface can send and receive frames. This state is referred to as "up/up." Note that if the hardware is down, the line protocol will also be down. 表示介面的狀態。第一部分為硬體狀態,第二部分為線路協定狀態。硬體狀態是 OSI 實體層的狀態,線路協定則是 OSI 資料鏈結層的狀態;兩者合併即為 TCP/IP 鏈結層的狀態。在此範例中,整個鏈結層皆為作用中且就緒;換句話說,該介面可以收發框架。此狀態稱為「up/up」。請注意,若硬體狀態為 down,線路協定也會顯示為 down。 |
Hardware is Fast Ethernet, address is 001e.147c.bd01 Hardware is Fast Ethernet, address is 001e.147c.bd01 | Indicates the MAC address of the interface. 表示該介面的 MAC 位址。 |
Full-duplex, 100 Mbps Full-duplex, 100 Mbps | Shows the type and mode of connection. Other possibilities include half-duplex and 10 Mbps. 顯示連線的類型與模式,其他可能的值包括半雙工與 10 Mbps。 |
5-minute input rate, 31,000 bps 5-minute input rate, 31,000 bps | Reports interface traffic statistics for average input rate. 回報介面流量統計中的平均輸入速率。 |
Switch show version Command
交換器 show version 指令
You can use the show version Cisco IOS command in privileged EXEC mode to verify the Cisco IOS Software version and release numbers of the Cisco IOS Software that is running on a Cisco switch.
你可以在特權 EXEC 模式下使用 show version 這個 Cisco IOS 指令,以驗證 Cisco 交換器上執行的 Cisco IOS 軟體版本與發行編號。
The following table describes some of the output fields of the show version command:
下表說明 show version 指令輸出的部分欄位:
Output Fields from the show version Command
show version 指令的輸出欄位
Output 輸出 | Description 說明 |
Cisco IOS Software version Cisco IOS 軟體版本 | Identification of the software by name and version number Always specify the complete version number when reporting a possible software problem. In this example, the switch is running Cisco IOS Release 15.0(1)SE3. 以名稱與版本號識別軟體。回報可能的軟體問題時,務必提供完整的版本號。在此範例中,交換器執行的是 Cisco IOS Release 15.0(1)SE3。 |
Switch uptime 交換器運作時間 | Current days and time since the system was last booted In this example, the switch uptime is 15 hours and 30 minutes. 系統自上次開機以來經過的天數與時間。在此範例中,交換器的運作時間為 15 小時 30 分鐘。 |
System image file 系統映像檔 | System image name and file location (local or remote filesystem) 系統映像檔名稱與檔案位置(本地或遠端檔案系統) |
Switch platform 交換器平台 | Hardware platform information, including revision and amount of RAM 硬體平台資訊,包括版本與 RAM 容量 |
Processor board ID 處理器板卡 ID | Device serial number 裝置序號 |
Switch show running-config Command
交換器 show running-config 指令
The show running-config command displays the current running (active) configuration file of the switch. This command requires privileged EXEC mode access. This command displays the IPv4 address, subnet mask, and default gateway settings, if they are configured:
show running-config 指令會顯示交換器目前執行中(active)的設定檔。此指令需要特權 EXEC 模式的存取權限。若已設定,此指令會顯示 IPv4 位址、子網路遮罩與預設閘道設定: