Debian 9
nano /etc/sysctl.d/99-sysctl.conf
底部增加
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
然后sudo sysctl -p
改MTU
nano /etc/network/interfaces
添加一行红字,如下:
iface eth2 inet static
address 10.123.16.197
netmask 255.255.255.0
network 10.123.16.0
mtu 1480
================================================
检测最大mtu
例如输入
ping -l 1453 -f www.baidu.com
提示拆包
输入
ping -l 1452 -f www.baidu.com
则正常
1452+28=1480
1480则是要输入到wan口的mtu数值
apt install sudo -y
nano /etc/sysctl.conf
# IPv6 disabled
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
nano /etc/rc.local
增加
sudo sysctl -p
sudo ifconfig eth0 mtu 1480
没有评论:
发表评论