netstat大量time_wait串連

來源:互聯網
上載者:User

標籤:default   tcp   cycle   html   http   cookies   cookie   time_wait   netstat   

http://chembo.iteye.com/blog/1503770http://www.2cto.com/os/201007/54067.html

http://blog.csdn.net/dacong/article/details/50485585

 

 主動關閉一方會進入一個TIME_WAIT的中間狀態. 通過netstat 查看到的內容如下:

tcp 0 0 10.19.67.11:40184 10.19.67.11:7012 TIME_WAIT
tcp 0 0 10.19.67.11:39167 10.19.67.11:7012 TIME_WAIT

是 40184的連接埠主動關閉,處於TIME_WAIT狀態。

 

檢查一下time wait的值:

1 [[email protected] ~]# sysctl -a | grep time | grep wait2 net.netfilter.nf_conntrack_tcp_timeout_close_wait = 603 net.netfilter.nf_conntrack_tcp_timeout_fin_wait = 1204 net.netfilter.nf_conntrack_tcp_timeout_time_wait = 1205 [[email protected] ~]# 

 

檢查net.ipv4.tcp_tw當前值:

1 [[email protected] ~]# sysctl -a|grep net.ipv4.tcp_tw2 net.ipv4.tcp_tw_recycle = 03 net.ipv4.tcp_tw_reuse = 04 [[email protected] ~]#

 

修改 /etc/sysctl.conf 設定檔,新增內容。

重新生效sysctl.conf 設定檔:

 1 [[email protected] ~]# sysctl -p 2 net.ipv4.ip_forward = 0 3 net.ipv4.conf.default.rp_filter = 1 4 net.ipv4.conf.default.accept_source_route = 0 5 kernel.sysrq = 0 6 kernel.core_uses_pid = 1 7 net.ipv4.tcp_syncookies = 1 8 net.bridge.bridge-nf-call-ip6tables = 0 9 net.bridge.bridge-nf-call-iptables = 010 net.bridge.bridge-nf-call-arptables = 011 net.ipv4.tcp_tw_reuse = 112 net.ipv4.tcp_tw_recycle = 1

 

netstat大量time_wait串連

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.