The article is intended for anyone who is familiar with TCP/IP and explains the TCP three-way handshake process.
I have captured the traffic between the client PC and a web server (example.net) using Wireshark.
To establish a connection between client and server, TCP uses a process called three-way handshake. (SYN, SYN-ACK, ACK)
First thing first, why is three-way handshake called as a three-way handshake? The reason being is that three segments are exchanged between the client and the server for TCP connection to be established.
The following sequence shows the process of a TCP connection being established.
Step 1Packet# 1
The client wants to initiate a connection to the server (126.96.36.199). So, the client sends a packet with SYN bit set. SYN flag announces an attempt to open a connection.
If you look at the TCP header, the source port is randomly selected by Windows and the destination is well-known port 80. Length of the data is zero because this is a SYN packet and no data is transmitted in this stage. If you look at the sequence number, the value is set to zero by Wireshark (Relative sequence number).
The actual value would be a 32 bit randomly selected number which we humans will find hard to keep up with. From the screenshot you can see the actual SEQ number from the client is 1932704549 (I have also attached the picture which shows the actual 32 bits sequence number below)
Step 2Packet# 2
In step 2, the server will respond to the client with ACK and SYN bit set. Like step 1, Length of the data is zero, no data is transmitted in this stage. The sequence number is set to 0 (relative) and acknowledges the request of the client for synchronization. The server sends an acknowledgment of 1 to the client. The ACK is specific to the SYN the client sent. The acknowledge number is set to one more than the receive sequence number.
Step 3Packet# 3
Finally, the client acknowledges the server’s request for synchronization with ACK 1. The ACK is specific to the SYN the server sent. The acknowledge number is set to one more than the receive sequence number.
The above process creates a reliable OSI Layer 4 connection between two hosts.
Hello Expert, I have some old 2811 and two 3945 routers in my network and would like to out fit them with Wan cards to do allow pppoe connection to other sites.Note this is just a short term arrangement they will all be replace by the las...
I work in an ISP multiple times i have encounter that other ISPs wants to run his customer through my network and they share the VLAN ID that i can't allow for them because it has been used by my network. i want to ask if there is any possibility to...
An NTP servere confugured on VM. i have multiple switches in my network i.e 3550,3560,3750,4948. I configured NTP server on all these switches to sycnchronize the time. works perfectly. but unfortunately its stops synchronization on some of switches...
I want to config. my Cisco 1941 router to1. enable my LAN users to access internet2. make my web server 192.168.1.100 255.255.255.0 live from internet,my ISP gave me thiswan ip 10.136.65.150subset mask 255.255.255.252gateway 10.136.65.146and public IP add...
I am new to nexus and trying to learn some practical applications of NX-OS. I have this lab built, I added two nexus switches so I can learn the concept of VPC. Now I need to connect my PC1 to PC2 so that they can ping each other going through vpc. If I c...