MTU 设置不合理,故障一例
image.png通过ipsec SSH目标主机卡住,ssh -vvv显示:
debug2: kex_parse_kexinit: none,
debug2: kex_parse_kexinit: none,
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_setup: found hmac-md5
debug1: kex: server->client aes128-ctr hmac-md5 none
debug2: mac_setup: found hmac-md5
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
报错内容:
从 C 端ssh -vv B_IP} 报 debug1:SSH2_MSG_KEXINIT sent
从 B 端 ssh -vv ${C_IP} 报 expecting SSH2_MSG_KEX_ECDH_REPLY
image.png把mtu值设置一下默认是1500,临时生效
echo "1420" > /sys/class/net/eth0/mtu
修改本机网卡文件,永久生效
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:07:E9:05:E8:B4
IPADDR=192.168.100.100
NETMASK=255.255.255.0
ONBOOT=yes
MTU=1420
service netword restart
systemctl restart network
为什么要这么修改呢?
image.png image.png image.png image.png参考
SSH 连接出现expecting SSH2_MSG_KEX_ECDH_REPLY失败解决
https://www.icode9.com/content-4-812397.html
关于经典MTU配置的问题详解
https://blog.csdn.net/weixin_38280090/article/details/81171791
解决 GRE 和 IPsec 中的 MTU,IPv4 分段、MSS 和 PMTUD 问题超级经典
https://zhuanlan.zhihu.com/p/376770398
IP报文及ICMP报文结构
http://blog.chinaunix.net/uid-25365622-id-4251621.html
Gre数据包封装格式、通过NAT设备
https://zhuanlan.zhihu.com/p/376815467
MTU 导致故障总结一例
https://mp.weixin.qq.com/s/4b-2IbADeVKnvEPhkddYeQ
网友评论