“ TCP/IP Model is a standard reference Model for conceptualising data communications between networks ”
The TCP/IP is a practical Model that provides E2E data communication specifying how data should be packetized, addressed, transmitted, routed, and received. It characterizes and standardizes the communication functions of a Network system without regard to its underlying internal structure and technology. It is also called the Internet Model or the DoD Model. TCP/IP is a Vendor Neutral Model. It resolved many problems as described in below.
Problem: Before TCP/IP Model, each vendor used to use its own network model to manufacture Network equipment. So, one vendor’s equipment & network was not compatible with another vendor’s equipment. Buyers were bound to buy only from one vendor. For example, if you were buying IBM Computers then you were now bound to buy all Network Equipment from IBM as well in the future. Because IBM Computers couldn’t be connected by other vendor Switches or Routers. You must buy IBM Switches to connect them. They will not work with HP Server or Cisco Switches.
Solution: To resolve this problem, the idea of a standardised Network Model emerged and TCP/IP Model was formalised. In simple words, TCP/IP reference model describes how information from a software application in one computer moves through a network medium to a software application in another computer.
TCP and IP
TCP (Transmission Control Protocol) & IP (Internet Protocol) work together to form the foundations of TCP/IP Protocol suite. They form a team that work together to make it possible for applications to easily run over an internetwork.
TCP is “a Connection Oriented Transport Layer (Layer4) protocol for reliable communication b/w network devices”. TCPv4 was standardised in RFC-793 in1981. It is also called Host-to-Host protocol. It provides to applications a method of easily use the IP. It also fills in the capabilities that IP lacks. It allows TCP/IP devices to establish and manage connections and send data reliably and takes care of handling all the potential issues that can occur during transmission so that each application doesn’t need to worry about these details. It provides Reliable communication through PAR (Positive Acknowledgement with Re-transmission) using 3-way handshake process which is discussed in next section.
IP is related with classic Network Layer tasks (Logical Addressing, Routing) for basic internetworking capabilities.
TCP/IP Model Layers
TCP/IP Model divides the network communication processes into Four Layers in order to simplify it. Each layer performs specific functions to support the layers above it. The layers of the protocol suite near the top are logically closer to the user application, while those near the bottom are logically closer to the physical transmission of the data. TCP/IP Model has 4x Layers starting from Physical Network Interface till Application level as in below:
Physical Network Interface Layer standardises the Physical medium & is responsible for Physical Addressing. For example, signal level, voltage, radio, cabling standards & so on,… It is responsible for ultimate transmission of digital data bits in the form of electrical, optical or radio signals from the Network Interface layer of the sending device over network communications media to the Physical Network Interface Layer of the receiving or destination device. It also standardizes the Physical Addressing. It is responsible for Data Switching. Physical addressing includes MAC Address & Ethernet Frames. Internet Layer deals with Logical Addressing (IP Addressing). It is responsible for Data Routing. Transport Layer ensures the error free data transmission across networks. It is also responsible for Sessions Management in TCP/IP Model (in contrast to OSI Model, where sessions are managed by Session Layer). It mainly focuses on data delivery. Transport Layer mainly uses two protocols called TCP & UDP which we will discuss in detail in later sections. Application Layer is responsible for end-user processes or applications. It supplies network services to end-user applications. It is also responsible for data organization & conversion so that it is readable by Application layer of all hosts/applications involved in the data communication.
TCP/IP Model vs OSI Model
OSI (Open System Interconnection) is another model of the same kind. It also has same layered structure. The TCP/IP model is a condensed version of the OSI reference model consisting of only the 4xLayers. The functions of these four layers are comparable to the functions of the seven layers of the OSI model. Below figure shows the comparison between the layers of the two models:
OSI is used as standard only but we never find it on real equipment. The model in action today is TCP/IP. OSI is used only for standardization & reference purposes. Below are the detailed differences between OSI Model & TCP/IP Model:
TCP 3-way Handshake Process
TCP uses a process called 3-way Handshake for reliable communication. In 3-way Handshake process, three TCP segments are exchanged between the sender and the receiver to establish a reliable connection. These are called SYN, SYN-ACK and ACK.
Step1 (SYN): In the first step, client wants to establish a connection with server, so it sends a segment with SYN (Synchronize Sequence Number). This informs server that client is likely to start communication and with what sequence number it starts segments with.
Step2 (SYN + ACK): In the second step, Server responds to the client request with SYN-ACK signal bits set. Acknowledgement(ACK) signifies the response of segment it received and SYN signifies with what sequence number it is likely to start the segments with.
Step3 (ACK): In the last step, client acknowledges the response of server by ACK message. Status on both sides change to ESTABLISHED and both get ready to start the actual data transfer.
The steps 1 and 2 establish the connection parameter (seq nos.) for one direction and it is acknowledged. The steps 2 and 3 establish the connection parameter (seq nos.) for the other direction and it is acknowledged. After the whole process, a full-duplex communication is established. ISN’s (Initial Sequence Numbers) are randomly selected while establishing connections between client and server. Below is the simplified view of TCP 3-way handshake process:
TCP allows one side/device to establish a connection. The other side/device may either accept the connection or refuse it. The device that is establishing/requesting the connection is called client and the side waiting for a connection is called server.
TCP/IP Model provides a practical framework for communication between computers, but the model itself is not a method of communication. Actual communication is made possible by using communication protocols. Each layer on the TCP/IP Model has some protocols associated with it. Some important protocols on each layer are as in below:
Similar to protocols, each layer has associated equipment with it. For example, Hubs, Repeaters, Media Converters, L2 Switches & Bridges operate at Physical Network Interface Layer, Routers & Layer3 Switches operate on Internet Layer, Firewalls work on Transport Layer4. End Devices like PC’s/Server/Phones, Firewalls, IDS’s operate on Application Layer of TCP/IP Model as in below: