[root@es-node03 ~]# netstat -lntup Active Internet connections (only servers) 协议 接收 发送 本地IP地址 远程IP地址 状态 PID Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:8070 0.0.0.0:* LISTEN 3790/python3
LISTEN:(Listening for a connection.)侦听来自远方的TCP端口的连接请求 SYN-SENT:(Active; sent SYN. Waiting for a matching connection request after having sent a connection request.)再发送连接请求后等待匹配的连接请求 SYN-RECEIVED:(Sent and received SYN. Waiting for a confirming connection request acknowledgment after having both received and sent connection requests.)再收到和发送一个连接请求后等待对方对连接请求的确认 ESTABLISHED:(Connection established.)代表一个打开的连接 FIN-WAIT-1:(Closed; sent FIN.)等待远程TCP连接中断请求,或先前的连接中断请求的确认 FIN-WAIT-2:(Closed; FIN is acknowledged; awaiting FIN.)从远程TCP等待连接中断请求 CLOSE-WAIT:(Received FIN; waiting to receive CLOSE.)等待从本地用户发来的连接中断请求 CLOSING:(Closed; exchanged FIN; waiting for FIN.)等待远程TCP对连接中断的确认 LAST-ACK:(Received FIN and CLOSE; waiting for FIN ACK.)等待原来的发向远程TCP的连接中断请求的确认 TIME-WAIT:(In 2 MSL (twice the maximum segment length) quiet wait after close. )等待足够的时间以确保远程TCP接收到连接中断请求的确认 CLOSED:(Connection is closed.)没有任何连接状态
1 2 3 4 5 6
服务器中存在大量 [root@es-node03 ~]# cat /proc/sys/net/ipv4/tcp_fin_timeout 2 #通过缩短时间 time walt时间来快速释放链接 vim /etc/sysctl.conf net.ipv4.tcp_fin_timeout = 2
[root@es-node03 ~]# tar -xf awl-0.2.tar.gz [root@es-node03 ~]# cd awl-0.2/ [root@es-node03 ~/awl-0.2]# ./configure && make -j 4 && make install [root@es-node03 ~/awl-0.2]# which awl /usr/local/bin/awl
[root@es-node03 ~/awl-0.2]# ping 192.168.200.153 PING 192.168.200.153 (192.168.200.153) 56(84) bytes of data. 64 bytes from 192.168.200.153: icmp_seq=1 ttl=64 time=0.322 ms [root@es-node03 ~]# arp -n | grep 153 192.168.200.153 ether 00:50:56:9d:0b:0b C ens160 #获取目标主机mac地址