I use the environment for the WIN7 64-bit flagship version under the VirtualBox installation of the centOS6.5 experimental environment
Establish a connection
————————————————————————————————————————————————————————————————
In Terminal 1, enter root permissions, type tcpdump tcp-vx-i eth2
#使用man手册查看tcpdump的使用方法
#eth2为接口, you can use ARP-A to display the current interface
In Terminal 2, type telnet www.baidu.com
#远程登录www. Baidu.com 80 Port
Information about the connection pack that appears in Terminal 1, such as
The figure contains three packages:
1. From the local computer to the remote, the flag is [S], that is, set SYN, establish the connection, SEQ is 1189337464
2. From the remote to the local computer, the flag is [S.], that is, the SYN is set, see the ACK value is 1189337465, is the remote response to the local computer to establish a connection requirements
3. From the local computer to the remote, ACK value is 1, three handshake is completed
Release connection
————————————————————————————————————————————————————————————————
Type Ctrl +] in Terminal 2, and exit Telnet
The unpacking information begins to appear in Terminal 1, such as
The figure contains 4 packets, and the analysis packet can be found
Analysis of the establishment and release of TCP connections using the Tcpdump capture packet under Linux