Unit 2 Data Link Layer - Functions and its Prototocols
UNIT: Data Link Layer
Fig – 7 layers of OSI Model
1. Introduction to Data Link Layer
Definition:
The Data Link Layer (DLL) is the second layer in the OSI model.
It provides node-to-node delivery of frames and ensures reliable data
transfer over the physical link.
Functions:
Framing- Divides the stream of bits received into data
units called frames.
Physical addressing (MAC)
- If
frames are to be distributed to different systems on the same network, data
link layer adds a header to the frame to define the sender and receiver.
Error detection & correction - Used
for detecting and retransmitting damaged or lost frames and to prevent
duplication of frames. This is achieved through a trailer added at the end of
the frame.
Flow control
- If
the rate at which the data are absorbed by the receiver is less than the rate
produced in the sender ,the Data link layer imposes a flow control mechanism.
Access control (MAC) -
Used
to determine which device has control over the link at any given time.
2. Link Layer Addressing
Link Layer Address / MAC Address:
- Unique
identifier burned into NIC (Network Interface Card).
- 48-bit
address (usually written in hexadecimal, e.g., 00:A0:C9:14:C8:29)
- Assigned
by IEEE
Types of Addressing:
Type |
Description |
Unicast |
One-to-one (specific destination) |
Multicast |
One-to-many (group of devices) |
Broadcast |
One-to-all (all devices on LAN) |
Unicast Address : Each host or
each interface of a router is assigned a unicast address. Unicasting means
one-to-one communication. A frame with a unicast address destination is
destined only for one entity in the link.
Multicast
Address
: Link-layer protocols define multicast addresses. Multicasting means one-to many
Communication but not all.
Broadcast
Address
: Link-layer protocols define a broadcast address. Broadcasting means one to-all
communication. A frame with a destination broadcast address is sent to all
entities in the link.
MAC address vs
IP address
3. Error Detection and Error Correction
Types of Errors:
- Single-bit
error: Only one bit is altered.
- Burst
error: Two or more bits in a sequence
are altered.
Error Detection Techniques:
Method |
Description |
Parity Bit |
Adds one extra bit to make sum
even/odd |
Checksum |
Sum of data segments |
CRC (Cyclic Redundancy Check) |
Polynomial division method; highly
effective |
Error Correction:
- Uses
redundancy to detect and correct errors.
- Hamming
Code is a popular technique for single-bit
error correction.
4. Data Link Control
Manages the flow and reliability of data transfer between
devices.
Flow Control:
Ensures sender does not overwhelm receiver.
- Stop-and-Wait
ARQ
- Sliding
Window Protocol
(Go-Back-N, Selective Repeat)
Error Control:
- Uses
Acknowledgements (ACK) and Negative Acknowledgements (NAK)
- Retransmission
of lost or corrupted frames
5. Medium Access Control (MAC)
Determines how multiple devices access the shared
transmission medium.
Techniques:
Protocol Type |
Example Protocols |
Description |
Random Access |
ALOHA, CSMA/CD |
Devices transmit at will;
collisions possible |
Controlled Access |
Polling, Token Passing |
Devices take turns to access
medium |
Channelization |
FDMA, TDMA, CDMA |
Divide channel into
frequency/time/code |
6. Wired LANs: Ethernet
Ethernet Overview:
- Most
widely used LAN technology
- Based
on IEEE 802.3
- Uses
CSMA/CD (Carrier Sense Multiple Access with Collision Detection) in
shared Network Control Protocol mediums
Ethernet Frame Format:
Field |
Description |
Preamble |
Synchronization |
Destination MAC |
Receiver’s MAC address |
Source MAC |
Sender’s MAC address |
Type/Length |
Type of protocol (e.g., IPv4) |
Data |
Actual payload |
CRC |
Error checking |
7. Wireless LANs (WLAN)
Overview:
- Based
on IEEE 802.11
- Uses
radio frequency instead of cables
- Devices
communicate via Access Point (AP) or in ad hoc mode
Characteristics:
- Uses
CSMA/CA (Collision Avoidance)
- Supports
roaming, authentication, encryption
8. Other Wireless Networks
Technology |
Description |
Bluetooth (802.15) |
Short-range, PAN for connecting
devices |
WiMAX (802.16) |
Long-range wireless broadband |
Zigbee |
Low power, IoT sensor
communication |
Cellular Networks |
4G, 5G networks using base
stations |
9. Connecting Devices and Virtual
LANs (VLANs)
Connecting Devices:
Device |
Function |
Repeater |
Regenerates signal to extend
distance |
Hub |
Basic device that broadcasts data
to all |
Bridge |
Filters traffic, connects two LAN
segments |
Switch |
Multi-port bridge, connects
devices in LAN |
Router |
Connects different networks,
routes packets |
Gateway |
Protocol converter (e.g., between
networks) |
Virtual LANs (VLANs):
- Logical
subgroup within a physical LAN
- Devices
in the same VLAN can communicate as if they were on the same LAN
- Reduces
broadcast traffic,
improves security
Data Link Layer Protocols
Fig:- Data Link Layer Protocols
A. Synchronous Data Link
Protocol (SDLC) –
·
SDLC
is a computer communication protocol and was created and developed by IBM in
1975.
·
it supports multipoint links with error
recovery or correction.
·
It
is the predecessor to HDLC and is used to carry SNA (Systems Network
Architecture) traffic.
·
It
is also used to establish point-to-point (one-to-one) or point-to-multipoint
(one-to-many) connections between all of the remote devices and the mainframe
computers at the central locations.
·
Additionally,
it is used to ensure that data units move correctly and in the right order from
one network point to the next.
Basic Configurations followed by SDLC nodes:
1.
Point-to-Point
2.
Multipoint
3.
Loop
4.
Hub go-ahead
B. High-Level Data Link
Protocol (HDLC) –
·
HDLC
is a protocol that many Wide Area protocols..
·
It was first developed and created by ISO in
1979.
·
Generally speaking, this protocol is based on
SDLC.
it offers both reliable and unreliable service
with best effort.
·
Bit-oriented HDLC is a protocol that can be
used for both point-to-point and multipoint communications.
C. Serial Line Interface
Protocol (SLIP) –
·
The
only purpose of SLIP, an older protocol, is to add a framing byte to the end of
an IP packet.
·
It
functions essentially as a data link control facility that is necessary for the
dial-up IP packet transfer between an Internet Service Provider (ISP) and a
home user.
·
It
is an encapsulation of TCP/IP that was created specifically to work over
multiple router connections and serial ports for communication.
·
It
has some drawbacks, such as the absence of mechanisms for error detection or
correction.
1.
Two new special characters are introduced: END (decimal
192) and ESC (decimal 129). The two-byte sequence of ESC and octal 334 or ESC
and octal 335, depending on whether the
2.
Data byte code represents the END or ESC character, is
sent in a data packet.
3.
Since SLIP lacks a standard specification, there is no
maximum packet size. However, for both sending and receiving, the standard
value is 1006 bytes of datagram.
4.
When using SLIP, both the sender and the recipient
should be aware of each other’s IP addresses.
5.
For IP addressing, it only supports static assignment.
6.
Data is transferred synchronously.
7.
A payload (data) and a flag serving as an end delimiter
make up a SLIP frame.
Advantages:
1.
It can support a variety of network configurations,
including host-host, host-router, router-router, and others.
2.
Its low overhead makes it simple to use in
microcontrollers.
3.
Due to the widespread use of TCP/IP and the fact that it
is a simple packet protocol, it is simple to implement.
Disadvantages:
1.
It doesn’t perform any data authentication, and using
SLIP, IP addresses cannot be assigned dynamically.
2.
No type identification method is offered by SLIP. No
indication of the protocol type sent can be made. Therefore, SLIP connections
can only support one protocol at a time.
3.
It lacks a system for detecting or fixing errors during
data transmission.
4.
There is no way for hosts to exchange addressing
information over a SLIP connection.
5.
No compression features are offered by SLIP to increase
packet throughput. Although CSLIP was a variant used for the same purpose, it
did not find widespread adoption.
D. Point to Point
Protocol (PPP) –
The same functionality
as SLIP is essentially provided by PPP, which is a protocol. The most reliable
protocol is used to transport not only IP packets but also other kinds of
packets. Additionally, dial-up and leased router-router lines may need it. In
essence, it offers a framing technique to describe frames. This
character-oriented protocol also has an error-detection function. Additionally,
it is employed to deliver the NCP and LCP protocols. While NCP is used to
negotiate network-layer protocols, LCP is used to bring lines up, negotiate
options, and bring them down. It is necessary for similar serial interfaces to
HDLC.
Frame format of PPP
Features of PPP:
1.
Packet Framing - Network layer data
packet formulation within data link block.
2.
Multi-Protocol - Yield information from
any NCP network layer upwards at same time as demultiplex.
3.
Bit Transparency - Should carry
certain bit pattern in field of data.
4.
Error Detection - No modification.
E. Link Control Protocol
(LCP) –
It was first created and
developed by IEEE 802.2. Additionally, it is employed to offer HDLC-style
services on LAN. For the purposes of establishing, configuring, testing,
maintaining, and ending or terminating links for the transmission of data
frames, LCP is essentially a PPP protocol.
Fig :- Frame format of LCP
F. Link Access Procedure
(LAP) –
LAP protocols, or data
link layer protocols, are necessary for framing and moving data over
point-to-point links. It also has a few features for reliability services. LAPB
(Link Access Procedure Balanced), LAPD (Link Access Procedure D-Channel), and
LAPF are the three main types of LAP (Link Access Procedure Frame-Mode Bearer
Services). Actually, IBM SDLC, which is being submitted to the ISP purely for
standardisation, is where it came from.
G. Network Control
Protocol (NCP) –
NCP was an additional
older protocol that ARPANET used. In essence, it enables users to access
computers and a few other devices at distant locations and transfer files
between two or more computers. PPP is typically made up of a collection of
protocols. For every higher-layer protocol that PPP supports, NCP is always
available. TCP/IP took over from NCP in the 1980s.
Some more Data Link Layer protocols
1.
Address
Resolution Protocol (ARP)
2.
Cisco
Discovery Protocol (CDP)
3.
Fiber
Distributed Data Interface (FDDI)
4.
Link
Layer Discovery Protocol (LLDP)
5.
Multiprotocol
Label Switching (MPLS)
6.
Split
multi-link trunking (SMLT)
7.
Shortest
Path Bridging (IEEE 802.1aq)
8.
Unidirectional
Link Detection (UDLP)
Summary Chart
Topic |
Key Idea |
Data Link Layer |
Node-to-node communication |
Link Layer Addressing |
MAC address – unique hardware
address |
Error Detection/Correction |
Parity, CRC, Hamming code |
Data Link Control |
Flow & error control (ACK,
ARQ, sliding window) |
MAC Protocols |
CSMA/CD, CSMA/CA, Token Ring |
Ethernet |
IEEE 802.3 standard, wired LAN |
Wireless LANs |
IEEE 802.11, uses Access Points |
Other Wireless Networks |
Bluetooth, WiMAX, Zigbee |
Connecting Devices |
Hub, Switch, Router, etc. |
VLAN |
Logical segmentation of network |
DataLink Layer Protocols |
Protocols and its features |
Comments
Post a Comment