端口通道上的输入数据包丢弃

网络工程 思科 故障排除
2022-02-16 13:17:53

我在我的端口通道接口上以 3gbps 的捆绑速度丢弃了一定数量的数据包,在带有 Sup 720 的 Cisco 6500 上。在我清除计数器后,您可以在一分钟内看到丢弃的数据包数量。

我想知道为什么数据包在被丢弃之前根本不进入队列。请帮我解决队列丢失的问题。

将另一个接口添加到捆绑解决方案中是否有助于减少丢包?

CORESW01#show interfaces port-channel 50                      
Port-channel50 is up, line protocol is up (connected)
  Hardware is EtherChannel, address is XXXXXXXXXX (bia XXXXXXXX)
  Description: [***Etherchannel Connected to DELL-ENCLOSURE-B1 Ports 17,18,19,20***]
  MTU 1500 bytes, BW 3000000 Kbit, DLY 10 usec, 
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive set (10 sec)
  Full-duplex, 1000Mb/s
  input flow-control is off, output flow-control is off
  Members in this channel: Gi2/33 Gi2/34 Gi2/35 
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input never, output never, output hang never
  Last clearing of "show interface" counters 17:30:41
  --THIS LINE--> Input queue: 0/2000/73599/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)
  5 minute input rate 7422000 bits/sec, 1105 packets/sec
  5 minute output rate 6306000 bits/sec, 1329 packets/sec
     77713779 packets input, 87465246992 bytes, 0 no buffer
     Received 530784 broadcasts (258881 multicasts)
     0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 5 overrun, 0 ignored
     0 watchdog, 0 multicast, 0 pause input
     0 input packets with dribble condition detected
     46002614 packets output, 24633769164 bytes, 0 underruns
     0 output errors, 0 collisions, 0 interface resets
     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

11-18-2016

CORESW01#show interfaces gigabitEthernet 2/33  
GigabitEthernet2/33 is up, line protocol is up (connected)  
  Hardware is C6k 1000Mb 802.3, address is XX  
  Description: [***Uplink Connected to DELL-ENCL1-B2***]  
  MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,   
     reliability 255/255, txload 2/255, rxload 1/255  
  Encapsulation ARPA, loopback not set  
  Keepalive set (10 sec)  
  Full-duplex, 1000Mb/s  
  input flow-control is off, output flow-control is off  
  Clock mode is auto  
  ARP type: ARPA, ARP Timeout 04:00:00  
  Last input never, output 00:00:29, output hang never   
  Last clearing of "show interface" counters 04:47:46  
  Input queue: 0/2000/359/0 (size/max/drops/flushes); Total output drops: 0  
  Queueing strategy: fifo  
  Output queue: 0/40 (size/max)  
  5 minute input rate 3744000 bits/sec, 820 packets/sec  
  5 minute output rate 10958000 bits/sec, 1649 packets/sec  
     7916371 packets input, 4017248800 bytes, 0 no buffer  
     Received 32074 broadcasts (24595 multicasts)  
     0 runts, 0 giants, 0 throttles  
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored  
     0 watchdog, 0 multicast, 0 pause input  
     0 input packets with dribble condition detected  
     13081762 packets output, 4307087164 bytes, 0 underruns  
     0 output errors, 0 collisions, 0 interface resets  
     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  

CORESW01#show interfaces gigabitEthernet 2/34  
GigabitEthernet2/34 is up, line protocol is up (connected)  
  Hardware is C6k 1000Mb 802.3, address is XX  
  Description: [***Uplink Connected to DELL-ENCL1-B2***]  
  MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,   
     reliability 255/255, txload 1/255, rxload 1/255  
  Encapsulation ARPA, loopback not set  
  Keepalive set (10 sec)  
  Full-duplex, 1000Mb/s  
  input flow-control is off, output flow-control is off  
  Clock mode is auto   
  ARP type: ARPA, ARP Timeout 04:00:00  
  Last input never, output 00:00:36, output hang never  
  Last clearing of "show interface" counters 04:47:49  
  Input queue: 0/2000/136/0 (size/max/drops/flushes); Total output drops: 0  
  Queueing strategy: fifo  
  Output queue: 0/40 (size/max)    
  5 minute input rate 6338000 bits/sec, 647 packets/sec  
  5 minute output rate 821000 bits/sec, 298 packets/sec  
     7605420 packets input, 6914668706 bytes, 0 no buffer  
     Received 79343 broadcasts (26075 multicasts)  
     0 runts, 0 giants, 0 throttles  
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored  
     0 watchdog, 0 multicast, 0 pause input  
     0 input packets with dribble condition detected  
     11489585 packets output, 5625019559 bytes, 0 underruns  
     0 output errors, 0 collisions, 0 interface resets  
     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  

CORESW01#show interfaces gigabitEthernet 2/35  
GigabitEthernet2/35 is up, line protocol is up (connected)  
  Hardware is C6k 1000Mb 802.3, address is XX  
  Description: [***Uplink Connected to DELL-ENCL1-B2***]  
  MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,   
     reliability 255/255, txload 1/255, rxload 1/255  
  Encapsulation ARPA, loopback not set  
  Keepalive set (10 sec)  
  Full-duplex, 1000Mb/s  
  input flow-control is off, output flow-control is off  
  Clock mode is auto  
  ARP type: ARPA, ARP Timeout 04:00:00  
  Last input never, output 00:00:44, output hang never  
  Last clearing of "show interface" counters 04:48:08  
  Input queue: 0/2000/193/0 (size/max/drops/flushes); Total output drops: 0  
  Queueing strategy: fifo 
  Output queue: 0/40 (size/max)  
  5 minute input rate 4163000 bits/sec, 515 packets/sec  
  5 minute output rate 2445000 bits/sec, 373 packets/sec  
     25776481 packets input, 32767081104 bytes, 0 no buffer  
     Received 37253 broadcasts (29829 multicasts) 
     0 runts, 0 giants, 0 throttles  
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored  
     0 watchdog, 0 multicast, 0 pause input  
     0 input packets with dribble condition detected  
     14263612 packets output, 13067998250 bytes, 0 underruns  
     0 output errors, 0 collisions, 0 interface resets  
     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  



CORESW01#show module   
Mod Ports Card Type                              Model              Serial No.  
--- ----- -------------------------------------- ------------------ -----------
  1   24  CEF720 24 port 1000mb SFP              WS-X6724-SFP       XX  
  2   48  48-port 10/100/1000 RJ45 EtherModule   WS-X6148A-GE-45AF  Xx  
  5    2  Supervisor Engine 720 (Active)         WS-SUP720-3B       SX  

Mod MAC addresses                       Hw    Fw           Sw           Status  
--- ---------------------------------- ------ ------------ ------------ -------
  1  0016.XXXX.7ad6 to 0016.XXXX.7aed   2.3   12.2(14r)S5  12.2(18)SXF3 Ok  
  2  0016.XXXX.f2e0 to 0016.XXXX.f30f   2.0   8.4(1)       8.5(0.46)RFW Ok  
  5  0014.XXXX.d988 to 0014.XXXX.d98b   4.5   8.1(3)       12.2(18)SXF3 Ok  

Mod  Sub-Module                  Model              Serial       Hw     Status   
---- --------------------------- ------------------ ----------- ------- -------
  1  Centralized Forwarding Card WS-F6700-CFC       XX  2.0    Ok  
  2  IEEE Voice Daughter Card    WS-F6K-48-AF       XX  2.0    Ok  
  5  Policy Feature Card 3       WS-F6K-PFC3B       XX  2.2    Ok  
  5  MSFC3 Daughterboard         WS-SUP720          XX  2.4    Ok  

Mod  Online Diag Status   
---- -------------------
  1  Pass  
  2  Pass  
  5  Pass  
CORE-SW01#


Group: 50  
---------- 
                Port-channels in the group:    
        ----------------------

Port-channel: Po50    (Primary Aggregator)  

------------

Age of the Port-channel   = 389d:22h:28m:24s  
Logical slot/port   = 14/2          Number of ports = 3  
Port state          = Port-channel Ag-Inuse   
Protocol            =   LACP  

Ports in the Port-channel:   

Index   Load   Port     EC state        No of bits 
------+------+------+------------------+----------- 
  0     49     Gi2/33   Active    3  
  1     92     Gi2/34   Active    3  
  2     24     Gi2/35   Active    2  

Time since last port bundled:    389d:22h:27m:19s    Gi2/35  

由于我没有看到队列计数跳跃,我认为这可能是因为流量激增。

1个回答

如果您的设备无法足够快地为输入队列提供服务,您会收到大量的输入丢失。这可能有很多原因。例如,导致进程切换的路由策略或其他服务会减慢您的 CPU 并增加输入丢弃的数量。

Cisco 有一个文档,输入队列丢弃和输出队列丢弃故障排除,其中讨论了这个问题:

输入队列丢弃

当数据包进入路由器时,路由器会尝试在中断级别转发它。如果在适当的缓存表中找不到匹配项,则数据包将在传入接口的输入队列中排队等待处理。一些数据包总是被处理,但在适当的配置和稳定的网络中,处理数据包的速率决不能阻塞输入队列。如果输入队列已满,则丢弃数据包。

这是一个示例输出:

router#show interfaces ethernet 0/0 
...
Input queue: 30/75/187/0 (size/max/drops/flushes); Total output drops: 0 
Output queue :0/40 (size/max)...

在此示例输出中,无法准确查看哪些数据包已被丢弃。为了排除输入队列丢弃故障,您必须找出哪些数据包填满了输入队列。在此示例中,当发出show interfaces ethernet 0/0命令时,接口 ethernet0/0 的输入队列中有 30 个数据包。队列深度为 75 个数据包,自上次清除接口计数器以来已丢弃 187 个数据包。

如果分配给接口的数据包缓冲区的数量用尽或达到其最大阈值,系统将计算输入队列丢弃数。您可以使用hold-queue增加最大队列值 每个接口的命令(队列长度值可以在 0 到 4096 之间。默认值为 75)。

注意:共享内存路由器(1600、2500 和 4000 系列)也将输入队列用于快速交换流量。如果您在这些平台上收到输入队列丢弃,请确保所有流量都使用可用的最佳交换路径(请参阅性能调优基础知识)。输入队列丢弃通常发生在数据包进行进程交换时。进程切换意味着路由器无法使用更可取的路由缓存方法(例如快速切换或 Cisco 快速转发 (CEF))来处理转发决策。如果仍然存在输入丢失,则表明流量过多。考虑硬件升级,或尝试减少流量负载。

这些是输入队列丢弃计数器的条件。它们通常发生在路由器接收突发流量并且无法处理所有数据包时。

  • 接口 PHY 和接口 DMA 可访问的 Rx FIFO 已满,在这种情况下到达的任何新帧都将被
    丢弃(通常称为溢出),并且 rx_overflow 计数器
    (通过show controller interface-id看到)将
    递增。当 rx_overflow 计数器加 1 时,
    表示溢出条件已经发生过一次,并不
    表示丢帧的数量。
  • 接口 DMA 和接口驱动程序代码可访问的 Rx 环已满。来自 DMA 的任何新帧传输都无法
    在这种情况下继续进行,因为在 Rx 环中没有空闲条目,
    因此发送的帧被丢弃(称为溢出
    情况)。rx_int_drop 计数器(通过show controller interface-id看到)也加一。同样,如果 rx_int_drop 增加 1,则表示发生了一次
    溢出情况,并且不知道丢弃的帧数。

输入保持队列大小可以从默认的 75 个数据包增加。保持队列存储从网络接收的等待发送到客户端的数据包。Cisco 建议异步接口上的队列大小不要超过十个数据包。对于大多数其他接口,队列长度不得超过 100。输入保持队列可防止单个接口用过多的输入数据包淹没网络服务器。如果接口在系统中有太多未完成的输入数据包,则会丢弃进一步的输入数据包。

Router(conf-if)# hold-queue length in

对于 Catalyst 交换机,思科建议对设备上的所有 L3 接口进行此调整,包括物理接口和 VLAN 接口。使用switchport命令配置的 L2 端口可以保留默认值。

注意:应用此命令后,您需要清除接口计数器,然后监控网络。

警告:保持队列的增加会对网络路由和响应时间产生不利影响。对于使用 SEQ/ACK 数据包来确定往返时间的协议,不要增加输出队列。相反,丢弃数据包会通知主机减慢传输速度以匹配可用带宽。这通常比网络内相同数据包的复制副本要好,这可能发生在大型保留队列中。