红联Linux门户
Linux帮助

Linux ping外网丢包的解决方法

发布时间:2016-03-14 16:18:38来源:linux网站作者:翱翔的水滴

操作系统:Centos6


1.发现问题ping外网丢包严重,ping内网不丢包:

Ping外网的情况:丢包严重

Linux ping外网丢包的解决方法


2.怀疑是网卡缓存太小的原故,通过命令查看网卡缓存:

[root@localhost gdm]# ethtool -g eth0

Linux ping外网丢包的解决方法

Current hardware settings: 当前的硬件设置

TX:传送

RX:接收

参数:

-g: 查询指定的以太网设备的RX/TX参数信息


3.分别修改网卡接收/传送的缓存大小:

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

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

Linux ping外网丢包的解决方法

参数设置:

-G:更改指定以太网设备的RX/TX参数


4.ping外网无丢包情况:

Linux ping外网丢包的解决方法


5.将以下命令写入/etc/rc.local文件

Vim /etc/rc.local

ethtool -G eth0 tx 2048

ethtool -G eth0 rx 2048


本文永久更新地址:http://www.linuxdiyf.com/linux/18936.html