操作系统:Centos6
1.发现问题ping外网丢包严重,ping内网不丢包:
Ping外网的情况:丢包严重
2.怀疑是网卡缓存太小的原故,通过命令查看网卡缓存:
[root@localhost gdm]# ethtool -g eth0
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
参数设置:
-G:更改指定以太网设备的RX/TX参数
4.ping外网无丢包情况:
5.将以下命令写入/etc/rc.local文件
Vim /etc/rc.local
ethtool -G eth0 tx 2048
ethtool -G eth0 rx 2048