CN Unit-Iii
CN Unit-Iii
CN Unit-Iii
Protocols in the data link layer are designed so that this layer can perform its basic
functions: framing, error control and flow control. Framing is the process of dividing bit -
streams from physical layer into data frames whose size ranges from a few hundred to
a few thousand bytes. Error control mechanisms deals with transmission errors and
retransmission of corrupted and lost frames. Flow control regulates speed of delivery
and so that a fast sender does not drown a slow receiver.
Simplex Protocol
The Simplex protocol is hypothetical protocol designed for unidirectional data
transmission over an ideal channel, i.e. a channel through which transmission can
never go wrong. It has distinct procedures for sender and receiver. The sender simply
sends all its data available onto the channel as soon as they are available its buffer.
The receiver is assumed to process all incoming data instantly. It is hypothetical since it
does not handle flow control or error control.
Go – Back – N ARQ
Go – Back – N ARQ provides for sending multiple frames before receiving the
acknowledgement for the first frame. It uses the concept of sliding window, and so is
also called sliding window protocol. The frames are sequentially numbered and a finite
number of frames are sent. If the acknowledgement of a frame is not received within
the time period, all frames starting from that frame are retransmitted.
In this technique, each frame has sent from the sequence number. The sequence
numbers are used to find the missing data in the receiver end. The purpose of the
sliding window technique is to avoid duplicate data, so it uses the sequence number.
1. Go-Back-N ARQ
2. Selective Repeat ARQ
Go-Back-N ARQ
Go-Back-N ARQ protocol is also known as Go-Back-N Automatic Repeat Request. It is a
data link layer protocol that uses a sliding window method. In this, if any frame is
corrupted or lost, all subsequent frames have to be sent again.
The size of the sender window is N in this protocol. For example, Go-Back-8, the size of
the sender window, will be 8. The receiver window size is always 1.
If the receiver receives a corrupted frame, it cancels it. The receiver does not accept a
corrupted frame. When the timer expires, the sender sends the correct frame again. The
design of the Go-Back-N ARQ protocol is shown below.
The example of Go-Back-N ARQ is shown below in the figure.
Selective Repeat ARQ
Selective Repeat ARQ is also known as the Selective Repeat Automatic Repeat Request.
It is a data link layer protocol that uses a sliding window method. The Go-back-N ARQ
protocol works well if it has fewer errors. But if there is a lot of error in the frame, lots of
bandwidth loss in sending the frames again. So, we use the Selective Repeat ARQ
protocol. In this protocol, the size of the sender window is always equal to the size of
the receiver window. The size of the sliding window is always greater than 1.
If the receiver receives a corrupt frame, it does not directly discard it. It sends a negative
acknowledgment to the sender. The sender sends that frame again as soon as on the
receiving negative acknowledgment. There is no waiting for any time-out to send that
frame. The design of the Selective Repeat ARQ protocol is shown below.
The example of the Selective Repeat ARQ protocol is shown below in the figure.
If a frame is corrupted or lost in it,all subsequent In this, only the frame is sent again, which is corrupted or
frames have to be sent again. lost.
If it has a high error rate,it wastes a lot of There is a loss of low bandwidth.
bandwidth.
It does not require sorting. In this, sorting is done to get the frames in the correct
order.
T = 1/(U*C-L)
T(FDM) = N*T(1/U(C/N)-L/N)
Where,
1. Station Model:
Assumes that each of N stations independently produce frames. The
probability of producing a packet in the interval IDt where I is the
constant arrival rate of new frames.
3. Collision Assumption:
If two frames overlap in time-wise, then that’s collision. Any collision is
an error, and both frames must re transmitted. Collisions are only
possible error.
Protocol Assumption:
N independent stations.
A station is blocked until its generated frame is transmitted.
probability of a frame being generated in a period of length Dt is IDt
where I is the arrival rate of frames.
Only a single Channel available.
Time can be either: Continuous or slotted.
Carrier Sense: A station can sense if a channel is already busy before
transmission.
No Carrier Sense: Time out used to sense loss data.
Multiple access protocol- ALOHA, CSMA,
CSMA/CA and CSMA/CD
Data Link Layer
The data link layer is used in a computer network to transmit the data between two
devices or nodes. It divides the layer into parts such as data link control and
the multiple access resolution/protocol. The upper layer has the responsibility to flow
control and the error control in the data link layer, and hence it is termed as logical of
data link control. Whereas the lower sub-layer is used to handle and reduce the
collision or multiple access on a channel. Hence it is termed as media access control or
the multiple access resolutions.
For example, suppose that there is a classroom full of students. When a teacher asks a
question, all the students (small channels) in the class start answering the question at
the same time (transferring the data simultaneously). All the students respond at the
same time due to which data is overlap or data lost. Therefore it is the responsibility of a
teacher (multiple access protocol) to manage the students and make them one answer.
Following are the types of multiple access protocol that is subdivided into the different process
as:
A. Random Access Protocol
In this protocol, all the station has the equal priority to send the data over a channel. In random
access protocol, one or more stations cannot depend on another station nor any station control
another station. Depending on the channel's state (idle or busy), each station transmits the data
frame. However, if more than one station sends the data over a channel, there may be a collision
or data conflict. Due to the collision, the data frame packets may be lost or changed. And hence,
it does not receive by the receiver end.
Following are the different methods of random-access protocols for broadcasting frames on the
channel.
o Aloha
o CSMA
o CSMA/CD
o CSMA/CA
It is designed for wireless LAN (Local Area Network) but can also be used in a shared medium
to transmit data. Using this method, any station can transmit data across a network
simultaneously when a data frameset is available for transmission.
Aloha Rules
Pure Aloha
Whenever data is available for sending over a channel at stations, we use Pure Aloha. In pure
Aloha, when each station transmits data to a channel without checking whether the channel is
idle or not, the chances of collision may occur, and the data frame can be lost. When any station
transmits the data frame to a channel, the pure Aloha waits for the receiver's acknowledgment. If
it does not acknowledge the receiver end within the specified time, the station waits for a random
amount of time, called the backoff time (Tb). And the station may assume the frame has been
lost or destroyed. Therefore, it retransmits the frame until all the data are successfully transmitted
to the receiver.
Slotted Aloha
The slotted Aloha is designed to overcome the pure Aloha's efficiency because pure Aloha has a
very high possibility of frame hitting. In slotted Aloha, the shared channel is divided into a fixed
time interval called slots. So that, if a station wants to send a frame to a shared channel, the
frame can only be sent at the beginning of the slot, and only one frame is allowed to be sent to
each slot. And if the stations are unable to send data to the beginning of the slot, the station will
have to wait until the beginning of the slot for the next time. However, the possibility of a
collision remains when trying to send a frame at the beginning of two or more station time slot.
It is a carrier sense multiple access based on media access protocol to sense the traffic on a
channel (idle or busy) before transmitting the data. It means that if the channel is idle, the station
can send data to the channel. Otherwise, it must wait until the channel becomes idle. Hence, it
reduces the chances of a collision on a transmission medium.
1-Persistent: In the 1-Persistent mode of CSMA that defines each node, first sense the shared
channel and if the channel is idle, it immediately sends the data. Else it must wait and keep track
of the status of the channel to be idle and broadcast the frame unconditionally as soon as the
channel is idle.
Non-Persistent: It is the access mode of CSMA that defines before transmitting the data, each
node must sense the channel, and if the channel is inactive, it immediately sends the data.
Otherwise, the station must wait for a random time (not continuously), and when the channel is
found to be idle, it transmits the frames.
CSMA/ CD
It is a carrier sense multiple access/ collision detection network protocol to transmit data
frames. The CSMA/CD protocol works with a medium access control layer. Therefore, it first
senses the shared channel before broadcasting the frames, and if the channel is idle, it transmits a
frame to check whether the transmission was successful. If the frame is successfully received, the
station sends another frame. If any collision is detected in the CSMA/CD, the station sends a
jam/ stop signal to the shared channel to terminate data transmission. After that, it waits for a
random time before sending a frame to a channel.
CSMA/ CA
Following are the methods used in the CSMA/ CA to avoid the collision:
Interframe space: In this method, the station waits for the channel to become idle, and if it
gets the channel is idle, it does not immediately send the data. Instead of this, it waits for some
time, and this time period is called the Interframe space or IFS. However, the IFS time is often
used to define the priority of the station.
Contention window: In the Contention window, the total time is divided into different slots.
When the station/ sender is ready to transmit the data frame, it chooses a random slot number of
slots as wait time. If the channel is still busy, it does not restart the entire process, except that it
restarts the timer only to send data packets when the channel is inactive.
Acknowledgment: In the acknowledgment method, the sender station sends the data frame to
the shared channel if the acknowledgment is not received ahead of time.
C. Channelization Protocols
It is a channelization protocol that allows the total usable bandwidth in a shared channel to be
shared across multiple stations based on their time, distance and codes. It can access all the
stations at the same time to send the data frames to the channel.
Following are the various methods to access the channel based on their time, distance
and codes:
FDMA
It is a frequency division multiple access (FDMA) method used to divide the available
bandwidth into equal bands so that multiple users can send data through a different
frequency to the subchannel. Each station is reserved with a particular band to prevent
the crosstalk between the channels and interferences of stations.
TDMA
Time Division Multiple Access (TDMA) is a channel access method. It allows the same
frequency bandwidth to be shared across multiple stations. And to avoid collisions in
the shared channel, it divides the channel into different frequency slots that allocate
stations to transmit the data frames. The same frequency bandwidth into the shared
channel by dividing the signal into various time slots to transmit it. However, TDMA has
an overhead of synchronization that specifies each station's time slot by adding
synchronization bits to each slot.
CDMA
The code division multiple access (CDMA) is a channel access method. In CDMA, all
stations can simultaneously send the data over the same channel. It means that it allows
each station to transmit the data frames with full frequency on the shared channel at all
times. It does not require the division of bandwidth on a shared channel based on time
slots. If multiple stations send data to a channel simultaneously, their data frames are
separated by a unique code sequence. Each station has a different unique code for
transmitting the data over a shared channel. For example, there are multiple users in a
room that are continuously speaking. Data is received by the users if only two-person
interact with each other using the same language. Similarly, in the network, if different
stations communicate with each other simultaneously with different code language.
Wireless Communication - Bluetooth
Bluetooth wireless technology is a short range communications technology intended to
replace the cables connecting portable unit and maintaining high levels of security.
Bluetooth technology is based on Ad-hoc technology also known as Ad-hoc Pico
nets, which is a local area network with a very limited coverage.
History of Bluetooth
WLAN technology enables device connectivity to infrastructure based services through
a wireless carrier provider. The need for personal devices to communicate wirelessly
with one another without an established infrastructure has led to the emergence
of Personal Area Networks (PANs).
Ericsson's Bluetooth project in 1994 defines the standard for PANs to
enable communication between mobile phones using low power and low
cost radio interfaces.
In May 1988, Companies such as IBM, Intel, Nokia and Toshiba joined
Ericsson to form the Bluetooth Special Interest Group (SIG) whose aim
was to develop a defacto standard for PANs.
IEEE has approved a Bluetooth based standard named IEEE 802.15.1 for
Wireless Personal Area Networks (WPANs). IEEE standard covers MAC
and Physical layer applications.
Bluetooth specification details the entire protocol stack. Bluetooth employs Radio
Frequency (RF) for communication. It makes use of frequency modulation to generate
radio waves in the ISM band.
The usage of Bluetooth has widely increased for its special features.
Bluetooth offers a uniform structure for a wide range of devices to connect
and communicate with each other.
Bluetooth technology has achieved global acceptance such that any
Bluetooth enabled device, almost everywhere in the world, can be
connected with Bluetooth enabled devices.
Low power consumption of Bluetooth technology and an offered range of
up to ten meters has paved the way for several usage models.
Bluetooth offers interactive conference by establishing an adhoc network
of laptops.
Bluetooth usage model includes cordless computer, intercom, cordless
phone and mobile phones.
Piconets and Scatternets
Bluetooth enabled electronic devices connect and communicate wirelessly through
shortrange devices known as Piconets. Bluetooth devices exist in small ad-hoc
configurations with the ability to act either as master or slave the specification allows a
mechanism for master and slave to switch their roles. Point to point configuration with
one master and one slave is the simplest configuration.
When more than two Bluetooth devices communicate with one another, this is called
a PICONET. A Piconet can contain up to seven slaves clustered around a single
master. The device that initializes establishment of the Piconet becomes the master.
The master is responsible for transmission control by dividing the network into a series
of time slots amongst the network members, as a part of time division
multiplexing scheme which is shown below.