交换机端口丢包

3850 trunk接口下有大量丢包

使用命令show int t1/1/1和show int t1/1/1 controller以及show int counters error查看相关信息

  1. total output drops:丢包数为6882754
  2. Excess Defer frames: 6882754

说明丢包的帧都是Excess Defer frames

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
SDC-E01-C3850-01#show int t1/1/1 controller
TenGigabitEthernet1/1/1 is up, line protocol is up (connected)
Hardware is Ten Gigabit Ethernet, address is 0c11.67b8.0635 (bia 0c11.67b8.0635)
Description: To IDX-VCO-P-JWIDXRF0502606&&Boeing
MTU 9198 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive not set
Full-duplex, 1000Mb/s, link type is auto, media type is 1000BaseSX SFP
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:00, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 6882754
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 215000 bits/sec, 124 packets/sec
5 minute output rate 2069000 bits/sec, 238 packets/sec
448781344 packets input, 103583916744 bytes, 0 no buffer
Received 6262901 broadcasts (6241876 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 6241876 multicast, 0 pause input
0 input packets with dribble condition detected
1083907813 packets output, 1269540548698 bytes, 0 underruns
0 output errors, 0 collisions, 2 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
Transmit TenGigabitEthernet1/1/1 Receive
1269540548698 Total bytes 103583916744 Total bytes
1080436550 Unicast frames 442518443 Unicast frames
1269248250406 Unicast bytes 103077478553 Unicast bytes
2411364 Multicast frames 6241876 Multicast frames
214954128 Multicast bytes 504600197 Multicast bytes
1059899 Broadcast frames 21025 Broadcast frames
77344164 Broadcast bytes 1837994 Broadcast bytes
21556908 Minimum size frames 756073 Minimum size frames
94757793 65 to 127 byte frames 364340783 65 to 127 byte frames
69082138 128 to 255 byte frames 16989391 128 to 255 byte frames
16000442 256 to 511 byte frames 12693888 256 to 511 byte frames
22739718 512 to 1023 byte frames 8736837 512 to 1023 byte frames
859770812 1024 to 1518 byte frames 45264370 1024 to 1518 byte frames
2 1519 to 2047 byte frames 2 1519 to 2047 byte frames
0 2048 to 4095 byte frames 0 2048 to 4095 byte frames
0 4096 to 8191 byte frames 0 4096 to 8191 byte frames
0 8192 to 16383 byte frames 0 8192 to 16383 byte frames
0 16384 to 32767 byte frame 0 16384 to 32767 byte frame
0 > 32768 byte frames 0 > 32768 byte frames
0 Late collision frames 0 SymbolErr frames
6882754 Excess Defer frames 0 Collision fragments
0 Good (1 coll) frames 0 ValidUnderSize frames
0 Good (>1 coll) frames 0 InvalidOverSize frames
0 Deferred frames 0 ValidOverSize frames
0 Gold frames dropped 0 FcsErr frames
LAST UPDATE 1980 msecs AGO
SDC-E01-C3850-01#

初步分析

由于原来只承载了3个VLAN的流量,但是后来增加了3个VLAN的流量. 有可能突增流量超过了端口的缓冲区,导致端口产生出方向的丢包.

  1. Out-Discard
    说明:选择的出局信息包的数量被丢弃,即使未发现错误。常见原因:之所以丢弃此类数据包,一个可能的原因是为了释放缓冲区空间。
  2. Total output drops

因输出队列已满而被丢弃的数据包数量.此的常见原因也许是从换成一条更低的带宽链路的一条高带宽链路从换成单个outbound链路的多条入站链路的数据流或数据流.例如,如果很多突发数据流在千兆接口进来和换成100Mbps接口,这在100Mbps接口也许造成输出下落增加.这是因为入站和出站带宽的速度不匹配,导致接口的输出队列被过量数据流淹没.

进一步分析

使用命令show controllers t1/1/1 utilization可以查看当前端口出方向和入方向的带宽利用率.

1
2
3
SDC-E01-C3850-01#sh controllers tenGigabitEthernet 1/1/1 utilization
Receive Bandwidth Percentage Utilization : 0
Transmit Bandwidth Percentage Utilization : 1

解决方法

  1. 增加端口的带宽,这样缓冲区也会增加,不会让出方向的缓冲区溢出
  2. 减少该端口的流量进行分流

参考链接

https://www.fir3net.com/Switches/Cisco/troubleshooting-interface-drops-on-a-cisco-switch.html
https://www.cisco.com/c/en/us/support/docs/switches/catalyst-3850-series-switches/200594-Catalyst-3850-Troubleshooting-Output-dr.html?dtid=osscdc000283