关于系统内核中tcp参数的释义-man 7 tcp

有本文,是因为我看了《极客时间》中陈皓的《左耳听风》第99讲 “高效学习:面对枯燥和量大的知识”。
其中提到:

很多中国的文档都会教人把 tcp_tw_recycle 和 tcp_tw_resue 这两个参数打开。然而,只要你 man 一下 TCP(7) , 就可以看到这样的描述:

tcp_tw_recycle (Boolean; default: disabled; since Linux 2.4)
Enable fast recycling of TIME_WAIT sockets.  Enabling this option is not recommended since this causes problems  when  working  with  NAT  (Network  Address Translation).

tcp_tw_reuse (Boolean; default: disabled; since Linux 2.4.19/2.6)
Allow  to reuse TIME_WAIT sockets for new connections when it is safe from protocol viewpoint.  It should not be changed without advice/request of technicalexperts.

你就可以看到这两个参数都是不建议被打开的。

认真阅读用户手册不但可以让你少掉很多坑,同时,还能让你学习到很多。

然后就对这个man 一下 TCP(7)的操作方法进行了研究- -最终学习到指令:

man 7 tcp

写本文只是Mark下man这个方法的使用方式,毕竟看文档的话,后面肯定还是会用到的。


未经允许不得转载:阿藏博客 » 关于系统内核中tcp参数的释义-man 7 tcp

赞 (0) 打赏