Hi there!! Hope that you are all well by the grace of almighty. Today I’m going to share with you a knowledge about the layer 2 – datalink layer. Through out this post, we’ll analyze the data link layer.
Layer 2 – Data link Layer
As we know that data link layer is one of the important layer of OSI model. The OSI model mainly has seven parts. They are:
So we can have a flash back of the important layers:
- The interface is provided to the user by the Application layer.
- The Transport layer is responsible for dividing and managing communications between the processes running in the two end systems.
- The Network layer protocols organize our communication data so that it can travel across inter networks from the originating host to a destination host.
Data link layer helps to exchange data over a common local media. So the data link layer performs two common basic service. These are:
- It helps to connect upper layers to access the media using framing technique.
- Control the placement of data onto the media.
- Apply the techniques of media access control and error detection.
The Data Link layer is responsible for the exchange of frames between nodes over the media of a physical network. The layer 2 – Data Link layer exists as a connecting layer between the software processes of the layers above it and the Physical layer below it. As such, it prepares the Network layer packets for transmission across some form of media, be it copper, fiber, or the atmosphere.
Imagine a data conversation between two distant hosts, such as a PC in Paris with an Internet server in Japan. Although the two hosts may be communicating with their peer Network layer protocols (IP for example), it is likely that numerous Data Link layer protocols are being used to transport the IP packets over various types of LANs and WANs. This packet exchange between two hosts requires a diversity of protocols that must exist at the Data Link layer. Each transition at a router could require a different Data Link layer protocol for transport on a new medium.
Notice in the figure that each link between devices uses a different medium. Between the PC and the router may be an Ethernet link. The routers are connected through a satellite link, and the laptop is connected through a wireless link to the last router. In this example, as an IP packet travels from the PC to the laptop, it will be encapsulated into Ethernet frame, decapsulated, processed, and then encapsulated into a new data link frame to cross the satellite link. For the final link, the packet will use a wireless data link frame from the router to the laptop.
The Data Link layer effectively insulates the communication processes at the higher layers from the media transitions that may occur end-to-end. A packet is received from and directed to an upper layer protocol, in this case IPv4 or IPv6, that does not need to be aware of which media the communication will use.
Without the Data Link layer, a Network layer protocol, such as IP, would have to make provisions for connecting to every type of media that could exist along a delivery path. Moreover, IP would have to adapt every time a new network technology or medium was developed. This process would hamper protocol and network media innovation and development. This is a key reason for using a layered approach to networking.
The range of Data Link layer services has to include all of the currently used types of media and the methods for accessing them. Because of the number of communication services provided by the Data Link layer, it is difficult to generalize their role and provide examples of a generic set of services. For that reason, please note that any given protocol may or may not support all these Data Link layer services.
In many cases, the Data Link layer is embodied as a physical entity, such as an Ethernet network interface card (NIC), which inserts into the system bus of a computer and makes the connection between running software processes on the computer and physical media. The NIC is not solely a physical entity, however. Software associated with the NIC enables the NIC to perform its intermediary functions of preparing data for transmission and encoding the data as signals to be sent on the associated media.
If you want, you can also enjoy this video for a knowledge of data link layer: