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

Unit 5 Data Link

The document discusses key concepts of the data link layer including its responsibilities of framing data and error control between network nodes. It describes the two sublayers of the data link layer - logical link control and media access control. Common data link layer protocols, framing techniques like bit stuffing and byte stuffing, and error control mechanisms like stop-and-wait ARQ, go-back-N ARQ, and selective repeat ARQ are also summarized.

Uploaded by

Sahul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

Unit 5 Data Link

The document discusses key concepts of the data link layer including its responsibilities of framing data and error control between network nodes. It describes the two sublayers of the data link layer - logical link control and media access control. Common data link layer protocols, framing techniques like bit stuffing and byte stuffing, and error control mechanisms like stop-and-wait ARQ, go-back-N ARQ, and selective repeat ARQ are also summarized.

Uploaded by

Sahul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

UNIT V DATA LINK AND PHYSICAL

LAYERS
• Data link layer is responsible for converting
data stream to signals bit by bit and to send
that over the underlying hardware.
• At the receiving end, Data link layer picks up
data from hardware which are in the form of
electrical signals, assembles them in a
recognizable frame format, and hands over to
upper layer.
• Data link layer has two sub-layers:
• Logical Link Control: It deals with protocols,
flow-control, and error control
• Media Access Control: It deals with actual control of
media
services of Data Link Layer:
• Framing
• Addressing
• Error Control
• Flow Control
• Framing Framing is a point-to-point connection between two computers
or devices consisting of a wire in which data is transmitted as a stream of
bits.
• However, these bits must be framed into discernible blocks of
information.
• Framing is a function of the data link layer.
• It provides a way for a sender to transmit a set of bits that are meaningful
to the receiver.
• Frames have headers that contain information such as error-checking
codes.
• At the data link layer, it extracts the message from the sender and
provides it to the receiver by providing the sender’s and receiver’s
addresses. The process of dividing the data into frames and reassembling
it is transparent to the user and is handled by the data link layer. Framing
is an important aspect of data link layer protocol design because it allows
the transmission of data to be organized and controlled
A frame has the following parts −
• Frame Header − It contains the source and the
destination addresses of the frame.
• Payload field − It contains the message to be delivered.
• Trailer − It contains the error detection and error
correction bits.
• Flag − It marks the beginning and end of the frame
Types of framing
• 1. Fixed-size: The frame is of fixed size and
there is no need to provide boundaries to the
frame, the length of the frame itself acts as a
delimiter.
• Drawback: It suffers from internal
fragmentation if the data size is less than the
frame size
• Solution: Padding
• Variable size: The size of the frame is variable
during this form of framing.
• In variable-size framing, we are in need of a
way to outline the tip of the frame and also
the starting of the succeeding frame.
• This can be utilized in local area networks
(LAN).
• 2.1 Length field–To confirm the length of the
field, a length field is used. It is utilized in
Ethernet (1EEE 802.3).
• 2.2 End Delimeter–To confirm the size of the
frame, a pattern is worn as a delimiter.
Bit Stuffing
• Bit-Oriented Framing Most protocols use a
special 8-bit pattern flag 01111110 as a result of
the delimiter to stipulate the beginning and so the
end of the frame.
• Bit stuffing is completed at the sender end and
bit removal at the receiver end.
• If we have a tendency to get a zero(0) after 5 1s.
we have a tendency to tend to still stuff a zero(0).
The receiver will remove the zero. Bit stuffing is in
addition said as bit stuffing.
Byte stuffing:

• In this method, start and end of frame are recognized


with the help of flag bytes. Each frames starts with and
ends with a flag byte.
• Two consecutive flag bytes indicate the end of one
frame and start of the next one. The flag bytes used in
the figure 2 used is named as “ESC” flag byte.
• A frame delimited by flag bytes. This framing method
is only applicable in 8-bit character codes which are a
major disadvantage of this method as not all character
codes use 8-bit characters e.g. Unicode.
• Four example of byte sequences before and after
stuffing:
Flow Control

• Flow control is a set of procedures that restrict


the amount of data a sender should send before it
waits for some acknowledgment from the
receiver.
• Flow Control is an essential function of the data link layer.
• It determines the amount of data that a sender can send.
• It makes the sender wait until an acknowledgment is
received from the receiver’s end.
• Methods of Flow Control are Stop-and-wait, and Sliding
window.
Stop-and-wait Protocol
• Stop-and-wait protocol works under the
assumption that the communication channel is
noiseless and transmissions are error-free.
Working :
• The sender sends data to the receiver
– The sender stops and waits for the
acknowledgment.
• The receiver receives the data and processes it.
• The receiver sends an acknowledgment for the
above data to the sender.
• The sender sends data to the receiver after receiving
the acknowledgment of previously sent data.
• The process is unidirectional and continues until the
sender sends the End of Transmission (EoT) frame.
Sliding window protocol
• Sliding Window Protocol
• The sliding window protocol is the flow control protocol for noisy
channels that allows the sender to send multiple frames even
before acknowledgments are received.
Working:
• The sender and receiver have a “window” of frames. A window is a
space that consists of multiple bytes. The size of the window on the
receiver side is always 1.
• Each frame is sequentially numbered from 0 to n - 1, where n is the
window size at the sender side.
• The sender sends as many frames as would fit in a window.
• After receiving the desired number of frames, the receiver sends an
acknowledgment. The acknowledgment (ACK) includes the number
of the next expected frame.
• we have sender
window and receiver
window each of size 4.
So the sequence
numbering of both the
windows will be
0,1,2,3,0,1,2 and so on.
The following diagram
shows the positions of
the windows after
sending the frames and
receiving
acknowledgments.
Error Control
• Error control in data link layer is the process of
detecting and correcting data frames that
have been corrupted or lost during
transmission.
• In case of lost or corrupted frames, the
receiver does not receive the correct
data-frame and sender is ignorant about the
loss. Data link layer follows a technique to
detect transit errors and Stop and Wait ARQ
The error control mechanism in data link layer involves the following
phases −

• • Detection of Error − Transmission error, if any, is detected by


either the sender or the receiver.
• • Acknowledgment − acknowledgment may be positive or
negative.
– o Positive ACK − On receiving a correct frame, the receiver sends a
positive acknowledge.
– o Negative ACK − On receiving a damaged frame or a duplicate frame,
the receiver sends a negative acknowledgment back to the sender.
• • Retransmission − The sender maintains a clock and sets a
timeout period. If an acknowledgment of a data-frame previously
transmitted does not arrive before the timeout, or a negative
acknowledgment is received, the sender retransmits the frame.
• Error control technique There are three main
techniques for error control
Stop and Wait ARQ
• This protocol involves the following transitions −
• • A timeout counter is maintained by the sender, which is
started when a frame is sent.
• • If the sender receives acknowledgment of the sent frame
within time, the sender is confirmed about successful
delivery of the frame. It then transmits the next frame in
queue.
• • If the sender does not receive the acknowledgment within
time, the sender assumes that either the frame or its
acknowledgment is lost in transit. It then retransmits the
frame.
• • If the sender receives a negative acknowledgment, the
sender retransmits the frame.
Go-Back-N ARQ
• The working principle of this protocol is −
• The sender has buffers called sending window.
• The sender sends multiple frames based upon the sending-window size,
without receiving the acknowledgment of the previous ones.

The receiver receives frames one by one. It keeps track of incoming frame’s
sequence number and sends the corresponding acknowledgment frames.
• After the sender has sent all the frames in window, it checks up to what
sequence number it has received positive acknowledgment.
• If the sender has received positive acknowledgment for all the frames, it
sends next set of frames.
• If sender receives NACK or has not receive any ACK for a particular frame, it
retransmits all the frames after which it does not receive any positive ACK
Selective Repeat ARQ
• • Both the sender and the receiver have buffers called
sending window and receiving window respectively
• . • The sender sends multiple frames based upon the
sending-window size, without receiving the
acknowledgment of the previous ones.
• • The receiver also receives multiple frames within the
receiving window size.
• • The receiver keeps track of incoming frame’s sequence
numbers, buffers the frames in memory.
• • It sends ACK for all successfully received frames and sends
NACK for only frames which are missing or damaged. • The
sender in this case, sends only packet for which NACK is
received.
Data link layer protocols
• Data link layer protocol is generally responsible to simply ensure
and confirm that the bits and bytes that are received are identical
to bits and bytes being transferred. SDLC, HDLC, SLIP, PPP, LCP,
LAP, and NCP are some of the data link layer protocols.
• SDLC: SDLC stands for synchronous data link control
protocol, is a communication protocol of a computer.
• It is usually used to carry system network architecture
traffic.
• Synchronous data link protocol connects all the remote
devices to the mainframe computer at the Central location.
• This connection is done in two formats, point to point
format i.e. one to one connection, and point to multipoint
format, i.e. one to many connections.
• SDLC support one to many connections even in case of error
detection or error recovery.
• SDLC ensures that all the received data units are correct and
flow is right from one network point to the next network
point.
• HDLC: HDLC stands for High-level data link control protocol, is a
bit-orientated code transparent synchronous protocol developed by ISO
(International organization for standardization) in1979.
• It provides both connection-orientated and connectionless services.
• HDLC protocol contains various wide-area protocols. It is based on the
SDLC protocol that supports both point-to-point and multipoint
communication.
• HDLC frames are transferred over synchronous or asynchronous serial
communication links. HDLC uses various modes such as normal response
mode, asynchronous response mode, asynchronous balanced mode.
• Normal response mode is used to share the secondary to primary link
without contention.
• asynchronous response mode is used for full-duplex links. asynchronous
balanced mode, support combined terminal which can act as both primary
and secondary
SLIP
• SLIP stands for Serial line interface protocol which is
used to add framing byte at the end of the IP Packet.
• SLIP is a data link layer protocol That transforms the IP
packets among ISP (Internet Service Providers) and
home user over dial-up links.
• SLIP is designed to work with ports and router
connections. SLIP does not provide error detection,
being reliant on upper-layer protocols for this.
Therefore, SLIP on its own is not satisfactory over an
error-prone dial-up connection.
LCP
• LCP stands for Link control protocol, is a part of
point-to-point control protocol. LCP packets
determine the standards of data transmission.
• LCP protocol is used to determine the identity of
the linked devices, if the device is correct it
accepts it otherwise it rejects the device.
• It also determines whether the size of the packet
is accepted or not.
• If requirements exceed the parameters, then the
link control protocol terminates that link
LAP
• LAP stands for Link access procedure is a data link
layer protocol that is used for framing and
transfer the data across point-to-point links.
• There are three types of Link access procedure –
LAPB ( Link Access procedure balanced),LAPF (
Link Access Procedure Frame-Mode Bearer
Services), and LAPD (Link Access Procedure
D-Channel.
• LAP was originally derived from HDLC (High-Level
Data Link Control), but was later updated and
renamed LAPB (LAP Balanced)
PPP

• PPP Point - to - Point Protocol (PPP) is a


communication protocol of the data link layer
that is used to transmit multiprotocol data
between two directly connected
(point-to-point) computers. It is a byte -
oriented protocol that is widely used in
broadband communications having heavy
loads and high speeds.
NCP
• NCP: NCP stands for Network control protocol, is a
part of the point-to-point protocol. The network
control protocol is used to negotiate the parameter
and facilities for the network layer.
• For every higher-layer protocol supported by PPP, one
NCP is there. IPCP ( Internet Protocol control
protocol), DNCP (DECnet Phase IV Control Protocol),
OSINLCP (OSI Network Layer Control Protocol), IPXCP
(Internetwork Packet Exchange Control Protocol),
NBFCP (NetBIOS Frames Control Protocol), IPV6CP
(IPv6 Control Protocol) are some of the NCPs
PPP
• PPP: PPP stands for Point to point protocol.
• PPP is a data link layer protocol that provides the same services as
the Serial line interface protocol.
• It is a robust protocol that transfers the other types of pockets
also with the IP packets.
• It provides two protocols LCP and NCP, that we will discuss in the
next section. Point to point protocol uses framing methods that
describe the frames.
• Point to point protocol is also called character orientated protocol
which is used to detect errors.
• PPC provides Connection authentication, data compression,
encryption, and transmission. It is used over various networks
such as phone lines, cellular telephones, serial cables, trunk lines,
ISDNs, Specialized radio links, etc.
HDLC High-level Data Link Control
(HDLC)
• HDLC High-level Data Link Control (HDLC) is a
group of communication protocols of the data link
layer for transmitting data between network
points or nodes.
• Since it is a data link protocol, data is organized
into frames. A frame is transmitted via the
network to the destination that verifies its
successful arrival.
• It is a bit - oriented protocol that is applicable for
both point - to - point and multipoint
communications.
• Transfer Modes HDLC supports two types of
transfer modes, normal response mode and
asynchronous balanced mode.
• Normal Response Mode (NRM) − Here, two types of
stations are there, a primary station that send
commands and secondary station that can respond
to received commands. It is used for both point - to -
point and multipoint communications.
• Asynchronous Balanced Mode (ABM) − Here,
the configuration is balanced, i.e. each station
can both send commands and respond to
commands. It is used for only point - to - point
communications.
• HDLC Frame HDLC is a bit - oriented protocol where each frame contains up to six fields.
• The structure varies according to the type of frame. The fields of a HDLC frame are −
• • Flag − It is an 8-bit sequence that marks the beginning and the end of the frame. The bit
pattern of the flag is 01111110.
• • Address − It contains the address of the receiver. If the frame is sent by the primary station,
it contains the address(es) of the secondary station(s).
• If it is sent by the secondary station, it contains the address of the primary station.
• The address field may be from 1 byte to several bytes.
• • Control − It is 1 or 2 bytes containing flow and error control information.
• • Payload − This carries the data from the network layer. Its length may vary from one network
to another.
• • FCS − It is a 2 byte or 4 bytes frame check sequence for error detection. The standard code
used is CRC (cyclic redundancy code)
Point - to - Point Protocol (PPP)
• Point - to - Point Protocol (PPP) is a
communication protocol of the data link layer
that is used to transmit multiprotocol data
between two directly connected
(point-to-point) computers.
• It is a byte - oriented protocol that is widely
used in broadband communications having
heavy loads and high speeds
• Components of PPP Point - to - Point Protocol is a layered protocol having three
components −
• • Encapsulation Component − It encapsulates the datagram so that it can be
transmitted over the specified physical layer.
• • Link Control Protocol (LCP) − It is responsible for establishing, configuring, testing,
maintaining and terminating links for transmission. It also imparts negotiation for set
up of options and use of features by the two endpoints of the links.
• • Authentication Protocols (AP) − These protocols authenticate endpoints for use of
services. The two authentication protocols of PPP are − o Password Authentication
Protocol (PAP) o Challenge Handshake Authentication Protocol (CHAP)
• • Network Control Protocols (NCPs) − These protocols are used for negotiating the
parameters and facilities for the network layer. For every higher-layer protocol
supported by PPP, one NCP is there. Some of the NCPs of PPP are − o Internet
Protocol Control Protocol (IPCP) o OSI Network Layer Control Protocol (OSINLCP) o
Internetwork Packet Exchange Control Protocol (IPXCP) o DECnet Phase IV Control
Protocol (DNCP) o NetBIOS Frames Control Protocol (NBFCP) o IPv6 Control Protocol
(IPV6CP)
• PPP Frame PPP is a byte - oriented protocol where
each field of the frame is composed of one or more
bytes.
• The fields of a PPP frame are −
• • Flag − 1 byte that marks the beginning and the end
of the frame. The bit pattern of the flag is 01111110.
• • Address − 1 byte which is set to 11111111 in case of
broadcast.
• Control − 1 byte set to a constant value of 11000000.
• Protocol − 1 or 2 bytes that define the type of data
contained in the payload field.
• Payload − This carries the data from the network layer.
The maximum length of the payload field is 1500
bytes. However, this may be negotiated between the
endpoints of communication. • FCS − It is a 2 byte or 4
bytes frame check sequence for error detection. The
standard code used is CRC (cyclic redundancy code)
Media Access Control
• The medium access control (MAC) is a sublayer of the data
link layer. It is responsible for flow control and multiplexing
for transmission medium. It controls the transmission of
data packets via remotely shared channels. It sends data
over the network interface card.
• MAC Layer in the OSI Model The Open System
Interconnections (OSI) model is a layered networking
framework that conceptualizes how communications
should be done between heterogeneous systems.
The data link layer is the second lowest layer.
It is divided into two sublayers −
• The logical link control (LLC) sublayer
• The medium access control (MAC) sublayer
MAC Addresses
• MAC address or media access control address is a unique
identifier allotted to a network interface controller (NIC) of
a device.
• It is used as a network address for data transmission within
a network segment like Ethernet, Wi-Fi, and Bluetooth.
• MAC address is assigned to a network adapter at the time
of manufacturing.
• It is hardwired or hard-coded in the network interface card
(NIC). A MAC address comprises of six groups of two
hexadecimal digits, separated by hyphens, colons, or no
separators. An example of a MAC address is
00:0A:89:5B:F0:11
ALOHA
• ALOHA is a system for coordinating and arbitrating
access to a shared communication Networks channel.
A shared communication system like ALOHA requires a
method of handling collisions that occur when two or
more systems attempt to transmit on the channel at
the same time.
• Aloha means "Hello". Aloha is a multiple access
protocol at the datalink layer and proposes how
multiple terminals access the medium without
interference or collision.
Ethernet Basics
• Ethernet is a set of technologies and protocols
that are used primarily in LANs. However,
Ethernet can also be used in MANs and even
WANs. It was first standardized in the 1980s as
IEEE 802.3 standard. Since then, it has gone
through four generations, as shown in the
following chart

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy