0% found this document useful (0 votes)
42 views

Data Link Layer

The data link layer prepares network data for transmission by encapsulating it into frames and controlling how data is placed on and received from the network media. It includes logical link control and media access control sublayers, with MAC providing frame encapsulation and addressing. Common data link protocols are Ethernet, 802.11, PPP, and HDLC.

Uploaded by

szymongazinski
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Data Link Layer

The data link layer prepares network data for transmission by encapsulating it into frames and controlling how data is placed on and received from the network media. It includes logical link control and media access control sublayers, with MAC providing frame encapsulation and addressing. Common data link protocols are Ethernet, 802.11, PPP, and HDLC.

Uploaded by

szymongazinski
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Data Link Layer

The data link layer prepares network data for the physical layer.

Data link layer does the following:

 Enables upper layers to access the media,


 Accepts data and encapsulates it to layer 2 frames,
 Controls how data is placed and received on the media,
 Exchanges frames between end devices through network media,
 Receives encapsulated data and directs them to the proper upper-layer protocol,
 Error detection and rejecting corrupt frames.

Data link sublayers:


 Logical Link Control (LLC) - communication between network software (upper layers) and
device hardware (lower layers). It puts info about which layer protocol is used in specific
frame. This info allows layer 3 protocols use the same network interface and media.
 Media Access Control (MAC) - it provides data link layer addressing and physical layer
integration. It is responsible for data encapsulation and Media Access Control from name.

Additional:

 LLC adds layer 2 control information to IPv4 or IPv6 frames to help deliver data.
 MAC controls NIC and other hardware responsible for sending or receiving data on LAN,
WAN and wireless connections

MAC sublayer provides data encapsulation:


 Frame delimiting – for determine fields of frame field
 Addressing – provides source and destination addressing for end devices working in the
same network on the same shared medium
 Error detection – provides detecting transmission errors

At each hop along the path, a router performs the following Layer 2 functions:

1. Accepts a frame from a medium


2. De-encapsulates the frame
3. Re-encapsulates the packet into a new frame
4. Forwards the new frame appropriate to the medium of that segment of the physical
network

Physical and logical topologies:


 Physical topology – identifies the physical connection between and devices and between
middle devices. It can be also names like rack 1.
 Logical topology – the way that network transfers frames from one node to next.

Data link layer sees only the logical topology when controlling data access to the media.

WAN topologies:
 Point to point, the simplest one, just one router connected to another
 Hub and spoke, more routers connected to one router in “hub” (in the middle)
 Mesh, more routers, every connected to each other

PPP – Point to Point Protocol, node puts frames on one end and second node takes these frames,
when between nodes there are more intermediary devices, the topology does not change, it will be
still point to point

LAN topologies:
 Star topology – all devices connected to one switch
 Extended star – similar to star, more switches

Old, non-used topologies:

 Bus – end devices connected like a chain to intermediate devices


 Ring – all end devices connected to a topology that looked like ring

Types of communications:
 Half duplex communication – while two or more hosts cannot send demands to server at the
same time, because there is only one data enter
 Full duplex communication – both devices can simultaneously transmit and receive on
shared media

It is important that two interconnected interfaces, such as a host NIC and an interface on an Ethernet
switch, operate using the same duplex mode. Otherwise, there will be a duplex mismatch creating
inefficiency and latency on the link.

Basic access control methods for sharing media:

 Contention-based access
 Control access

Contention based access:


There is a process while two or more devices transmit at the same time:

Carrier sense multiple access with collision detection (CSMA/CD) used on legacy bus-topology Ethernet
LANs. When there is a collision, two end devices will see the it and resend the frame. If frame is sent,
third host that want to send a frame, must wait because it is receiving the frame and I must wait until
channel is clear, then it recognises that frame is not for the third host, it is just ignoring it.

Carrier sense multiple access with collision avoidance (CSMA/CA) used on Wireless LANs. Works like, end
devices can see the frame of another end device so it is waiting until the channel is clear to avoid the
collision.

Control access:
Inefficient because end devices must wait for their turn to gain access, examples:

 Legacy Token Ring


 Legacy ARCNET
Today Ethernet networks operate on full-duplex so it is not useful anymore.

Frames:
Each frame has 3 basic parts:

 Header
 Data
 Trailer

Frame fields include the following:


 Frame start and stop indicator flags
 Addressing – indicates the source and destination address on the media
 Type – layer 3 protocol type
 Control – special flow control services such as QoS. QoS gives the frame priority. For
example, voice over IP usually receives this priority because it would be sensitive to delay
 Data
 Error detection
 Cyclic Redundancy Check (CRC) - checks logical summary of the contents in the frame.
 Frame Check Sequence (FCS) - in the ethernet trailer, provides a method for a receiving
node to determine transmission errors.

Data link layer protocols add trailer at the end for error detection because of interference or
distortion.

Layer 2 addressing:
 Data link layer provides also addressing.
 In the header it puts NIC for quicker determine for node whether it is for him or no.
 The frame header may also contain source layer 2 address.
 Physical addresses do not determine its network, but they are unique.
 Even if a device moves into different network it will stay with the same layer 2 address.
 Layer 2 addresses have no meaning beyond the local network.
 For a further communication between the networks, we need an intermediary device such
as router. It de-encapsulates the frame, removes layer 2 information and finds the shortest
path to get data to destination network, which it knows because of layer 3 addresses.

WAN and LAN frames:


WAN protocols have included:
 Point to point protocol (PPP)
 high level data link control (HDLC)
 Frame relay
 Asynchronous Transfer mode (ATM)
 X.25

This layer 2 protocols now have been replaced in the WAN by Ethernet.
In TCP/IP network, OSI layer 2 protocols work with IP in OSI layer 3.

Each protocol performs media access control in the layer 2 that means almost every device can be
a node while having NIC.

LAN uses high bandwidth technology, which is cost effective in relatively small area. Using this
technology in WAN would be not cost effective because of lower bandwidth capacity.

Data link layer protocols include:


 Ethernet
 802.11 Wireless
 Point-to-Point Protocol (PPP)
 High-Level Data Link Control (HDLC)
 Frame Relay

You might also like