TCP / IP : Foundation of Internet Communication

TCP / IP : Foundation of Internet Communication

·

4 min read

Systems tend to break easily when not abided by law or rules.

The internet may seem like free-for-all space, but just like any other system, it also strictly relies on a set of rules ensuring it’s smooth performance. Imaging you trying to send a message to a person without knowing his/ her address or receiving one without the right information about the sender. Communication here would simply breakdown right ?

Similar to this during a flow of information over the internet’s vast network of computers it is crucial to set standards and rules, so that the communication can be successful.

These rules are called protocols.

While there are many types of protocols that ensure the smooth flow of various information, we will be exploring one of the foundational protocols among them—TCP/IP. It is the backbone of the internet, ensuring the reliable exchange of information.

TCP / IP

TCP/IP stands for Transmission Control Protocol and Internet Protocol. They are the fundamental communication protocols set of rules that enable computers and devices to exchange messages with each other. Think of it as a system of rules—similar to how you’d address an envelope when sending a letter—ensuring the message reaches the right recipient.

TCP ensures that the data sent between devices is delivered in the right order and accurately, breaking the data into smaller packets and ensuring these packets arrive intact and in sequence. IP on the other hand, handles the routing and addressing across network, determining the best path for data to travel from sender to receiver.

Together, TCP/IP forms the foundation of internet communication, allowing devices to reliably send and receive information across networks by ensuring both accurate delivery and proper addressing.

How do they ensure reliable and correct order information to be delivered ? This is due to the 3 way TCP handshake. What is it and how does it happen ? Let’s find out

3 Way Handshake of TCP

The 3 way handshake is an important mechanism that ensures reliable TCP connection establishment between client and server before data transfer starts. It ensures both parties are ready to communicate and synchronizes their parameters, such as sequence number.

Following are the steps in three way handshake of TCP:

  1. SYN ( Synchronize )

    This is the initial step of 3 way handshake. In this step user ( the client ) sends a SYN ( synchronize ) packet to the server initiating the TCP connection. This data packet contains a sequence number, a randomly chosen number.

    Client → Server: SYN, Seq=1

  2. SYN-ACK ( Synchronize and Acknowledge )

    After the server receives the SYN packet from the client, it acknowledges the packet and responds with SYN-ACK packet. A SYN packet to tell it’s willingness for establishing the connection and an ACK packet to inform that it wants to establish connection with the initial client that sent the SYN packet. The ACK packet the same sequence number incremented by 1, as sent by the client. The server also sends it’s Sequence number, randomly chosen one

    Server → Client: SYN, Seq=1000 | ACK, Ack=2

  3. ACK ( Acknowledge )

    The Client then sends the ACK packet back to the server, acknowledging the sequence number as sent by server by setting the ACK = sequence number + 1. After this, the connection is officially established and the data transfer begin to happen.

    Client → Server: ACK, Seq=2 | Ack=1001

The TCP/IP Model Layers

The TCP/IP Model Layers are a part of OSI (Open System Interconnection) Model. The TCP/IP Model consists of four layers, each with specific functions:

  • Application Layer

    This is the user-level layer. It provides protocols for services like web browsing, file transfer, and email. Some of the protocols include HTTP (Hypertext Transfer Protocol), FTP (File Transfer Protocol), SMTP (Simple Mail Transfer Protocol), and DNS (Domain Name System).

  • Transport Layer

    This layer manages end-to-end connections between hosts. The main protocols here are TCP (Connection-oriented and reliable) and UDP (Connectionless and non-reliable).

  • Internet Layer

    The Internet Layer handles routing and addressing of data packets across networks. It includes IP (Internet Protocol), ARP (Address Resolution Protocol), which maps IP addresses to physical MAC addresses, and other protocols involved in packet forwarding.

  • Network Interface Layer

    This layer determines how data is physically transmitted over the network. It includes protocols and technologies like Ethernet, WiFi, and the hardware used for transmission, such as network cards and routers.

Summary

To summarize, a system needs a set of rules for smooth functioning, and TCP/IP are those rules in the system of the Internet where messages and information are exchanged. These are also known as protocols. TCP ensures reliable connections and ensures message order through its 3-way handshake system (SYN, SYN-ACK, and ACK). The TCP/IP model consists of 4 layers:

  • Application Layer: Contains application protocols like HTTP, FTP, etc.

  • Transport Layer: Contains connection protocols like TCP and UDP.

  • Internet Layer: Contains routing and addressing protocols like IP.

  • Network Interface Layer: Contains hardware-level protocols like Wi-Fi and Ethernet.


If you find the blog helpful, consider dropping a like and a follow.