TCP/IP Reference Model Explained

This tutorial explains five layers of TCP/IP model (Application, Transport, Internet or Network, Data Link and Physical) and their functionality in detail.

Application Layer

This layer defines the protocols and standards that an application requires to connect with network. For example, an application layer protocol HTTP defines how a web browser can fetch a web page from a web server.

application layer example

The HTTP protocol manages communications between web browsers and web servers and opens the right resource when a URL is entered in address bar or a link is clicked. Basically it’s a language that both web browser and web server understand and use to provide the required information.

When we type a URL in web address and hit enter key, HTTP protocol finds that address and delivers the requested contents or display error message if the requested contents are not available.

Application layer does not define the application itself. It only defines the standards, services and protocols that an application needs to connect with remote computer. The most common protocols that work in this layer are HTTP, HTTPS, SNMP, NTP, SSH, FTP, TFTP, Telnet, DHCP and DNS.

This tutorial is the fourth part of the article "Networking reference models explained in detail with examples". This article explains following CCNA topic.

Compare and contrast OSI and TCP/IP models

Other parts of this article are following.

OSI Model Advantages and Basic Purpose Explained

This tutorial is the first part of the article. It briefly explains the reasons why OSI model was created along with the advantages.

OSI Seven Layers Model Explained with Examples

This tutorial is the second part of the article. It explains the seven layers of OSI model in details.

Similarities and Differences between OSI and TCP/IP Model

This tutorial is the third part of the article. It compares OSI reference model with TCP/IP model and lists the similarities and differences between both models.

Data Encapsulation and De-encapsulation Explained

This tutorial is the fifth part of the article. It explains how data is encapsulated and de-encapsulated when it passes through the layers.

Transport layer

This layer is also known as host-to-host layer. It provides logical connection between two hosts. Main functions of this layer are following: -

  • Segmentation
  • Reliability
  • Flow control
  • Connection multiplexing

Let’s understand each of these functions in detail.

Advertisements

Segmentation

The process of breaking up large data file into smaller and identifiable pieces is known as Segmentation and each piece produced in segmentation process is known as a segment.

For example, a host wants to send a 100Mb file over a 1Mbps connection. Since a 100Mb file cannot be transferred over a 1Mbps connection, so it breaks the file in 100 or more pieces. Since a piece is less or equal in size of the connection, it can travel across the connection easily. Destination host, upon receiving all the pieces, reassembles them back in original file. In this example, the process of breaking file is the segmentation and each piece is a segment.

Segmentation enables a host to send and receive any size of data file over the any size of connection.

Reliability

A connection is considered as reliable connection when it provides following services: -

  • Recognize and resend the lost segments.
  • Recognize the segment order and arrange segments in correct order.
  • Detect the duplicate segments and drop the extra segments.

TCP protocol provides all above services. It numbers and sequences each segment so that the remote host can put all segments back into the original order. After transmitting the segments, it waits for an acknowledgement from remote host. If it doesn’t receive acknowledgement of any segments, it retransmits those segments.

Some applications such as DHCP and DNS do not require reliability. If an application doesn’t require reliability, it usually uses UDP protocol to transmit the data. Since UDP doesn’t use the reliable connection, it doesn’t insert the information in each segment header that is required in reliable connection. Without this information, header becomes much lighter than the header with this information. A segment with a lightweight header moves faster in the network than a heavier segment.

Flow control

Flow control ensures that the remote host does not become overwhelmed by the source sending too much segments at once. There are two types of flow control; ready /not-ready signals and windowing.

Ready/not-ready signals

In this method, the destination sends ready and not-ready signals to the source. Based on these signals, source controls the flow. Destination sends a not-ready signal when its buffer fills up. Upon receiving the not-ready signal, source stops sending more segments and waits for a ready signal. Once destination is ready to receive more segments, it sends a ready signal to the source. Upon receiving the ready signal, source resumes data sending.

Windowing

In this method, source and destination first define a window size. A window size is the number of segments that the source can send before receiving an acknowledgement from the destination. Once acknowledgement is received, source can send next batch of segments.

Connection multiplexing

Multiplexing allows a host to initiate multiple connections with one or many hosts simultaneously. When a source opens a connection, a session occurs. A session can be reliable or unreliable. To distinguish each session, source uses port numbers. It assigns a unique source port number to the all segments which it sends in a session.

Internet or Network Layer

In original TCP/IP model, this layer is defined as Internet layer. In updated version, it is renamed to the Network layer. Main functions of this layer are addressing and routing. For these functions, it uses IP protocol.

Addressing

In order to communicate with other hosts, every host in a network needs a unique address. A unique address is the combination of two types of addresses; software address and hardware address. This layer provides software address. Software address is also known as IP address.

Routing

Just like postal service delivers packages in real world, routing service delivers data packets in network. It takes data packet from source, reads its destination address, finds destination in network and delivers the packet to the destination host.

Routers are used for routing. Just like post office filters and reroutes the package based on destination address, router checks destination address in data packet and routes it through the best and the shortest path.

Link Layer (Data Link and Physical Layer)

This layer defines standards and protocols for data transmission and physical connectivity. It also provides hardware addressing that is used to locate a device in local network. Switching and connecting devices are the two main functions of this layer.

Broadly, switching is just like routing but it works with hardware address instead of the software address. Switches are used for switching. Besides switching, it also defines standards and protocols which are used for physical connectivity.

In original TCP/IP model both functions are defined in a single layer; Link layer. In updated version, both functions are defined separately. Functions and standards which are directly related with physical transmission are defined in Physical layer while the functions and standards which are indirectly related with physical transmission are defined in Data link layer. In updated version, switching is defined in Data link layer while standards and protocols related with physical transmission are defined in physical layer.

TCP/IP model and its layers

Reference to other networking models

Since most of the standards and protocols were already defined in other network models while TCP/IP model was in development phase, the developers of TCP/IP model, instead of defining these standards and protocols again, referenced them in TCP/IP model with their respective model name such as Ethernet standards and IEEE standards.

So whenever you see a standard mentioned with its model name such as Ethernet standard or IEEE standard in TCP/IP model, understand it as a referenced standard. A referenced standard or protocol is a standard or protocol that is originally defined in other networking model.

That’s all for this part. In next part of this article, I will explain how data is encapsulated and de-encapsulated when it passes through the layers. If you like this tutorial, please don’t forget to share it through your favorite social site.

Advertisements

ComputerNetworkingNotes CCNA Study Guide TCP/IP Reference Model Explained