本文爲本人自我學習中的一個小筆記,基於思科C2960S交換機的CiscoOS進行說明,bash
咱們經過show int <InterfaceID> ?
能夠看到思科CiscoOS下關於show int相關的分支指令參數,以下:網絡
show int Te1/0/1 ?
accounting Show interface accounting
capabilities Show interface capabilities information
controller Show interface status, configuration and controller status
counters Show interface counters
crb Show interface routing/bridging info
dampening Show interface dampening info
debounce Show interface debounce time info
description Show interface description
etherchannel Show interface etherchannel information
fair-queue Show interface Weighted Fair Queueing (WFQ) info
flowcontrol Show interface flowcontrol information
history Show interface history
human-readable show interfaces output with larger numbers separated by comma(s)
irb Show interface routing/bridging info
mac-accounting Show interface MAC accounting info
mpls-exp Show interface MPLS experimental accounting info
mtu Show interface mtu
precedence Show interface precedence accounting info
pruning Show interface trunk VTP pruning information
random-detect Show interface Weighted Random Early Detection (WRED) info
rate-limit Show interface rate-limit info
stats Show interface packets & octets, in & out, by switching path
status Show interface line status
summary Show interface summary
switchport Show interface switchport information
transceiver Show interface transceiver
trunk Show interface trunk information
users Show interface users
vlan Show interface vlan information
複製代碼
本文會對相關的指令進行詳細的說明,也做爲本身學習之用。app
該參數的字面意思就是關於端口的統計信息的,執行能夠看到詳細的端口發包統計等信息:運維
#show int Te1/0/1 accounting
TenGigabitEthernet1/0/1 to-1m001.38.a1-Ten2/0/6
Protocol Pkts In Chars In Pkts Out Chars Out
Other 0 0 337537 20252220
IP 0 0 423 25380
Spanning Tree 409526230 26189471208 3307 210476
CDP 187660 86135760 187602 95676192
VTP 0 0 1694001 317056348
DTP 337634 20258040 0 0
複製代碼
該參數的字面意思就是關於端口的基礎功能信息,執行能夠看到以下內容:dom
#show int Te1/0/1 capabilities
TenGigabitEthernet1/0/1
Model: WS-C2960X-48TD-L
Type: SFP-10GBase-SR
Speed: 10000
Duplex: full
Trunk encap. type: 802.1Q
Trunk mode: on,off,desirable,nonegotiate
Channel: yes
Broadcast suppression: percentage(0-100)
Flowcontrol: rx-(off,on,desired),tx-(none)
Fast Start: yes
QoS scheduling: rx-(not configurable on per port basis),
tx-(4q3t) (3t: Two configurable values and one fixed.)
CoS rewrite: yes
ToS rewrite: yes
UDLD: yes
Inline power: no
SPAN: source/destination
PortSecure: yes
Dot1x: yes
複製代碼
查看該參數的簡單說明可知該參數用於查看端口的狀態、配置信息、控制器狀態信息等等,執行後能夠看到以下信息:oop
#show int Te1/0/1 controller
========第一部分爲基礎的端口支持信息與吞吐狀態===============
TenGigabitEthernet1/0/1 is up, line protocol is up (connected)
Hardware is Ten Gigabit Ethernet, address is 00b1.e396.80b3 (bia 00b1.e396.80b3)
Description: to-1m001.38.a1-Ten2/0/6
MTU 1500 bytes, BW 10000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive not set
Full-duplex, 10Gb/s, link type is auto, media type is SFP-10GBase-SR
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:00, output 00:00:03, output hang never
Last clearing of "show interface" counters never
Input queue: 1/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 3914000 bits/sec, 702 packets/sec
5 minute output rate 428000 bits/sec, 425 packets/sec
4611038765 packets input, 3771532100116 bytes, 0 no buffer
Received 1468343724 broadcasts (1141826783 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 1141826783 multicast, 0 pause input
0 input packets with dribble condition detected
2928664842 packets output, 551035900656 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 pause output
0 output buffer failures, 0 output buffers swapped out
=============第二部分能夠看到各類frame information================
Transmit TenGigabitEthernet1/0/1 Receive
551035907320 Bytes 472997283569 Bytes
2832094542 Unicast frames 3142695075 Unicast frames
63022573 Multicast frames 1141826934 Multicast frames
33547798 Broadcast frames 326517004 Broadcast frames
0 Too old frames 133393091097 Unicast bytes
0 Deferred frames 283422550049 Multicast bytes
0 MTU exceeded frames 38340170718 Broadcast bytes
0 1 collision frames 0 Alignment errors
0 2 collision frames 0 FCS errors
0 3 collision frames 0 Oversize frames
0 4 collision frames 0 Undersize frames
0 5 collision frames 0 Collision fragments
0 6 collision frames
0 7 collision frames 143731049 Minimum size frames
0 8 collision frames 1358236658 65 to 127 byte frames
0 9 collision frames 296155758 128 to 255 byte frames
0 10 collision frames 409108096 256 to 511 byte frames
0 11 collision frames 104149904 512 to 1023 byte frames
0 12 collision frames 1610527067 1024 to 1518 byte frames
0 13 collision frames 0 Overrun frames
0 14 collision frames 0 Pause frames
0 15 collision frames
0 Excessive collisions 0 Symbol error frames
0 Late collisions 0 Invalid frames, too large
0 VLAN discard frames 689130481 Valid frames, too large
0 Excess defer frames 0 Invalid frames, too small
337624 64 byte frames 0 Valid frames, too small
2546538345 127 byte frames
86358050 255 byte frames 0 Too old frames
46879734 511 byte frames 0 Valid oversize frames
41025942 1023 byte frames 0 System FCS error frames
112730236 1518 byte frames 0 RxPortFifoFull drop frame
94794982 Too large frames
0 Good (1 coll) frames
0 Good (>1 coll) frames
複製代碼
該參數用於查看端口的Octets/cast等計數信息,執行後輸出以下:學習
#show int Te1/0/1 counters
Port InOctets InUcastPkts InMcastPkts InBcastPkts
Te1/0/1 3771619770692 3142771842 1141867922 326526848
Port OutOctets OutUcastPkts OutMcastPkts OutBcastPkts
Te1/0/1 551045411140 2832170002 63024035 33549199
複製代碼
這個參數就很簡單了,就是查看這個端口的對端鏈接的主機/交換機名和端口名,執行後輸出以下:優化
#show int Te1/0/1 crb
TenGigabitEthernet1/0/1 to-1m001.38.a1-Ten2/0/6
複製代碼
用於查看端口的IP事件抑制信息,因爲手頭的交換機暫時沒有配置相關設置,因此沒有輸出信息。該功能通常用於運營商網絡優化策略或者超大型IDC的網絡優化策略中,相關運行模式介紹以下:ui
當端口被人爲關閉或開啓,或者受外在因素影響端口狀態會發生轉變。當端口狀態發生翻動(持續up,down)時,路由協議會被告知有哪些路由受到影響。
在一個網絡中全部受到影響的設備須要從新計算最優路徑,在路由表中添加或者刪除路由,最後向鄰居通告有效路由。
過多的接口狀態變化會致使網絡設備消耗巨大的系統資源用於從新計算路徑,並且會形成路由協議與端口狀態不一樣步。
IP事件抑制機制引進可控的指數衰減機制來抑制端口過分翻動多所帶來的影響。
利用這個機制,網絡運維人員能夠配置路由器使之自動識別而且有針對性的抑制翻動的端口。
抑制一個翻動端口意味着將其移除網絡,路由協議在計算最優路徑時不會考慮該端口,也不會在該端口上創建鄰居。
當被抑制端口不在翻動,穩定時,該機制會取消懲罰,恢復這個端口在網絡中的地位。
使用 IP Event Dampening 的好處
1. 減小系統運行負擔
2. 更快的收斂速度
3. 網絡穩定性更高
使用 IP Event Dampening 的侷限性
1. 不追蹤子端口狀態(換而言之,只能在主端口上應用)
2. 不支持虛擬接入接口
3. 不支持IPX路由協議
以上內容參考自https://blog.csdn.net/ziyuanzhao/article/details/17757683
複製代碼
debounce參數主要也是用於網絡環境的穩定,簡單來講就是多個信號合併成一個穩定的型號,減小波動的影響。spa
用於查看端口的綜合描述信息,輸出相似於:
#show int Te1/0/1 description
Interface Status Protocol Description
Te1/0/1 up up to-1m001.38.a1-Ten2/0/6
複製代碼
用於查看端口的etherchannel參數。
用於查看端口的WFQ信息。
用於查看端口的流控信息,輸出內容以下:
#show int Te1/0/1 flowcontrol
Port Send FlowControl Receive FlowControl RxPause TxPause
admin oper admin oper
--------- -------- -------- -------- -------- ------- -------
Te1/0/1 Unsupp. Unsupp. off off 0 0
複製代碼
查看端口的history信息,包含以下的子參數:
#show int Te1/0/1 history ?
60min Display 60 minute histograms only
60sec Display 60 second histograms only
72hour Display 72 hour histograms only
all Display all three histogram intervals
both Display both input and output histograms
input Display input histograms only
output Display output histograms only
| Output modifiers
<cr>
複製代碼
使用易於人類閱讀的方式呈現端口狀態與計數,輸出內容以下:
#show int Te1/0/1 human-readable
TenGigabitEthernet1/0/1 is up, line protocol is up (connected)
Hardware is Ten Gigabit Ethernet, address is 00b1.e396.80b3 (bia 00b1.e396.80b3)
Description: to-1m001.38.a1-Ten2/0/6
MTU 1500 bytes, BW 10000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive not set
Full-duplex, 10Gb/s, link type is auto, media type is SFP-10GBase-SR
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:00, output 00:00:00, 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 3.97 mega-bits/sec , 677 pps
5 minute output rate 418.0 kilobits , 457 pps
4,618,294,969 packets input, 3,776,515,245,249 bytes, 0 no buffer
Received 1,471,134,116 broadcasts (1,143,876,593 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 1,143,876,593 multicast, 0 pause input
0 input packets with dribble condition detected
2,933,697,259 packets output, 552,450,663,378 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 pause output
0 output buffer failures, 0 output buffers swapped out
複製代碼
用於查看端口的鏈路和橋接信息,輸入信息以下:
#show int Te1/0/1 irb
TenGigabitEthernet1/0/1 to-1m001.38.a1-Ten2/0/6
複製代碼
查看端口的MAC統計信息。
查看端口的MPLS實驗統計信息。
查看端口的MTU(最大傳輸單元)設置信息,輸出內容以下:
#show int Te1/0/1 mtu
Port Name MTU
Te1/0/1 to-1m001.38.a1-Ten 1500
複製代碼
查看端口的precedence統計參數。
其實主要用於查看端口的vlan修飾請求和通訊請求信息。輸出大體以下,顯示能夠看到該端口被其餘端口所請求的vlan段信息。
#show int Te1/0/1 pruning
Port Vlans pruned for lack of request by neighbor
Te1/0/1 none
Port Vlan traffic requested of neighbor
Te1/0/1 1,101,201-202,670,702,705,801,888
複製代碼
用於顯示端口的界面加權隨機早期檢測(WRED)信息
顯示端口的速率限制信息
根據交換機路徑查看端口的各類發包數信息。
#show int Te1/0/1 stats
TenGigabitEthernet1/0/1
Switching path Pkts In Chars In Pkts Out Chars Out
Processor 0 0 2225842 442703098
Route cache 0 0 0 0
Total 0 0 2225842 442703098
複製代碼
查看端口的鏈接線材信息
#show int Te1/0/1 status
Port Name Status Vlan Duplex Speed Type
Te1/0/1 to-1m001.38.a1-Ten connected trunk full 10G SFP-10GBase-SR
#show int Te1/0/1 status err-disabled
Port Name Status Reason Err-disabled Vlans
Te1/0/1 to-1m001.38.a1-Ten connected none
#show int Te1/0/1 status inactive
Port Name Status Reason
Te1/0/1 to-1m001.38.a1-Ten connected none
複製代碼
用於查看端口的概況
#show int Te1/0/1 summary
*: interface is up
IHQ: pkts in input hold queue IQD: pkts dropped from input queue
OHQ: pkts in output hold queue OQD: pkts dropped from output queue
RXBS: rx rate (bits/sec) RXPS: rx rate (pkts/sec)
TXBS: tx rate (bits/sec) TXPS: tx rate (pkts/sec)
TRTL: throttle count
Interface IHQ IQD OHQ OQD RXBS RXPS TXBS TXPS TRTL
-----------------------------------------------------------------------------------------------------------------
* Te1/0/1 0 0 0 0 3361000 625 373000 372 0
複製代碼
查看接口的交換機端口信息。輸出內容以下:
#show int Te1/0/1 switchport
Name: Te1/0/1
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
複製代碼
重要參數!用於查看端口的光衰信息等模塊狀態信息,用於判斷鏈路的鏈接狀態和光模塊運做狀態,在如今交換機端口檢測中很重要。 detail用於查看光衰減dBm信息,properties用於查看總體簡要配置信息。
#show int Te1/0/1 transceiver detail
ITU Channel not available (Wavelength not available),
Transceiver is internally calibrated.
mA: milliamperes, dBm: decibels (milliwatts), NA or N/A: not applicable.
++ : high alarm, + : high warning, - : low warning, -- : low alarm.
A2D readouts (if they differ), are reported in parentheses.
The threshold values are calibrated.
High Alarm High Warn Low Warn Low Alarm
Temperature Threshold Threshold Threshold Threshold
Port (Celsius) (Celsius) (Celsius) (Celsius) (Celsius)
--------- ------------------ ---------- --------- --------- ---------
Te1/0/1 29.4 75.0 70.0 0.0 -5.0
High Alarm High Warn Low Warn Low Alarm
Voltage Threshold Threshold Threshold Threshold
Port (Volts) (Volts) (Volts) (Volts) (Volts)
--------- --------------- ---------- --------- --------- ---------
Te1/0/1 3.33 3.63 3.46 3.13 2.97
Optical High Alarm High Warn Low Warn Low Alarm
Transmit Power Threshold Threshold Threshold Threshold
Port (dBm) (dBm) (dBm) (dBm) (dBm)
--------- ----------------- ---------- --------- --------- ---------
Te1/0/1 -2.2 1.7 -1.3 -7.3 -11.3
Optical High Alarm High Warn Low Warn Low Alarm
Receive Power Threshold Threshold Threshold Threshold
Port (dBm) (dBm) (dBm) (dBm) (dBm)
------- ----------------- ---------- --------- --------- ---------
Te1/0/1 -3.4 2.0 -1.0 -9.9 -13.9
#show int Te1/0/1 transceiver properties
ITU Channel not available (Wavelength not available),
Transceiver is internally calibrated.
Name : Te1/0/1
Administrative Speed: 10000
Administrative Duplex: full
Administrative Auto-MDIX: on
Administrative Power Inline: N/A
Operational Speed: 10000
Operational Duplex: full
Operational Auto-MDIX: off
Media Type: SFP-10GBase-SR
複製代碼
用於查看端口的trunk配置信息和相關的multi-vlan信息。
#show int Te1/0/1 trunk
Port Mode Encapsulation Status Native vlan
Te1/0/1 on 802.1q trunking 1
Port Vlans allowed on trunk
Te1/0/1 1-4094
Port Vlans allowed and active in management domain
Te1/0/1 1-5,101-105,111-113,201-205,300,411-414,420,430,440,450,460,601-606,610,620,630,640,650,660,670-672,680,701-707,710-711,720,730,740,750,760,770-778,801-802,810,888,901-910,1001
Port Vlans in spanning tree forwarding state and not pruned
Te1/0/1 1-5,101-105,111-113,201-205,300,411-414,420,430,440,450,460,601-606,610,620,630,640,650,660,670-672,680,701-707,710-711,720,730,740,750,760,770-778,801-802,810,888,901-910,1001
複製代碼
用於查看當前接口的user信息。
使用vlan mapping
指令查看接口的vlan mapping信息。