When you have completed the router interface configuration, you can verify the configuration using various show commands.
完成路由器介面設定後,您可以使用各種 show 指令來驗證設定。
The following examples show sample outputs from the presented commands.
以下範例顯示上述指令的範例輸出。
RouterY# show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.1.1.1 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/0/0 unassigned YES unset administratively down down
Serial0/0/1 unassigned YES unset up up
Serial0/1/0 unassigned YES unset up up
Serial0/1/1 unassigned YES unset administratively down downThe following table shows the output fields and their meanings.
下表列出輸出欄位及其意義。
Output Field 輸出欄位 | Description 說明 |
Interface Interface | Type of specific interface 特定介面的類型 |
IP Address IP Address | IPv4 address that is assigned to the interface. 指派給該介面的 IPv4 位址。 |
OK? OK? | "Yes" means that the IPv4 address is valid; "No" means that the IPv4 address is invalid. 「Yes」表示 IPv4 位址有效;「No」表示 IPv4 位址無效。 |
Method Method | Describes how the IPv4 address was obtained or configured. 說明 IPv4 位址的取得方式或設定方式。 |
Status Status | Indicates the physical layer status of the interface. 顯示介面的實體層狀態。 |
Protocol Protocol | Indicates the data link layer status of the interface. 顯示介面的資料鏈結層狀態。 |
R2# show protocols Ethernet 0/0
Ethernet0/0 is up, line protocol is up
Internet address is 10.10.2.1/24RouterX# show interfaces
GigabitEthernet0/0 is up, line protocol is up
Hardware is CN Gigabit Ethernet, address is f866.f231.7250 (bia f866.f231.7250)
Description: Link to ISP
Internet address is 192.168.2.1/24
MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full Duplex, 100Mbps, media type is RJ45
output flow-control is unsupported, input flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:53, output 00:00:09, 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 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
<... output omitted ...>The table shows some of the output fields for a Gigabit Ethernet interface and their meanings in this example.
下表以此範例中的 Gigabit Ethernet 介面為例,列出部分輸出欄位及其意義。
Output 輸出 | Description 說明 |
GigabitEthernet...is {up | down | administratively down} Line protocol is {up | down} GigabitEthernet...is {up | down | administratively down} Line protocol is {up | down} | Indicates whether the interface hardware is currently active, down, or if an administrator has taken it down. Please refer to the Troubleshooting Status Codes table for an explanation of all the combinations of these two statuses. 指出介面硬體目前是啟用中、關閉,或已被管理者關閉。請參閱疑難排解狀態代碼表,了解這兩種狀態所有組合的說明。 |
Hardware Hardware | Displays the hardware type and MAC address. 顯示硬體類型與 MAC 位址。 |
Description Description | Displays the configured interface description. 顯示已設定的介面描述。 |
Internet address Internet address | Displays the IPv4 address followed by the prefix length (subnet mask). 顯示 IPv4 位址及其後的前綴長度(子網路遮罩)。 |
MTU MTU | Displays the maximum transmission unit (MTU) of the interface. 顯示介面的最大傳輸單元(MTU)。 |
BW BW | Shows the bandwidth of the interface in kilobits per second. The bandwidth parameter is used to compute routing protocol metrics and other calculations. 以每秒千位元顯示介面的頻寬。頻寬參數用於計算路由協定度量值及其他運算。 |
DLY DLY | Shows the delay of the interface in microseconds. This parameter is used to compute routing protocol metrics and other calculations. 以微秒顯示介面的延遲。此參數用於計算路由協定度量值及其他運算。 |
Rely Rely | Displays the reliability of the interface as a fraction of 255 (255/255 is 100% reliability). This parameter is used to compute routing protocol metrics and other calculations. 以 255 為基準顯示介面的可靠性(255/255 表示 100% 可靠)。此參數用於計算路由協定度量值及其他運算。 |
Load Load | Displays the load on the interface as a fraction of 255 (255/255 is completely saturated). This parameter is used to compute routing protocol metrics and other calculations. 以 255 為基準顯示介面的負載(255/255 表示已完全飽和)。此參數用於計算路由協定度量值及其他運算。 |
Encapsulation Encapsulation | Shows the encapsulation method that is used on the interface. 顯示該介面所使用的封裝方式。 |
5-minute input rate, 5-minute output rate 5-minute input rate, 5-minute output rate | Shows the average number of bits and packets that the interface transmitted per second in the last 5 minutes. 顯示過去 5 分鐘內該介面每秒傳輸的平均位元數與封包數。 |
Each of the command outputs shown in the previous examples lists two interface status codes. For a router to use an interface, the two interface status codes on the interface must be in the up state. The first status code refers to whether the physical layer (Layer 1) is working, and the second status code mainly (but not always) refers to whether the data link layer (Layer 2) protocol is working.
先前範例中每個指令輸出都列出兩個介面狀態代碼。路由器要使用某個介面,該介面上的兩個狀態代碼都必須是啟用(up)狀態。第一個狀態代碼指出實體層(第 1 層)是否運作正常,第二個狀態代碼主要(但不一定)指出資料鏈結層(第 2 層)通訊協定是否運作正常。
Four combinations of settings exist for the status codes when troubleshooting a network. The following table lists the four combinations and an explanation of the typical reasons why an interface would be in this state. As you review the list, note that if the hardware status (the first status code) is not "up," the second will always be "down" because the data link layer functions cannot work if the physical layer has a problem.
在排除網路問題時,狀態代碼共有四種設定組合。下表列出這四種組合,以及介面處於該狀態的常見原因說明。檢視此清單時請注意,若硬體狀態(第一個狀態代碼)不是「up」,第二個狀態一定會是「down」,因為若實體層有問題,資料鏈結層的功能就無法運作。