Skip main navigation

What is the layered model?

The data link layer encapsulates data from the network layer, and the network layer encapsulates data from the transport layer

IP packets are transported in frames. To transport IP packets across all the various links, there are two theoretical options:

  1. Change all the data link protocols so they understand IP addresses and the structure of IP packets.
  2. Use the data link protocols to transport IP packets as their data.

Option 1 would require a vast amount of redesign that would make much of the existing network infrastructure redundant. Therefore, option 2 is the logical choice.

So the data transmitted in data link frames (such as Ethernet frames) is IP packets. These IP packets contain (encapsulate) the actual data that one device is sending to another.

Diagram showing encapsulation of Data as it travels from device's core OS. At the Network layer it is encapsulated in an IP packet with an IP header. At the Data link layer this IP packet is encapsulated into a Frame. This bits that make up this frame are encoded as signals onto the network media.

It’s like an envelope inside an envelope: double encapsulation!

A slip labelled "DATA" going into an envelope labelled "PACKET", which is itself going into an envelope labelled "FRAME".

So in the same way that the data link layer encapsulates data from the network layer, the network layer encapsulates data from another layer. This ‘higher’ layer is called the transport layer.

NOTE: the network layer is sometimes referred to as the internet layer. We will use the term network layer here.

The network layer as a service

In the same way the data link layer provides a service to the network layer by transporting its data in frames, the network layer also provides a service to the transport layer by transporting its data.

  1. One device’s transport layer wants to send some data to the equivalent transport layer on a distant device.
  2. The transport layer uses the services of the network layer to transport the data inside IP packets.
  3. The network layer uses the services of the data link layer to transport the IP packets as frames across the local links. In practice this involves intermediary devices (e.g. routers) that check each IP packet’s destination address and choose the next link.
  4. The data link layers connect to the media and transmit the frames as bits encoded into electrical, optical or electromagnetic (wireless) signals. If the media is Ethernet, a switch will be involved.

The journey of the data from one Transport Layer to the Transport Layer on a distant device, via a switch.

 

This article is from the free online

An Introduction to Computer Networking for Teachers

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education