Linux ping external network packet loss solution

  

Operating system: Centos6


1.Discover the problem Ping external network packet loss is serious, ping the internal network does not lose packets:

Ping external network situation: serious packet loss


2. It is suspected that the network card cache is too small, check the network card cache by command:

[root@ Localhost gdm]# ethtool -g eth0


Current hardware settings: current hardware settings

TX: Transfer

RX: Receive

Parameters:

-g: Query the RX/TX parameter information of the specified Ethernet device

3. Modify the buffer size of the NIC receiving/transmitting separately:

[ ,null,null,3],Root@localhost gdm]# ethtool -G eth0 rx 2048

[root@localhost gdm]# ethtool -G eth0 tx 2048



Settings:

-G: Change the RX/TX parameters of the specified Ethernet device

4. Ping the network without packet loss:


5 Write the following command to the /etc/rc.local file

Vim /etc/rc.local

ethtool -G eth0 tx 2048

ethtool -G eth0 rx 2048

Copyright © Windows knowledge All Rights Reserved