Summary of the TCP/IP Model

Introduction

The TCP/IP suite of protocols is what most modern computer networks, including the Internet, are built upon. It can be viewed as a stack of four or five different layers depending on who you ask.

IETF RFC-1122 uses the four layer model but some other sources still use five - separating the Link Layer into two.

TCP/IP Four Layer Model (RFC-1122)

  • Application
  • Transport
  • Internet
  • Link

TCP/IP Five Layer Model

  • Application
  • Transport
  • Internet
  • Data Link
  • Physical

The names of each layer can also vary slightly – for example some people prefer to use the word Network or Internetwork instead of Internet.

The Application Layer

Example Protocols

At the application communication could be peer to peer (P2P), or more commonly Client to Server. Client server communication will typically be a client requesting something from a server and the server responding with an answer – either the requested resource or an error.

For example a web browser might communicate with a web server over HTTP (Hyper Text Transfer Protocol). The client (web browser) will request a resource using a URL (Uniform Resource Locator) and the server will then return this resource in its response – typically as an HTML (Hyper Text Markup Language) payload.

  • HTTP
  • SIP
  • IMAP

The Transport Layer

By far the most common transport layer protocols are TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).

The transport layer is responsible for providing the stream of data carried over the network to the application layer as needed. Some applications will need guarantees that they are receiving all the data, without any errors. For example when browsing the web, it’s important that your browser gets all the information required to render the page even if this results in a short lag to check everything is ok.

Other applications might want a lot of data quickly, but don’t mind if small bits are missing or in the wrong order. For example if making a video call you can probably cope with a few dropped frames but if there is a big delay then it will be a very confusing conversation.

Example Protocols

  • TCP
  • UDP
  • SCTP

TCP

The Transmission Control Protocol provides connection-oriented, reliable communication. This means that a connection is established between the two parties and there is some guarantee that the right data will be delivered to the application layer in the right order. One way this is a achieved is by the receiver sending acknowledgements after data is received – if the sender doesn’t receive an acknowledgement then it knows to resend that data.

UDP

The User Datagram Protocol is connectionless and ‘un-reliable’ – there is no guarantee that all the right data will get to the application layer in the right order.

In some applications, it might be more important to transfer data quickly than perfectly (such as VOIP).

The Network/Internet Layer

The network layer is concerned with transporting datagrams, or packets, from A to B. This includes a logical addressing scheme for nodes and packet forwarding to move packets through a series of ‘next hops’ to reach their destination.

Example Protocols

  • IPv4
  • IPv6
  • ICMP

The Internet Protocol (IP)

The most common Network layer protocol is the Internet Protocol – version 4 is most widespread but the more recent version, 6, is gaining adoption.

Data carried using IP is sent as discrete packets which each have a source address and a destination address. Packets move from hop to hop across networks to reach their destination. The user, and higher layers (such as TCP) don’t need to know the route which will be taken they just need to specify the destination.

A typical analogy for IP is the post system. As a sender, you give your packet – a letter – a destination address and put it in a post-box. From here the post service (like IP) will move the letter various depots on the way to the final destination. Each depot will make a decision on where to forward the letter to next in order to get closer to the address that you wrote on the letter. Neither you, nor the recipient mind too much which route is taken and different letters could potentially take different routes to the same destination.

The Link Layer (Data Link plus Physical)

The link layer is responsible for the physical transmission of bits of data across a network. The exact scope of the Link Layer in TCP/IP is debated. A comprehensive interpretation is that the link layer specifies how electronic signals should be transmitted from A to B (across a cable, a fibre or free space) and the addresses tied to the physical hardware involved.

Example Protocols

  • Ethernet
  • PPP (Point to Point Protocol)

Questions

Question 1

Define the four and five layer models for the TCP/IP network stack.

Question 2

Which of the following is an example of an Application layer protocol?

  1. The Hypertext Transfer Protocol (HTTP)

  2. The Transmission Control Protocol (TCP)

  3. Ethernet

  4. The Internet Protocol (IP)

Question 3

Which layer is responsible for logical addressing between nodes on a network?

  1. The Physical layer

  2. The Application layer

  3. The Internet, or Network layer

  4. The Transport layer

Question 4

Which of the following is NOT a layer in the TCP/IP networking model?

  1. Session Layer

  2. Application Layer

  3. Internet Layer

  4. Transport Layer

Question 5

Which of the following is a connectionless transport layer protocol?

  1. The Internet Protocol (IP)

  2. The File Transfer Protocol (FTP)

  3. The Transmission Control Protocol (TCP)

  4. The User Datagram Protocol (UDP)

References

TCP/IP Overview

Cisco

RFC-1122 Requirements for Internet Hosts -- Communication Layers

Internet Engineering Task Force

Prerequisite Skills

lesson

What is a computer network?

Networks are made up of network nodes (endpoints, switches and routers) which use interconnections to communicate with each other and move…

Follow On Cyber Learning

lesson

How does IPv4 work?

IPv4 has been at the heart of the TCP/IP stack since it's inception. It is slowly being replaced by IPv6.

lesson

Same layer and adjacent layer interactions

Learn about interactions at the same layer and between adjacent layers, including encapsulation and protocol data units (PDUs).

lesson

TCP: The Transmission Control Protocol

TCP is a connection-oriented protocol used at the transport layer to support protocols such as HTTP.

lesson

The OSI 7 Layer Reference Model

A conceptual network model which is often used as a reference but not implemented practically.

lesson

UDP: User Datagram Protocol

UDP is a simple transport layer protocol.

lesson

Using tcpdump: Options, Filters and Examples

'tcpdump' is a command-line tool available for UNIX based systems (including macOS and Linux) that captures network traffic and displays it on screen or saves it to a file. It is a simple but powerful tool for troubleshooting network problems, understanding protocols, investigating suspicious network activity, and much more.

Related Training Courses

course

Computer Networking Foundations

Understand how modern computer networks work.