Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Error Control in Data Link Layer

DLL uses the techniques of error control simply to ensure and confirm that all
the data frames or packets, i.e. bit streams of data, are transmitted or
transferred from sender to receiver with certain accuracy.
Using or providing error control at this data link layer is an optimization, it
was never a requirement.
Error control is basically process in data link layer of detecting or identifying
and re-transmitting data frames that might be lost or corrupted during
transmission.
In both of these cases, receiver or destination does not receive correct data
frame and sender or source does not even know anything about any such
loss regarding data frames.
Therefore, in such type of cases, both sender and receiver are provided with
some essential protocols that are required to detect or identify such types of
errors as loss of data frames.
The Data-link layer follows a technique known as re-transmission of frames
to detect or identify transit errors and also to take necessary actions that are
required to reduce or remove such errors.
Each and every time an error is detected during transmission, particular
data frames are retransmitted and this process is known as ARQ (Automatic
Repeat Request).

Error control can be done in 2 ways:


1)Error detection 2) Error Correction:
Error Detection : Error detection, as the name suggests, simply means
detection or identification of errors. These errors may occur due to noise or
any other impairments during transmission from transmitter to the receiver,
in communication system. It is a class of techniques for detecting garbled i.e.
unclear and distorted data or messages.
Error Correction : Error correction, as the name suggests, simply means
correction or solving or fixing of errors. It simply means reconstruction and
rehabilitation of original data that is error-free. But error correction method
is very costly and very hard.
Various Techniques for Flow Control : There are various techniques of
error control as given below :
1. Stop-and-Wait ARQ : Stop-and-Wait ARQ is also known as alternating
bit protocol. It is one of the simplest flow and error control techniques or
mechanisms. This mechanism is generally required in telecommunications to
transmit data or information between two connected devices. Receiver simply
indicates its readiness to receive data for each frame. In these, sender sends
information or data packets to receiver. Sender then stops and waits for ACK
(Acknowledgment) from receiver. Further, if ACK does not arrive within given
time period i.e., time-out, sender then again resends frame and waits for
ACK. But, if sender receives ACK, then it will transmit the next data packet to
receiver and then again wait for ACK from receiver. This process to stop and
wait continues until sender has no data frame or packet to send.
2. Sliding Window ARQ

This technique is generally used for continuous transmission error control. It


is further categorized into two categories as given below :
Go-Back-N ARQ : Go-Back-N ARQ is form of ARQ protocol in which
transmission process continues to send or transmit total number of frames
that are specified by window size even without receiving an ACK
(Acknowledgement) packet from the receiver. It uses sliding window flow
control protocol. If no errors occur, then operation is identical to sliding
window.
Selective Repeat ARQ : Selective Repeat ARQ is also form of ARQ protocol
in which only suspected or damaged or lost data frames are only
retransmitted. This technique is similar to Go-Back-N ARQ though much
more efficient than the Go-Back-N ARQ technique due to reason that it
reduces number of retransmission. In this, the sender only retransmits
frames for which NAK is received. But this technique is used less because of
more complexity between sender and receiver and each frame must be
needed to be acknowledged individually.
The main difference between Go Back ARQ and Selective Repeat ARQ is that
in Go Back ARQ, the sender has to retransmit the whole window of frame
again if any of the frame is lost but in Selective Repeat ARQ only the data
frame that is lost is retransmitted.

Flow Control in Data Link Layer


Flow control is design issue at Data Link Layer.
It is a technique that generally observes the proper flow of data from sender
to receiver.
It is very essential because it is possible for sender to transmit data or
information at very fast rate and hence receiver can receive this information
and process it.
This can happen only if receiver has very high load of traffic as compared to
sender, or if receiver has power of processing less as compared to sender.
Flow control is basically a technique that gives permission to two of stations
that are working and processing at different speeds to just communicate with
one another.
Flow control in Data Link Layer simply restricts and coordinates number of
frames or amount of data sender can send just before it waits for an
acknowledgement from receiver.
Flow control is actually set of procedures that explains sender about how
much data or frames it can transfer or transmit before data overwhelms
receiver.
The receiving device also contains only limited amount of speed and memory
to store data. This is why receiving device should be able to tell or inform the
sender about stopping the transmission or transferring of data on temporary
basis before it reaches limit. It also needs buffer, large block of memory for
just storing data or frames until they are processed.
Flow control is of 2 types:

Feedback – based Flow Control : In this control technique, sender simply


transmits data or information or frame to receiver, then receiver transmits
data back to sender and also allows sender to transmit more amount of data
or tell sender about how receiver is processing or doing. This simply means
that sender transmits data or frames after it has received acknowledgements
from user.
Rate – based Flow Control : In this control technique, usually when sender
sends or transfer data at faster speed to receiver and receiver is not being
able to receive data at the speed, then mechanism known as built-in
mechanism in protocol will just limit or restricts overall rate at which data or
information is being transferred or transmitted by sender without any
feedback or acknowledgement from receiver.

Stop-and-Wait Flow Control : This method is the easiest and simplest form of flow
control. In this method, basically message or data is broken down into various multiple
frames, and then receiver indicates its readiness to receive frame of data. When
acknowledgement is received, then only sender will send or transfer the next frame.
This process is continued until sender transmits EOT (End of Transmission) frame. In
this method, only one of frames can be in transmission at a time. It leads to
inefficiency i.e. less productivity if propagation delay is very much longer than the
transmission delay and Ultimately In this method sender sent single frame and
receiver take one frame at a time and sent acknowledgement(which is next frame
number only) for new frame.

Advantages –
This method is very easiest and simple and each of the frames is checked and acknowledged well.
This method is also very accurate.
Disadvantages –
This method is fairly slow.
In this, only one packet or frame can be sent at a time.
It is very inefficient and makes the transmission process very slow.
2. Sliding Window Flow Control : This method is required where reliable in-order delivery of packets or
frames is very much needed like in data link layer. It is point to point protocol that assumes that none of the
other entity tries to communicate until current data or frame transfer gets completed. In this method,
sender transmits or sends various frames or packets before receiving any acknowledgement. In this method,
both the sender and receiver agree upon total number of data frames after which acknowledgement is
needed to be transmitted. Data Link Layer requires and uses this method that simply allows sender to have
more than one unacknowledged packet “in-flight” at a time. This increases and improves network
throughput. and Ultimately In this method sender sent multiple frame but receiver take one by one
and after completing one frame acknowledge(which is next frame number only) for new frame.
Advantages –
It performs much better than stop-and-wait flow control.
This method increases efficiency.
Multiples frames can be sent one after another.
Disadvantages –
The main issue is complexity at the sender and receiver due to the transferring of multiple frames.
The receiver might receive data frames or packets out the sequence.
Connection-oriented service and Connection-less service

Both Connection-oriented service and Connection-less service are used for


the connection establishment between two or more two devices.
These types of services are offered by the network layer.

Connection-oriented service is related to the telephone system.


It includes connection establishment and connection termination. In a
connection-oriented service, the Handshake method is used to establish the
connection between sender and receiver.
Connection-less service is related to the postal system. It does not include
any connection establishment and connection termination. Connection-less
Service does not give a guarantee of reliability. In this, Packets do not follow
the same path to reach their destination.

NO Connection-oriented Service Connection-less Service

Connection-oriented service is Connection-less service is related to


1.
related to the telephone system. the postal system.

Connection-oriented service is
Connection-less Service is preferred
2. preferred by long and steady
by bursty communication.
communication.
Connection-oriented Service is Connection-less Service is not
3.
necessary. compulsory.
Connection-oriented Service is Connection-less Service is not
4.
feasible. feasible.

In connection-oriented Service, In connection-less Service,


5.
Congestion is not possible. Congestion is possible.

Connection-oriented Service Connection-less Service does not give


6.
gives the guarantee of reliability. a guarantee of reliability.

In connection-oriented Service, In connection-less Service, Packets


7.
Packets follow the same route. do not follow the same route.

Connection-oriented services
Connection-less Service requires a
8. require a bandwidth of a high
bandwidth of low range.
range.
Ex: TCP (Transmission Control
9. Ex: UDP (User Datagram Protocol)
Protocol)
Connection-oriented requires Connection-less Service does not
10.
authentication. require authentication.
IPv4 and IPv6

The address through which any computer communicates with our computer
is simply called an Internet Protocol Address or IP address.
For example, If we want to load a web page or we want to download
something, we require the address for delivery of that particular file or
webpage. That address is called an IP Address.
Types of IP Addresses
IPv4 (Internet Protocol Version 4)
IPv6 (Internet Protocol Version 6)
IPv4
IPv4 address consists of two things that are the network address and the
host address. It stands for Internet Protocol version four. It was
introduced in 1981 by DARPA and was the first deployed version in 1982 for
production on SATNET and on the ARPANET in January 1983.
IPv4 addresses are 32-bit integers that have to be expressed in Decimal
Notation. It is represented by 4 numbers separated by dots in the range of
0-255, which have to be converted to 0 and 1, to be understood by
Computers. For Example, An IPv4 Address can be written
as 189.123.123.90.
IPv4 Address Format
IPv4 Address Format is a 32-bit Address that comprises binary digits
separated by a dot (.).
IPv6
IPv6 is based on IPv4 and stands for Internet Protocol version 6. It was first
introduced in December 1995 by Internet Engineering Task Force. IP version
6 is the new version of Internet Protocol, which is way better than IP version
4 in terms of complexity and efficiency. IPv6 is written as a group of 8
hexadecimal numbers separated by colon (:). It can be written as 128 bits of
0s and 1s.
IPv6 Address Format
IPv6 Address Format is a 128-bit IP Address, which is written in a group of 8
hexadecimal numbers separated by colon (:).
Benefits of IPv6
The recent Version of IP IPv6 has a greater advantage over IPv4. Here are
some of the mentioned benefits:
Larger Address Space: IPv6 has a greater address space than IPv4, which
is required for expanding the IP Connected Devices. IPv6 has 128 bit IP
Address rather and IPv4 has a 32-bit Address.
Improved Security: IPv6 has some improved security which is built in with
it. IPv6 offers security like Data Authentication, Data Encryption, etc. Here,
an Internet Connection is more Secure.
Simplified Header Format: As compared to IPv4, IPv6 has a simpler and
more effective header Structure, which is more cost-effective and also
increases the speed of Internet Connection.
Prioritize: IPv6 contains stronger and more reliable support for QoS
features, which helps in increasing traffic over websites and increases audio
and video quality on pages.
Improved Support for Mobile Devices: IPv6 has increased and better
support for Mobile Devices. It helps in making quick connections over other
Mobile Devices and in a safer way than IPv4.

IPv4 IPv6
IPv4 has a 32-bit address length IPv6 has a 128-bit address length
It Supports Manual and DHCP It supports Auto and renumbering
address configuration address configuration
In IPv4 end to end, connection In IPv6 end-to-end, connection
integrity is Unachievable integrity is Achievable
The address space of IPv6 is quite
It can generate 4.29×109 address
large it can produce 3.4
space
×1038 address space
The Security feature is dependent on IPSEC is an inbuilt security feature in
the application the IPv6 protocol
Address representation of IPv4 is in Address Representation of IPv6 is in
decimal hexadecimal
Fragmentation performed by Sender In IPv6 fragmentation is performed
and forwarding routers only by the sender
In IPv6 packet flow identification are
In IPv4 Packet flow identification is
Available and uses the flow label field
not available
in the header
In IPv6 checksum field is not
In IPv4 checksum field is available
available
In IPv6 multicast and anycast
It has a broadcast Message
message transmission scheme is
Transmission Scheme
available
In IPv6 Encryption and
In IPv4 Encryption and
Authentication are provided
Authentication facility not provided

IPv6 has a header of 40 bytes fixed


IPv4 has a header of 20-60 bytes.

IPv4 can be converted to IPv6 Not all IPv6 can be converted to IPv4
IPv4 consists of 4 fields which are IPv6 consists of 8 fields, which are
separated by addresses dot (.) separated by a colon (:)
IPv4’s IP addresses are divided into
IPv6 does not have any classes of the
five different classes. Class A , Class
IP address.
B, Class C, Class D , Class E.
IPv4 supports VLSM(Variable Length
IPv6 does not support VLSM.
subnet mask).
Example of IPv6:
Example of IPv4: 66.94.29.13 2001:0000:3238:DFE1:0063:0000:0
000:FEFB

Framing in Data Link Layer and its types


Frames are the units of digital transmission, particularly in computer
networks and telecommunications.
Frames are comparable to the packets of energy called photons in the case
of light energy. Frame is continuously used in Time Division Multiplexing
process.
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.
Ethernet, token ring, frame relay, and other data link layer technologies have
their own frame structures.
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
advantage of using frames is that data is broken up into recoverable chunks
that can easily be checked for corruption.

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, ensuring that
the data is delivered accurately and efficiently.
Problems in Framing
Detecting start of the frame: When a frame is transmitted, every station
must be able to detect it. Station detects frames by looking out for a special
sequence of bits that marks the beginning of the frame i.e. SFD (Starting
Frame Delimiter).
How does the station detect a frame: Every station listens to link for SFD
pattern through a sequential circuit. If SFD is detected, sequential circuit
alerts station. Station checks destination address to accept or reject frame.
Detecting end of frame: When to stop reading the frame.
Handling errors: Framing errors may occur due to noise or other
transmission errors, which can cause a station to misinterpret the frame.
Therefore, error detection and correction mechanisms, such as cyclic
redundancy check (CRC), are used to ensure the integrity of the frame.
Types of framing
There are two 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

2. Variable size: In this, there is a need to define the end of the frame as
well as the beginning of the next frame to distinguish. This can be done in
two ways:
Length field – We can introduce a length field in the frame to indicate the
length of the frame. Used in Ethernet(802.3). The problem with this is
that sometimes the length field might get corrupted.
End Delimiter (ED) – We can introduce an ED(pattern) to indicate the
end of the frame. Used in Token Ring. The problem with this is that ED
can occur in the data.

You might also like