Cannot assign requested address的解决办法

sudo sysctl -w net.ipv4.tcp_timestamps=1  # 开启对于TCP时间戳的支持,若该项设置为0,则下面一项设置不起作用
sysctl -w net.ipv4.tcp_tw_reuse=1  # 复用socket

很多博客中说的修改sysctl -w net.ipv4.tcp_tw_recycle=1表示开启TCP连接中TIME-WAIT sockets的快速回收,不建议使用

参考
https://blog.csdn.net/lcathm/article/details/37874071
https://blog.csdn.net/qw3672939/article/details/83746604
https://www.cnblogs.com/lulu/p/4149312.html
https://blog.csdn.net/javyzheng/article/details/47129491

你可能感兴趣的:(linux)