如何诊断本地NIC(有线)丢包?


2

我的板载Realtek RTL8168B / 8111B系列千兆以太网正在丢失数据包(在ping局域网上的任何其他设备时约为8%)。

Windows事件日志中没有与TCPIP / ICMP或帧错误相关的事件。我使用Windows性能监视器工具来观察“网络接口”类别下的事件,希望看到丢包的一些症状。我找不到任何东西

任何人都可以想到任何方式“看到”数据包丢失作为诊断条件,而不是做ping并观看响应不回来?如果我能在Windows中找到丢包的地方(crc错误,校验和错误,碎片问题等),也许我可以诊断它。


这是一台新机器,我认为问题在于驱动程序中的一些配置选项:

  • 速度和双工:自动谈判
  • 流量控制:禁用
  • 接收缓冲区:512
  • 发送缓冲区:128

  • 中断审核:已启用

  • 接收侧缩放:已启用
  • 优先级和VLAN已启用:优先级和VLAN已启用

  • 自动禁用千兆(PowerSaving):已禁用

  • 自动禁用PCIe(省电):已禁用
  • 自动禁用PHY(省电):禁用
  • 绿色以太网:已禁用

  • Shutdown Wake-On-Lan:已启用

  • 睡眠WOL省电:禁用

  • IPv4校验和卸载:启用Rx和Tx

  • TCP Checksum Offload(IPv):启用Rx和Tx
  • TCP校验和卸载(IPv6):Rx和Tx已启用
  • UDP校验和卸载(IPv):启用Rx和Tx
  • UDP校验和卸载(IPv6):Rx和Tx已启用
  • 巨型帧:已禁用
  • 大发送卸载(IPv4):已启用
  • Large Send Offload v2(IPv4):已禁用
  • Large Send Offload v2(IPv6):已启用

我试图将Speed&Duplex强制转换为100 Mbps全双工(无论如何都是这样)但没有成功。

Answers:


4

Realtek为网络接口卡提供网络诊断实用程序 - 在Software Drivers&Utilities中查找“Windows Diagnostic Program”链接。Realtek以太网诊断软件的软件有一些屏幕截图。

Microsoft Windows附带的netstat命令提供了一些有限的信息。一个netstat -s命令将提供错误的一些附加信息。例如,关于碎片问题的可能性,存在“数据报失败碎片”计数。

C:\>netstat -s

IPv4 Statistics

  Packets Received                   = 265412964
  Received Header Errors             = 0
  Received Address Errors            = 5987902
  Datagrams Forwarded                = 0
  Unknown Protocols Received         = 2
  Received Packets Discarded         = 571613
  Received Packets Delivered         = 292690610
  Output Requests                    = 144483584
  Routing Discards                   = 0
  Discarded Output Packets           = 906
  Output Packet No Route             = 0
  Reassembly Required                = 205
  Reassembly Successful              = 95
  Reassembly Failures                = 0
  Datagrams Successfully Fragmented  = 0
  Datagrams Failing Fragmentation    = 0
  Fragments Created                  = 0

IPv6 Statistics

  Packets Received                   = 8484877
  Received Header Errors             = 0
  Received Address Errors            = 0
  Datagrams Forwarded                = 0
  Unknown Protocols Received         = 0
  Received Packets Discarded         = 373336
  Received Packets Delivered         = 10041013
  Output Requests                    = 16704131
  Routing Discards                   = 0
  Discarded Output Packets           = 1889
  Output Packet No Route             = 171
  Reassembly Required                = 0
  Reassembly Successful              = 0
  Reassembly Failures                = 0
  Datagrams Successfully Fragmented  = 0
  Datagrams Failing Fragmentation    = 0
  Fragments Created                  = 0

ICMPv4 Statistics

                            Received    Sent
  Messages                  243917      46542
  Errors                    0           0
  Destination Unreachable   19704       22407
  Time Exceeded             177624      0
  Parameter Problems        0           0
  Source Quenches           0           0
  Redirects                 0           0
  Echo Replies              445         23180
  Echos                     46144       955
  Timestamps                0           0
  Timestamp Replies         0           0
  Address Masks             0           0
  Address Mask Replies      0           0
  Router Solicitations      0           0
  Router Advertisements     0           0

ICMPv6 Statistics

                            Received    Sent
  Messages                  84300       75766
  Errors                    0           0
  Destination Unreachable   16638       18334
  Packet Too Big            0           0
  Time Exceeded             0           0
  Parameter Problems        0           0
  Echos                     0           4
  Echo Replies              4           0
  MLD Queries               0           0
  MLD Reports               0           0
  MLD Dones                 0           0
  Router Solicitations      0           15
  Router Advertisements     0           0
  Neighbor Solicitations    40386       27775
  Neighbor Advertisements   27272       29638
  Redirects                 0           0
  Router Renumberings       0           0

TCP Statistics for IPv4

  Active Opens                        = 1900438
  Passive Opens                       = 369225
  Failed Connection Attempts          = 10450
  Reset Connections                   = 460797
  Current Connections                 = 154
  Segments Received                   = 273517454
  Segments Sent                       = 110060297
  Segments Retransmitted              = 2182084

TCP Statistics for IPv6

  Active Opens                        = 973341
  Passive Opens                       = 973646
  Failed Connection Attempts          = 34
  Reset Connections                   = 1735122
  Current Connections                 = 40
  Segments Received                   = 46840865
  Segments Sent                       = 45024383
  Segments Retransmitted              = 1813578

UDP Statistics for IPv4

  Datagrams Received    = 51416164
  No Ports              = 314589
  Receive Errors        = 2135697
  Datagrams Sent        = 42118403

UDP Statistics for IPv6

  Datagrams Received    = 9841716
  No Ports              = 309860
  Receive Errors        = 42205
  Datagrams Sent        = 2040067

您可以使用-p选项按协议过滤显示。Ping依赖于它发送的“回应请求”的ICMP,因此您可以只查看ICMP的统计信息netstat -s -p icmp,但这只会给您一个错误计数。

c:\>netstat -s -p icmp

ICMPv4 Statistics

                            Received    Sent
  Messages                  243951      46546
  Errors                    0           0
  Destination Unreachable   19710       22409
  Time Exceeded             177648      0
  Parameter Problems        0           0
  Source Quenches           0           0
  Redirects                 0           0
  Echo Replies              445         23182
  Echos                     46148       955
  Timestamps                0           0
  Timestamp Replies         0           0
  Address Masks             0           0
  Address Mask Replies      0           0
  Router Solicitations      0           0
  Router Advertisements     0           0

还可以netstat -e选择查看以太网统计信息,它可以与-s选项结合使用,但这也只会给您一个错误计数。

c:\>netstat -e
Interface Statistics

                           Received            Sent

Bytes                    2205957284      1335899145
Unicast packets          1239501865       433229740
Non-unicast packets       143181375       167714415
Discards                          0               0
Errors                            0              55
Unknown protocols                 0

如果您有其他网络电缆,则可以更换现有电缆,以排除布线问题作为问题的根源。


2

你有没有试过ping 其他机器这个界面?
你有任何ICMP错误吗?

检查接口所连接的对等设备的接口统计信息也很有用。

  1. 你连接的网络设备是什么?
    • 它有任何接口统计信息吗?
    • 它们是否显示该设备的其他接口未显示的任何特定错误?

最后,它也可能是路径上的松散线。
如果您的网络上有两台以上的计算机,
这台特定的计算机是否以某种不同的方式连接?(无线跳?)
您是否检查过连接器是否已牢固接线?

如果您看到只有常规ping数据包(64字节)的丢失,则排除了IP分段。
如果您的接口没有显示错误计数,则还会排除CRC错误。


2

尝试这两个命令来获取NIC统计信息:

netsh interface ipv4 show ipstats

netsh interface ipv4 show tcpstats

如果“In Header Errors”中的数字大于0,则“Fragments Failed”,“In Errors”中存在导线问题。


1

使用Wireshark查看丢失/格式错误的软件包。不幸的是,这也是一个问题,取决于司机。


起初我认为这听起来像个好主意。但我想的越多,我意识到它只会帮助确认我随机丢失数据包。
Ian Boyd

0

启用FLOW CONTROl设置。试试看。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.