Chapter 7 OSI Data Link Layer
Chapter 7 OSI Data Link Layer
Chapter 7 OSI Data Link Layer
__________________________________________________________________________________
Figure 1.
Allows the upper layers to access the media using techniques such as framing
1
Al-Mustansiriyah University Fourth Year (2016-2017)
Faculty of Engineering Computer Networks Computer
Engineering Department Lecturer: Dr. Hanan Ahmed
__________________________________________________________________________________
Controls how data is placed onto the media and is received from the media using
techniques such as media access control and error detection as with each of the OSI
layers, there are terms specific to this layer:
Frame - The Data Link layer PDU
Node - The Layer 2 notation for network devices connected to a common medium
The Data Link layer is responsible for the exchange of frames between nodes over the media
of a physical network.
Logical networks are defined at the Network layer by the arrangement of the hierarchical
addressing scheme.
Physical networks represent the interconnection of devices on a common media.
Sometimes, a physical network is also referred to as a network segment.
Upper Layer Access to Media
Figure 2 shows 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.
Figure 2.
2
Al-Mustansiriyah University Fourth Year (2016-2017)
Faculty of Engineering Computer Networks Computer
Engineering Department Lecturer: Dr. Hanan Ahmed
__________________________________________________________________________________
Layer 2 protocols specify the encapsulation of a packet into a frame and the techniques for
getting the encapsulated packet on and off each medium. For the data to be transferred across
a number of different media, different media access control methods may be required during
the course of a single communication.
Data Link layer protocols require control information to enable the protocols to function.
Control information may tell:
• Which nodes are in communication with each other?
• When communication between individual nodes begins and when it ends?
• Which errors occurred while the nodes communicated?
• Which nodes will communicate next?
The Data Link layer prepares a packet for transport across the local media by encapsulating it
with a header and a trailer to create a frame.
Data - The packet from the Network layer
Header - Contains control information, such addressing, and is located at the beginning
of the PDU
Trailer - Contains control information added to the end of the PDU
Figure 3.
A node that is an end device uses an adapter to make the connection to the network. For
example, to connect to a LAN, the device would use the appropriate Network Interface Card
(NIC) to connect to the LAN media. The adapter manages the framing and media access
3
Al-Mustansiriyah University Fourth Year (2016-2017)
Faculty of Engineering Computer Networks Computer
Engineering Department Lecturer: Dr. Hanan Ahmed
__________________________________________________________________________________
control. At intermediary devices such as a router, where the media type could change for each
connected network, different physical interfaces on the router are used to encapsulate the
packet into the appropriate frame, and a suitable media access control method is used to
access each link. The router in the figure has an Ethernet interface to connect to the LAN and
a serial interface to connect to the WAN. As the router processes frames, it will use Data
Link layer services to receive the frame from one medium, decapsulate it to the Layer 3 PDU,
re-encapsulate the PDU into a new frame, and place the frame on the medium of the next link
of the network as shown in Figure 4(a-b).
(a)
4
Al-Mustansiriyah University Fourth Year (2016-2017)
Faculty of Engineering Computer Networks Computer
Engineering Department Lecturer: Dr. Hanan Ahmed
__________________________________________________________________________________
(b)
(c)
Figure 4: Frames Transfer.
5
Al-Mustansiriyah University Fourth Year (2016-2017)
Faculty of Engineering Computer Networks Computer
Engineering Department Lecturer: Dr. Hanan Ahmed
__________________________________________________________________________________
When data travels on the media, it is converted into a stream of bits, or 1s and 0s. If a node is
receiving long streams of bits, how does it determine where a frame starts and stops or which
bits represent the address? Framing breaks the stream into groups, with control information
inserted in the header and trailer as values in different fields. This format gives the physical
signals a structure that can be received by nodes and decoded into packets at the destination.
7.1.4 Data Link Layer – Connecting Upper Layer Services to the Media
The 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.
6
Al-Mustansiriyah University Fourth Year (2016-2017)
Faculty of Engineering Computer Networks Computer
Engineering Department Lecturer: Dr. Hanan Ahmed
__________________________________________________________________________________
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.