linux – 许多丢弃了我的NIC数据包

前端之家收集整理的这篇文章主要介绍了linux – 许多丢弃了我的NIC数据包前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一台运行在CentOS 5.3上的服务器(一个彗星聊天服务器,将有很多tcp连接).最近我发现它很慢(http服务和ssh)所以我使用“ifconfig”命令来弄清楚发生了什么.
  1. eth0 Link encap:Ethernet HWaddr 00:1C:C0:B5:D5:EA
  2. inet addr:10.0.0.61 Bcast:10.0.0.255 Mask:255.255.255.0
  3. inet6 addr: fe80::21c:c0ff:feb5:d5ea/64 Scope:Link
  4. UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
  5. RX packets:871861 errors:0 dropped:489662344145 overruns:0 frame:0
  6. TX packets:639044 errors:0 dropped:0 overruns:0 carrier:0
  7. collisions:0 txqueuelen:1000
  8. RX bytes:207239658 (197.6 MiB) TX bytes:169416201 (161.5 MiB)
  9. Interrupt:225 Base address:0x6000
  10.  
  11. lo Link encap:Local Loopback
  12. inet addr:127.0.0.1 Mask:255.0.0.0
  13. inet6 addr: ::1/128 Scope:Host
  14. UP LOOPBACK RUNNING MTU:16436 Metric:1
  15. RX packets:44497 errors:0 dropped:0 overruns:0 frame:0
  16. TX packets:44497 errors:0 dropped:0 overruns:0 carrier:0
  17. collisions:0 txqueuelen:0
  18. RX bytes:11470951 (10.9 MiB) TX bytes:11470951 (10.9 MiB)

当我重新启动网络时,一切顺利.但经过一段时间后,它会再次变慢.

有人可以帮忙吗?

更新:

================================================== ==============================

正如Rajat所要求的那样,我将发布一些诊断信息

  1. uname -a
  2. Linux im.cluster.myserver.com 2.6.18-128.el5 #1 SMP Wed Jan 21 10:41:14 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
  3.  
  4.  
  5. sudo /sbin/lspci | grep Ethernet
  6. 02:00.0 Ethernet controller: Realtek Semiconductor Co.,Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
  7.  
  8. sudo dmesg | grep eth0
  9. eth0: RTL8168d/8111d at 0xffffc200000
    eth0      Link encap:Ethernet  HWaddr 00:1C:C0:B5:D5:EA  
  10.           inet addr:10.0.0.61  Bcast:10.0.0.255  Mask:255.255.255.0
  11.           inet6 addr: fe80::21c:c0ff:feb5:d5ea/64 Scope:Link
  12.           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  13.           RX packets:871861 errors:0 dropped:489662344145 overruns:0 frame:0
  14.           TX packets:639044 errors:0 dropped:0 overruns:0 carrier:0
  15.           collisions:0 txqueuelen:1000 
  16.           RX bytes:207239658 (197.6 MiB)  TX bytes:169416201 (161.5 MiB)
  17.           Interrupt:225 Base address:0x6000 
  18. lo        Link encap:Local Loopback  
  19.           inet addr:127.0.0.1  Mask:255.0.0.0
  20.           inet6 addr: ::1/128 Scope:Host
  21.           UP LOOPBACK RUNNING  MTU:16436  Metric:1
  22.           RX packets:44497 errors:0 dropped:0 overruns:0 frame:0
  23.           TX packets:44497 errors:0 dropped:0 overruns:0 carrier:0
  24.           collisions:0 txqueuelen:0 
  25.           RX bytes:11470951 (10.9 MiB)  TX bytes:11470951 (10.9 MiB)
  26.  
  27. ,00:1c:c0:b5:d5:ea,XID 281000c0 IRQ 225
    r8169: eth0: link up
    r8169: eth0: link up
    eth0: no IPv6 routers present
    r8169: eth0: link up
    eth0: no IPv6 routers present

  28. sudo /sbin/ethtool eth0
    Settings for eth0:
    Supported ports: [ TP MII ]
    Supported link modes: 10baseT/Half 10baseT/Full
    100baseT/Half 100baseT/Full
    1000baseT/Half 1000baseT/Full
    Supports auto-negotiation: Yes
    Advertised link modes: 10baseT/Half 10baseT/Full
    100baseT/Half 100baseT/Full
    1000baseT/Half 1000baseT/Full
    Advertised auto-negotiation: Yes
    Speed: 1000Mb/s
    Duplex: Full
    Port: MII
    PHYAD: 0
    Transceiver: internal
    Auto-negotiation: on
    Supports Wake-on: pumbg
    Wake-on: p
    Current message level: 0x00000033 (51)
    Link detected: yes

  29. sudo /sbin/ethtool -k eth0
    Offload parameters for eth0:
    Cannot get device udp large send offload settings: Operation not supported
    rx-checksumming: on
    tx-checksumming: off
    scatter-gather: off
    tcp segmentation offload: off
    udp fragmentation offload: off
    generic segmentation offload: off

    eth0 Link encap:Ethernet HWaddr 00:1C:C0:B5:D5:EA
  30. inet addr:10.0.0.61 Bcast:10.0.0.255 Mask:255.255.255.0
  31. inet6 addr: fe80::21c:c0ff:feb5:d5ea/64 Scope:Link
  32. UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
  33. RX packets:871861 errors:0 dropped:489662344145 overruns:0 frame:0
  34. TX packets:639044 errors:0 dropped:0 overruns:0 carrier:0
  35. collisions:0 txqueuelen:1000
  36. RX bytes:207239658 (197.6 MiB) TX bytes:169416201 (161.5 MiB)
  37. Interrupt:225 Base address:0x6000
  38.  
  39. lo Link encap:Local Loopback
  40. inet addr:127.0.0.1 Mask:255.0.0.0
  41. inet6 addr: ::1/128 Scope:Host
  42. UP LOOPBACK RUNNING MTU:16436 Metric:1
  43. RX packets:44497 errors:0 dropped:0 overruns:0 frame:0
  44. TX packets:44497 errors:0 dropped:0 overruns:0 carrier:0
  45. collisions:0 txqueuelen:0
  46. RX bytes:11470951 (10.9 MiB) TX bytes:11470951 (10.9 MiB)sudo /sbin/ethtool -S eth0
    NIC statistics:
    tx_packets: 4483119
    rx_packets: 7443820
    tx_errors: 0
    rx_errors: 0
    rx_missed: 0
    align_errors: 0
    tx_single_collisions: 0
    tx_multi_collisions: 0
    unicast: 3591906
    broadcast: 442720
    multicast: 3851914
    tx_aborted: 0
    tx_underrun: 0

解决方法

要检查的几件事:

>运行ethtool eth0并查看接口上的速度/双工状态,然后检查连接服务器的端口上的开关是否具有相同的设置[预期为:全双工,100或1000 MBit / s.两侧相同]>如果没有双工不匹配 – 检查交换机端口和网络接口 – 可能其中一个有问题>检查/更换跳线,可能是有故障或有干扰源

猜你在找的Linux相关文章