Once your request arrives at your configured DNS server, the server looks for the address associated with the requested hostname.
One of the key differences between TCP and UDP is that TCP ensures delivery and ordered data transmission.
what’s most relevant is that TCP connections are opened using what’s known as a three-way handshake. The server must already be “listening” on a port, performing a passive open, after which the client can initiate an active open, and the handshake works as follows:
SYN
“control” packet to the server.SYN-ACK
message, which contains an acknowledgement number for the original message.ACK
message back to the server to ensure that our data is being delivered reliably.We now have a completed three-way handshake and an established connection where both the client and server have received acknowledgment of the connection from the other party.