0% found this document useful (0 votes)
17 views78 pages

Physical and Data Link Layer Overview

Module 2 covers the Physical and Data Link Layers of network communication, detailing various transmission media including guided (twisted pair, coaxial, optical fiber) and unguided (radio waves, microwaves, infrared). Each type of media has its advantages and disadvantages in terms of speed, cost, and installation complexity. Additionally, the module introduces the OSI model, explaining its seven layers and their roles in data transmission.
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)
17 views78 pages

Physical and Data Link Layer Overview

Module 2 covers the Physical and Data Link Layers of network communication, detailing various transmission media including guided (twisted pair, coaxial, optical fiber) and unguided (radio waves, microwaves, infrared). Each type of media has its advantages and disadvantages in terms of speed, cost, and installation complexity. Additionally, the module introduces the OSI model, explaining its seven layers and their roles in data transmission.
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

Module 2

Physical and Data Link Layer

2.1 Physical Layer:

 Communication mechanisms and Electromagnetic Spectrum,


 Guided Transmission Media: Twisted pair, Coaxial, Fiber optics

Transmission Communication Mechanism:

Transmission Media?

A transmission medium is a physical path between the transmitter and the receiver
i.e. it is the

channel through which data is sent from one place to another.


Transmission Media is broadly classified into the following types:

Guided Media

Guided Media is also referred to as Wired or Bounded transmission media.

Signals being transmitted are directed and confined in a narrow pathway by using
physical links.
Features:

 High Speed

 Secure

 Used for comparatively shorter distances

There are 3 major types of Guided Media:

Twisted Pair Cable

It consists of 2 separately insulated conductor wires wound about each other.


Generally, several such pairs are bundled together in a protective sheath. They are
the most widely used Transmission Media. Twisted Pair-is of two types:

 Unshielded Twisted Pair (UTP): UTP consists of two insulated copper


wires twisted around one another. This type of cable has the ability to
block interference and does not depend on a physical shield for this
purpose. It is used for telephonic applications.
Unshielded Twisted Pair

Advantages of Unshielded Twisted Pair

Least expensive

 Easy to install

 High-speed capacity

Disadvantages of Unshielded Twisted Pair

Susceptible to external interference

 Lower capacity and performance in comparison to STP

 Short distance transmission due to attenuation


Shielded Twisted Pair

Shielded Twisted Pair (STP): This type of cable consists of a special jacket (a
copper braid covering or a foil shield) to block external interference. It is used in
fast-data-rate Ethernet and in voice and data channels of telephone lines.

Advantages of Shielded Twisted Pair

 Better performance at a higher data rate in comparison to UTP

 Eliminates crosstalk

 Comparatively faster

Disadvantages of Shielded Twisted Pair

 Comparatively difficult to install and manufacture

 More expensive

 Bulky

Coaxial Cable

It has an outer plastic covering containing an insulation layer made of PVC or


Teflon and 2 parallel conductors each having a separate insulated protection cover.
The coaxial cable transmits information in two modes: Baseband mode(dedicated
cable bandwidth) and Broadband mode(cable bandwidth is split into separate
ranges). Cable TVs and analog television networks widely use Coaxial cables.
Advantages of Coaxial Cable

Coaxial cables support high bandwidth.

 It is easy to install coaxial cables.

 Coaxial cables have better cut-through resistance so they are more reliable
and durable.

 Less affected by noise or cross-talk or electromagnetic inference.

 Coaxial cables support multiple channels

Disadvantages of Coaxial Cable

 Coaxial cables are expensive.

 The coaxial cable must be grounded in order to prevent any crosstalk.

 As a Coaxial cable has multiple layers it is very bulky.

 There is a chance of breaking the coaxial cable and attaching a “t-joint” by


hackers, this compromises the security of the data.
Optical Fiber Cable

Optical Fibre Cable uses the concept of refraction of light through a core made up
of glass or plastic. The core is surrounded by a less dense glass or plastic covering
called the cladding. It is used for the transmission of large volumes of data. The
cable can be unidirectional or bidirectional. The WDM (Wavelength
DivisionMultiplexer) supports two modes, namely unidirectional and bidirectional
mode.

Advantages of Optical Fibre Cable

 Increased capacity and bandwidth

 Lightweight

 Less signal attenuation

 Immunity to electromagnetic interference

 Resistance to corrosive materials


Disadvantages of Optical Fibre Cable

 Difficult to install and maintain

 High cost

 Fragile

Applications of Optical Fibre Cable

 Medical Purpose: Used in several types of medical instruments.

 Defence Purpose: Used in transmission of data in aerospace.

 For Communication: This is largely used in formation of internet cables.

 Industrial Purpose: Used for lighting purposes and safety measures in


designing the interior and exterior of automobiles.

Stripline

Stripline is a transverse electromagnetic (TEM) transmission line medium invented


by Robert M. Barrett of the Air Force Cambridge Research Centre in the 1950s.
Stripline is the earliest form of the planar transmission line. It uses a conducting
material to transmit high-frequency waves it is also called a waveguide. This
conducting material is sandwiched between two layers of the ground plane which
are usually shorted to provide EMI immunity.

Microstripline

In this, the conducting material is separated from the ground plane by a layer of
dielectric.
2 Unguided Media

.
Unguided Media
Unguided media is a type of Transmission Media. A transmission medium is a
physical path between the transmitter and the receiver. Unguided media
transport electromagnetic waves without using a physical conductor. It is also
known as unbounded or wireless media, and does not rely on physical pathways to
transmit signals. Instead, they use wireless communication methods to propagate
signals through the air or free space.
Types of Unguided Media

Wireless transmission

1. Radio Waves
Radio waves are electromagnetic signals used for various wireless
communication technologies, such as Wi-Fi, Bluetooth and radio broadcasting.
Electromagnetic waves ranging in frequencies between 3 kHz and 1 GHz are
normally called radio waves.

Omni Directional Antenna


Radio waves use omnidirectional antennas that send out signals in all directions.
Based on the wavelength, strength, and the purpose of transmission, we can have
several types of antennas.

Figure shows an omnidirectional antenna.


Applications of Radio Waves
 The Omni directional characteristics of radio waves make them useful for
multicasting, in which there is one sender but many receivers.
 FM radio, television, maritime radio, cordless phones,

Advantages of Radio Waves


 It is used in WAN (Wide Area Network).
 Used in mobile Cellular phones.
 Radio wave spread in large area so they can penetrate the wall.
 Higher transmission rate.

2. Microwaves
Electromagnetic waves having frequencies between 1 and 300 GHz are called
microwaves. Microwaves are unidirectional. The sending and receiving antennas
need to be aligned. The unidirectional property has an obvious advantage. A pair of
antennas can be aligned without interfering with another pair of aligned antennas.
Let’s talk about the Unidirectional Antenna now.
Unidirectional Antenna
Microwaves need unidirectional antennas that send out signals in one direction.

Types of Microwaves
There are two types of microwaves:

1. Terrestrial Microwave
Terrestrial Microwave are microwaves that transmits the beam of a radio signal
from one ground based antenna to another ground based antenna.

Characteristics of Terrestrial Microwave


 Frequency range: from 4 GHz to 23 GHz.
 Bandwidth 1 to 10 Mbps.
 Short distance: inexpensive for short distance.
 Long distance: it requires a higher tower length for a longer distance.
 Attenuation: Attenuation refers loss of signal. It is because of
environmental conditions and antenna size.
Advantages Of Terrestrial Microwave
 Terrestrial microwave is cheaper than using cables .
 Terrestrial microwave does not require land for
 Communication over oceans is achieved by using microwave.

Disadvantages of Terrestrial Microwave


 Line of Sight Required: The signals need a clear path between antennas.
Obstructions like buildings, trees, or mountains can block the signal.
 Weather Interference.
 Distance Limitations
 High Initial Cost.
 Maintenance
 Limited Bandwidth.

2. Satellite Microwave Communication


A satellite is a object that revolve around the earth. A satellite microwave is a type
of communication technology that uses microwave radio waves to transmit data
between a ground-based station and an orbiting satellite.
A satellite get signal from ground based station, enhance that signal and transfer
back to another ground based station that is situated at different location on the
earth. They orbit high above the planet, allowing them to cover large areas. This
process enables long-distance communication, GPS navigation, and weather
monitoring.

Advantages of Satellite Microwave Communication

 Wide Coverage
 Long Distance Communication
 Reliable
 Broadcast Capabilities.
 Flexibility.

Disadvantages Of Satellite Microwave Communication

 High Cost.
 Signal Delay
 Weather Sensitivity

3. Infrared
Infrared waves, with frequencies from 300 GHz to 400 THz (wavelengths from 1
mm to 770 nm), can be used for short-range communication. Infrared waves,
having high frequencies, cannot penetrate walls. This advantageous characteristic
prevents interference between one system and another; a short range
communication system in one room cannot be affected by another system in the
next room. When we use our infrared remote control, we do not interfere with the
use of the remote by our neighbours. It is used in TV remotes, wireless mouse,
keyboard, printer, etc.

Characteristics of Infrared Signals


 Infrared signal supports high bandwidth, so the data rate will be very high.
 It cannot penetrate the wall. So communication in one room cannot be
interrupted by the nearby rooms.
 Its provides better security and minimum interference.
 Infrared communication doesn’t work well outside because sunlight
interferes with the infrared signals.
 collision avoidance systems.
 Infrared technology is found in many consumer electronic devices, including
remote controls for televisions, air conditioners, and other appliances.

Advantages of Unguided Media


 Flexibility: Devices can connect from anywhere within the signal range,
providing mobility and convenience.
 Allowing devices to communicate without the need for physical
connections.
 Easy to install.
 Scalability: Adding new devices or expanding the network is
straightforward and doesn’t require extensive reconfiguration.

Disadvantages of Unguided Media


 Interference: Signals can be disrupted by other electronic devices and
weather conditions.
 Security: It is easier for unauthorized people to access and intercept wireless
signals.
 Range Limitations: Wireless signals have a limited range.
 Signal Quality: Obstacles like buildings and walls can decrease signal
quality.
 Bandwidth: Generally, unguided media can offer lower bandwidth
compared to guided media.

Difference between Radio Waves Vs Micro Waves Vs Infrared Waves

Basis Radio wave Microwave Infrared wave

These are These are


These are omni-
Direction unidirectional in unidirectional in
directional in nature.
nature. nature.
Basis Radio wave Microwave Infrared wave

At low frequency,
At low frequency,
they can penetrate They cannot
they can penetrate
through solid objects penetrate
through solid objects
Penetration and walls but high through any
and walls. at high
frequency they solid object and
frequency, they
bounce off the walls.
cannot penetrate.
obstacle.

Frequency
Frequency Frequency range: 3 Frequency range: 1
range: 300 GHz
range KHz to 1GHz. GHz to 300 GHz.
to 400 GHz.

These offers poor These offers medium These offers


Security
security. security. high security.

Attenuation is Attenuation is
Attenuation Attenuation is high.
variable. low.

Some frequencies in Some frequencies in There is no need


Government the radio-waves the microwaves of government
License require government require government license to use
license to use these. license to use these. these waves.

Usage Cost Setup and usage Cost Setup and usage Cost Usage Cost is
Basis Radio wave Microwave Infrared wave

is moderate. is high. very less.

These are used in These are used in


Communication long distance long distance
communication. communication.

Module 2.2

OSI model

OSI stands for open system interconnection,

It was developed by ISO( International Standard Organization) in 1984 It has seven


layers. All these 7 layers work collaboratively to transmit the data from one
host/device to another across the globe.
7. Application layer

The application layer is used by end-user applications such as web browsers and
email clients. It provides protocols that allow applications to send and receive
information and present meaningful data to users. A few examples of application
layer protocols are the Hypertext Transfer Protocol (HTTP), File Transfer Protocol
(FTP), Post Office Protocol (POP), Simple Mail Transfer Protocol (SMTP), and
Domain Name System (DNS).
6. Presentation layer

It receives data from the application layer in the form of character and number

The functions of the presentation layer are :

Translation : It translate the data into machine readable format to transmit over the
network.

Encryption/ Decryption: Data encryption translates the data into another form or
code. The encrypted data is known as the cipher text and the decrypted data is
known as plain text. A key value is used for encrypting as well as decrypting data.

Compression: Reduces the number of bits that need to be transmitted on the


network which speed up the data transmission.

5. Session layer

The session layer permits two parties to hold ongoing communications called a
session across a network. The applications on either end of the session can
exchange data or send packets to another for as long as the session lasts. The
session layer handles session setup, data or message exchanges, and terminates
session. It also monitors session identification so only permitted user/device can
participate and security services to control access to session information. A session
can be used to allow a user to log into a remote time-sharing system or transfer a
file between two machines.
Another session layer service is synchronization. Consider the problems that occur
when transferring a file between two machines and the system crashed and not
being able to complete the transfer.

[Link] layer

The transport layer receives data from the session layer and breaks it into smaller
unit called “segments” and pass it to the network layer. It is responsible for
reassembling the segments on the receiving end, turning it back into data that can
be used by the session layer. The transport layer carries out flow control, sending
data at a rate that matches the connection speed of the receiving device, and error
control, checking if data was received incorrectly and if not, requesting it again.

In order to deliver the message to correct process, transport layer header includes a
type of address called service point address or port address. Thus by specifying this
address, transport layer makes sure that the message is delivered to the correct
process.

The services provided by the transport layer :

Connection Oriented Service: In this type of transmission, the receiving device


sends an acknowledgement, back to the source after a packet or group of packet is
received. This type of transmission is reliable and secure..

Connection less service: In this type of transmission, the receiver does not
acknowledge receipt of a packet. This approach allows for much faster
communication between devices. Connection-oriented service is more reliable than
connectionless Service. UDP is connection less service.

3. Network layer

Network layer transmits data in from one device/host to another device/host which
located at different network. Data unit in this layer is called packet.

Network layer performs

Logical Addressing: In order to identify each device on internetwork uniquely


which is also known as IP addressing.

Determine best path for data transmission from source to destination, and transmits
the data through the path known as routing.

Router operates in this layer.

[Link] Link Layer

In this layer data is transmitted node to node (usually in directed connected device
such as switch to pc or pc to pc which is connected through physically). Packets are
divided in this layer known as frame.

DLL has two layers . Logical Link Control(LLC) and Media Access
Control(MAC) also known as physical address of device. MAC is globally unique.
MAC is 48 bits (6 bytes) , first half of the address uniquely identifies the vendor
known as OUI(Organization Unique Identifier), last half identifies for the device id.
Functions of Data Link Layer :

Framing : It provides a way for a sender to transmit a set of bits that are
meaningful to the receiver.

Physical addressing : Adds physical address(MAC) to the frame

Error Control : Detects and retransmits damaged or lost frames.

Flow Control : Data must be constant in both side otherwise it may be get
corrupted. flow control coordinates the amount of data that can be sent before
receiving acknowledgement

Access Control : determine which device has control over the channel at a given
time, when a single communication channel is shared by multiple devices.

1. Physical Layer

Physical layer is the bottom layer of the OSI model. This layer is concerned with
transmitting raw data bits across the network. For transmitting data it converts the
digital bits into electrical, radio or optical signal. It can include specifications such
as voltages, pin layout, cabling, and radio frequencies

TCP/IP Model

The TCP/IP model is a fundamental framework for computer networking. It stands


for Transmission Control Protocol/Internet Protocol, which are the core protocols
of the Internet. This model defines how data is transmitted over networks, ensuring
reliable communication between devices. It consists of four layers: the Link Layer,
the Internet Layer, the Transport Layer, and the Application Layer. Each layer has
specific functions that help manage different aspects of network communication,
making it essential for understanding and working with modern networks.

Working

Whenever we want to send something over the internet using the TCP/IP Model,
the TCP/IP Model divides the data into packets at the sender’s end and the same
packets have to be recombined at the receiver’s end to form the same data, and this
thing happens to maintain the accuracy of the data. TCP/IP model divides the data
into a 4-layer procedure, where the data first go into this layer in one order and
again in reverse order to get organised in the same way at the receiver’s end.

The diagrammatic comparison of the TCP/IP and OSI model is as follows:


TCP/IP and OSI

1. Network Access Layer

It is a group of applications requiring network communications. This layer is


responsible for generating the data and requesting connections. It acts on behalf of
the sender and the Network Access layer on the behalf of the receiver. During this
article, we will be talking on the behalf of the receiver.

The packet’s network protocol type, in this case, TCP/IP, is identified by network
access layer. Error prevention and “framing” are also provided by this layer.

Internet Layer

This layer parallels the functions of OSI’s Network layer. It defines the protocols
which are responsible for the logical transmission of data over the entire network.
The main protocols residing at this layer are as follows:

 IP: IP stands for Internet Protocol and it is responsible for delivering packets
from the source host to the destination host by looking at the IP addresses
in the packet headers. IP has 2 versions: IPv4 and IPv6. IPv4 is the one
that most websites are using currently. But IPv6 is growing as the number
of IPv4 addresses is limited in number when compared to the number of
users.

Transport Layer

The TCP/IP transport layer protocols exchange data receipt acknowledgments and
retransmit missing packets to ensure that packets arrive in order and without error.
End-to-end communication is referred to as such. Transmission Control Protocol
(TCP) and User Datagram Protocol are transport layer protocols at this level
(UDP).

Advantages of TCP/IP Model

 Interoperability: The TCP/IP model allows different types of computers


and networks to communicate with each other, promoting compatibility
and cooperation among diverse systems.

 Scalability: TCP/IP is highly scalable, making it suitable for both small and
large networks, from local area networks (LANs) to wide area networks
(WANs) like the internet.

 Standardization: It is based on open standards and protocols, ensuring that


different devices and software can work together without compatibility
issues.

 Flexibility: The model supports various routing protocols, data types, and
communication methods, making it adaptable to different networking
needs.

 Reliability: TCP/IP includes error-checking and retransmission features that


ensure reliable data transfer, even over long distances and through various
network conditions.

Disadvantages of TCP/IP Model

 Complex Configuration: Setting up and managing a TCP/IP network can


be complex, especially for large networks with many devices. This
complexity can lead to configuration errors.
 Security Concerns: TCP/IP was not originally designed with security in
mind. While there are now many security protocols available (such as
SSL/TLS), they have been added on top of the basic TCP/IP model, which
can lead to vulnerabilities.

 Inefficiency for Small Networks: For very small networks, the overhead
and complexity of the TCP/IP model may be unnecessary and inefficient
compared to simpler networking protocols.

 Limited by Address Space: Although IPv6 addresses this issue, the older
IPv4 system has a limited address space, which can lead to issues with
address exhaustion in larger networks.

 Data Overhead: TCP, the transport protocol, includes a significant amount


of overhead to ensure reliable transmission. This can reduce efficiency,
especially for small data packets or in networks where speed is crucial.

4. Application Layer

This layer is analogous to the transport layer of the OSI model. It is responsible for
end-to-end communication and error-free delivery of data. It shields the upper-
layer applications from the complexities of data. The three main protocols present
in this layer are:

 HTTP and HTTPS: HTTP stands for Hypertext transfer protocol. It is used
by the World Wide Web to manage communications between web
browsers and server
Difference Between OSI Model and TCP/IP Model

Data communication is a process or act in which we can send or receive data.


Understanding the fundamental structures of networking is crucial for anyone
working with computer systems and communication. For data communication two
models are available, the OSI (Open Systems Interconnection) Model, and the
TCP/IP (Transmission Control Protocol/Internet Protocol) Model.

These models work as frameworks for organising and understanding how data
moves from one device to another across networks. While both models aim to
achieve similar goals, they differ in their approach, layer organisation, and
practical application within computer networking. We will discuss these two
models in this article and also see the differences between these two articles.

OSI Model stands for Open Systems Interconnection. It has 7 layer and Each layer
performs its task independently. It was developed in 1984 by the International
Organisation for Standardisation (ISO).

Data Flow in OSI Model

The data flow in the OSI (Open Systems Interconnection) model describes how
data is transmitted from one device to another through the seven layers of the OSI
model. This process involves encapsulation and decapsulation at each layer to
ensure proper data transmission and reception.
The data flow in the OSI model involves encapsulating data at each layer on the
sender side, transmitting it over the network, and decapsulating it at each layer on
the receiver side to ensure the data reaches its intended destination correctly and
reliably.

OSI Model

Advantages

 Both connection-oriented services and connectionless services are


supported.

 It is quite flexible.

 All the layers work independently.

Disadvantages
 Setting up a model is a challenging task.

 Sometimes, it becomes difficult to fit a new protocol into this model.

 It is only used as a reference model.

TCP/IP Model

It stands for Transmission Control Protocol/Internet Protocol. It has 4 layers


named as Physical layer, Network layer, Transport layer, and Application layer. It
also can be used as a communications protocol in a private computer network.
Advantages

 Many Routing protocols are supported.

 It is highly scalable and uses a client-server architecture.

 It is lightweight.

Disadvantages

 Little difficult to set up.

 Delivery of packets is not guaranteed by the transport layer.

 Vulnerable to a synchronisation attack.

Similarities Between OSI Model and TCP/IP Model


OSI and TCP/IP both are logical models. One of the main similarities between the
OSI and TCP/IP models is that they both describe how information is transmitted
between two devices across a network. Both models define a set of layers. Each
layer performs a specific set of functions to enable the transmission of data.

Another similarity between the two models is that they both use the concept of , in
which data is packaged into a series of headers and trailers that contain information
about the data being transmitted and how it should be handled by the network.

Differences Between OSI Model and TCP/IP Model

The OSI (Open Systems Interconnection) Model and the TCP/IP (Transmission
Control Protocol/Internet Protocol) Model are two frameworks used to understand
how data moves through networks. While they both help in organising network
communication, they have distinct structures and purposes. Understanding these
differences is essential for anyone learning about or working with computer
networks.

OSI vs TCP/IP

Parameters OSI Model TCP/IP Model

TCP/IP stands for


OSI stands for Open Systems Transmission Control
Full Form
Interconnection Protocol/Internet
Protocol
Parameters OSI Model TCP/IP Model

Layers It has 7 layers It has 4 layers

Usage It is low in usage It is mostly used

It is horizontally
Approach It is vertically approached
approached

Delivery of the package


Delivery of the package is
Delivery is not guaranteed in
guaranteed in OSI Model
TCP/IP Model

Replacing the tools is


Replacement of tools and changes
Replacement not easy as it is in OSI
can easily be done in this model
Model

It is less reliable than TCP/IP It is more reliable than


Reliability
Model OSI Model

Not tied to specific protocols, but


examples include HTTP
Protocol (Application), SSL/TLS HTTP, FTP, TCP,
Example (Presentation), TCP (Transport), UDP, IP, Ethernet
IP (Network), Ethernet (Data
Link)
Parameters OSI Model TCP/IP Model

Error Built into Data Link and Transport Built into protocols like
Handling layers TCP

Both connection-oriented (TCP)


TCP (connection-
Connection and connectionless (UDP)
oriented), UDP
Orientation protocols are covered at the
(connectionless)
Transport layer

Data Link Controls

Data Link Control is the service provided by the Data Link Layer to provide
reliable data transfer over the physical medium. For example, In the half-duplex
transmission mode, one device can only transmit the data at a time. If both the
devices at the end of the links transmit the data simultaneously, they will collide
and leads to the loss of the information. The Data link layer provides the
coordination among the devices so that no collision occurs.

The Data link layer provides three functions:

o Line discipline
o Flow Control
o Error Control
Line Discipline

o Line Discipline is a functionality of the Data link layer that provides the
coordination among the link systems. It determines which device can send,
and when it can send the data.

Line Discipline can be achieved in two ways:

o ENQ/ACK
o Poll/select
o END/ACK stands for Enquiry/Acknowledgement is used when there is no
wrong receiver available on the link and having a dedicated path between
the two devices so that the device capable of receiving the transmission is
the intended one.
o END/ACK coordinates which device will start the transmission and whether
the recipient is ready or not.
o Working of END/ACK
o The transmitter transmits the frame called an Enquiry (ENQ) asking whether
the receiver is available to receive the data or not.
o The receiver responses either with the positive acknowledgement(ACK) or
with the negative acknowledgement(NACK) where positive
acknowledgement means that the receiver is ready to receive the
transmission and negative acknowledgement means that the receiver is
unable to accept the transmission.
o Following are the responses of the receiver:

o If the response to the ENQ is positive, the sender will transmit its data, and
once all of its data has been transmitted, the device finishes its transmission
with an EOT (END-of-Transmission) frame.
o If the response to the ENQ is negative, then the sender disconnects and
restarts the transmission at another time.
o If the response is neither negative nor positive, the sender assumes that the
ENQ frame was lost during the transmission and makes three attempts to
establish a link before giving up.
Poll/Select

The Poll/Select method of line discipline works with those topologies where one
device is designated as a primary station, and other devices are secondary stations.

Working of Poll/Select
o In this, the primary device and multiple secondary devices consist of a single
transmission line, and all the exchanges are made through the primary
device even though the destination is a secondary device.
o The primary device has control over the communication link, and the
secondary device follows the instructions of the primary device.
o The primary device determines which device is allowed to use the
communication channel. Therefore, we can say that it is an initiator of the
session.
o If the primary device wants to receive the data from the secondary device, it
asks the secondary device that they anything to send, this process is known
as polling.
o If the primary device wants to send some data to the secondary device, then
it tells the target secondary to get ready to receive the data, this process is
known as selecting.

Select

o The select mode is used when the primary device has something to send.
o When the primary device wants to send some data, then it alerts the
secondary device for the upcoming transmission by transmitting a Select
(SEL) frame, one field of the frame includes the address of the intended
secondary device.
o When the secondary device receives the SEL frame, it sends an
acknowledgement that indicates the secondary ready status.
o If the secondary device is ready to accept the data, then the primary device
sends two or more data frames to the intended secondary device. Once the
data has been transmitted, the secondary sends an acknowledgement
specifies that the data has been received.

Poll

o The Poll mode is used when the primary device wants to receive some data
from the secondary device.
o When a primary device wants to receive the data, then it asks each device
whether it has anything to send.
o Firstly, the primary asks (poll) the first secondary device, if it responds with
the NACK (Negative Acknowledgement) means that it has nothing to send.
Now, it approaches the second secondary device, it responds with the ACK
means that it has the data to send. The secondary device can send more than
one frame one after another or sometimes it may be required to send ACK
before sending each one, depending on the type of the protocol being used.
Flow Control

o It is a set of procedures that tells the sender how much data it can transmit
before the data overwhelms the receiver.
o The receiving device has limited speed and limited memory to store the data.
Therefore, the receiving device must be able to inform the sending device to
stop the transmission temporarily before the limits are reached.
o It requires a buffer, a block of memory for storing the information until they
are processed.

Two methods have been developed to control the flow of data:

o Stop-and-wait
o Sliding window

Stop-and-wait

o In the Stop-and-wait method, the sender waits for an acknowledgement after


every frame it sends.
o When acknowledgement is received, then only next frame is sent. The
process of alternately sending and waiting of a frame continues until the
sender transmits the EOT (End of transmission) frame.

Advantage of Stop-and-wait

The Stop-and-wait method is simple as each frame is checked and acknowledged


before the next frame is sent.

Disadvantage of Stop-and-wait
Stop-and-wait technique is inefficient to use as each frame must travel across all
the way to the receiver, and an acknowledgement travels all the way before the
next frame is sent. Each frame sent and received uses the entire time needed to
traverse the link.

Sliding Window

o The Sliding Window is a method of flow control in which a sender can


transmit the several frames before getting an acknowledgement.
o In Sliding Window Control, multiple frames can be sent one after the
another due to which capacity of the communication channel can be utilized
efficiently.
o A single ACK acknowledge multiple frames.
o Sliding Window refers to imaginary boxes at both the sender and receiver
end.
o The window can hold the frames at either end, and it provides the upper
limit on the number of frames that can be transmitted before the
acknowledgement.
o Frames can be acknowledged even when the window is not completely
filled.
o The window has a specific size in which they are numbered as modulo-n
means that they are numbered from 0 to n-1. For example, if n = 8, the
frames are numbered from 0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,1........
o The size of the window is represented as n-1. Therefore, maximum n-1
frames can be sent before acknowledgement.
o When the receiver sends the ACK, it includes the number of the next frame
that it wants to receive. For example, to acknowledge the string of frames
ending with frame number 4, the receiver will send the ACK containing the
number 5. When the sender sees the ACK with the number 5, it got to know
that the frames from 0 through 4 have been received.

Sender Window

o At the beginning of a transmission, the sender window contains n-1 frames,


and when they are sent out, the left boundary moves inward shrinking the
size of the window. For example, if the size of the window is w if three
frames are sent out, then the number of frames left out in the sender window
is w-3.
o Once the ACK has arrived, then the sender window expands to the number
which will be equal to the number of frames acknowledged by ACK.
o For example, the size of the window is 7, and if frames 0 through 4 have
been sent out and no acknowledgement has arrived, then the sender window
contains only two frames, i.e., 5 and 6. Now, if ACK has arrived with a
number 4 which means that 0 through 3 frames have arrived undamaged and
the sender window is expanded to include the next four frames. Therefore,
the sender window contains six frames (5,6,7,0,1,2).
Receiver Window

o At the beginning of transmission, the receiver window does not contain n


frames, but it contains n-1 spaces for frames.
o When the new frame arrives, the size of the window shrinks.
o The receiver window does not represent the number of frames received, but
it represents the number of frames that can be received before an ACK is
sent. For example, the size of the window is w, if three frames are received
then the number of spaces available in the window is (w-3).
o Once the acknowledgement is sent, the receiver window expands by the
number equal to the number of frames acknowledged.
o Suppose the size of the window is 7 means that the receiver window
contains seven spaces for seven frames. If the one frame is received, then the
receiver window shrinks and moving the boundary from 0 to 1. In this way,
window shrinks one by one, so window now contains the six spaces. If
frames from 0 through 4 have sent, then the window contains two spaces
before an acknowledgement is sent.

Error Control

Error Control is a technique of error detection and retransmission.

Categories of Error Control:


Error Control in Data Link Layer
 This is 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.
 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 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
 Error Correction : Error correction, as the name suggests, simply means
correction or solving or fixing of errors. It simply means reconstruction .
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.

Characteristics of Stop and Wait ARQ


 Used in Connection-oriented communication.
 It offers error and flow control
 It is used in Data Link and Transport Layers
 Stop and Wait for ARQ mainly implements the Sliding Window Protocol
concept with Window Size 1

Useful Terms in Stop and Wait Protocol


 Propagation Delay: Amount of time taken by a packet to make a
physical journey from source to destination
Propagation Delay = (Distance between routers) / (Velocity of propagation)
 Round Trip Time (RTT) = Amount of time taken by a packet to reach
the receiver + Time taken by the Acknowledgement to reach the sender
 Time Out (TO) = 2* RTT
 Time To Live (TTL) = 2* Time Out. (Maximum TTL is 255 seconds)
Simple Stop and Wait
At Sender
 Rule 1) Send one data packet at a time.
 Rule 2) send the next packet only after receiving acknowledgment for the
previous.
At Receiver
 Rule 1) Send acknowledgement after receiving and consuming a data
packet.
 Rule 2) After consuming packet acknowledgement need to be sent (Flow
Control)
Problems Associated with Stop and Wait
1. Lost Data
Assume the sender transmits the data packet and it is lost. The sender does not
receive an acknowledgment, it will not send the next packet. This problem is
caused by a loss of data.

2. Lost Acknowledgement
Assume the sender sends the data,.The receiver sends an acknowledgment after
receiving the packet. In this situation, the acknowledgment is lost in the network.
next packet cannot be transmitted until the preceding packet’s acknowledgment
is received.

3. Delayed Acknowledgement/Data
Assume the sender sends the data The receiver then transmits the
acknowledgment, which is received after the sender’s timeout period.
Stop and Wait for ARQ (Automatic Repeat Request)
The above 3 problems are resolved by Stop and Wait for ARQ (Automatic
Repeat Request) that does both error control and flow control.

1. Time Out
Timeout refers to the duration for which the sender waits for an acknowledgment
(ACK)
2. Sequence Number (Data)
In Stop-and-Wait ARQ, the sender assigns sequence numbers to each data frame
it sends. ensuring reliable delivery of data packets..

3. Sequence Number(Acknowledgement)
Similarly, sequence numbers are also used in acknowledgments (ACKs) sent by
the receiver to acknowledge received data frames. When the receiver
successfully receives a data frame, it sends an ACK back to the sender,
indicating the sequence number of the next expected frame.
Working of Stop and Wait for ARQ
 Sender A sends a data frame or packet with sequence number 0.
 Receiver B, after receiving the data frame, sends an acknowledgement
with sequence number 1 (the sequence number of the next expected data
frame or packet)
There is only a one-bit sequence number that implies that both sender and
receiver have a buffer for one frame or packet only.

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.
Selective Repeat attempts to retransmit only those packets that are actually lost
(due to errors) :
 Receiver must be able to accept packets out of order.
 Since receiver must release packets to higher layer in order, the receiver
must be able to buffer some packets.
Retransmission requests :
 Implicit – The receiver acknowledges every good packet, packets that are
not ACKed before a time-out are assumed lost or in [Link] that this
approach must be used to be sure that every packet is eventually received.
 Explicit – An explicit NAK (selective reject) can request retransmission of
just one packet. This approach can expedite the retransmission but is not
strictly needed.
 One or both approaches are used in practice.
Terminologies Related to Sliding Window Protocol
Transmission Delay (Tt) – Time to transmit the packet from the host to the
outgoing link. If B is the Bandwidth of the link and D is the Data Size to
transmit
Tt = D/B
Propagation Delay (Tp) – It is the time taken by the first bit transferred by the
host onto the outgoing link to reach the destination. It depends on the distance d
and the wave propagation speed s (depends on the characteristics of the
medium).
 Tp = d/s
 Efficiency – It is defined as the ratio of total useful time to the total cycle
time of a packet. For stop and wait protocol,
 Total time(TT) = Tt(data) + Tp(data) +
Tt(acknowledgement) + Tp(acknowledgement)
= Tt(data) + Tp(data) + Tp(acknowledgement)
= Tt + 2*Tp

Framing in Data Link Layer


 Frames are the units of digital transmission, particularly in computer
networks and telecommunications.

 Frame is continuously used in Time Division Multiplexing process.

 Framing is a point-to-point connection between two computers or devices

 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 advantage of using frames is that data is broken up into recoverable


portions that can easily be checked for corruption.

 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 itby using a special sequence of bits that marks the
beginning of the frame i.e. SFD

 How does the station detect a frame: Every station listens to link for SFD
pattern through a sequential circuit. Station checks destination address to
accept or reject frame.
 Detecting end of frame: When to stop reading the frame.
 Handling errors: In this error detection and correction mechanisms, such
as cyclic redundancy check (CRC), are used to ensure the transmission of the
frame.

 Framing overhead: Every frame has a header and a trailer that contains
control information such as source and destination address, error detection
code, and other protocol-related information. This overhead reduces the
available bandwidth for data transmission, especially for small-sized frames.
 Framing incompatibility: Different networking devices and protocols may
use different framing methods,
 Framing synchronization: Stations must be synchronized with each other
to avoid collisions and ensure reliable communication.
 Framing efficiency: Framing should be designed to minimize the amount
of data overhead while maximizing the available bandwidth for data
transmission
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.
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:
1. Length field – We can introduce a length field in the frame to indicate the
length of the frame
2. End Delimiter (ED) – We can introduce an ED(pattern) to indicate the end
of the frame.
Error Detection in Computer Networks

Error is a condition when the receiver’s information does not match the sender’s.

Types of Errors
Single-Bit Error
A single-bit error refers to a type of data transmission error that occurs when one
bit (i.e., a single binary digit) of a transmitted data unit is altered during
transmission, resulting in an incorrect or corrupted data unit.

Single-Bit Error

Multiple-Bit Error
A multiple-bit error is an error type that arises when more than one bit in a data
transmission is affected. Although multiple-bit errors are relatively rare when
compared to single-bit errors
Multiple-Bit Error

Burst Error
When several consecutive bits are flipped mistakenly in digital transmission, it
creates a burst error. This error causes a sequence of consecutive incorrect
values.

Burst Error
Error Detection Methods
To detect errors, a common technique is to introduce redundancy bits that
provide additional information. Various techniques for error detection include:
 Simple Parity Check
 Two-Dimensional Parity Check
 Checksum
 Cyclic Redundancy Check (CRC)
Simple Parity Check
Simple-bit parity is a simple error detection method that involves adding an extra
bit to a data transmission. It works as:
 1 is added to the block if it contains an odd number of 1’s, and
 0 is added if it contains an even number of 1’s
This scheme makes the total number of 1’s even, that is why it is called even
parity checking.

Advantages of Simple Parity Check


 Simple parity check can detect all single bit error.
 Simple parity check can detect an odd number of errors.

 Implementation: Simple Parity Check is easy to implement in both


hardware and software.
 Minimal Extra Data: Only one additional bit (the parity bit) is added per
data unit (e.g., per byte).
 Fast Error Detection: The process of calculating and checking the parity
bit is quick, which allows for rapid error detection without significant delay
in data processing or communication.
 Single-Bit Error Detection: It can effectively detect single-bit errors within
a data unit, providing a basic level of error detection for relatively low-error
environments.

Two-Dimensional Parity Check

Two-dimensional Parity check bits are calculated for each row, which is
equivalent to a simple parity check bit. Parity check bits are also calculated for
all columns, then both are sent along with the data. At the receiving end, these
are compared with the parity bits calculated on the received data.
Advantages of Two-Dimensional Parity Check
 Two-Dimensional Parity Check can detect and correct all single bit error.
 Two-Dimensional Parity Check can detect two or three bit error that
occurs anywhere in the matrix.
.
Checksum

Checksum error detection is a method used to identify errors in transmitted data.


The process involves dividing the data into equally sized segments and using
a 1’s complement to calculate the sum of these segments. The calculated sum is
then sent along with the data to the receiver. At the receiver’s end, the same
process is repeated and if all zeroes are obtained in the sum, it means that the
data is correct.
Checksum – Operation at Sender’s Side
 Firstly, the data is divided into k segments each of m bits.
 On the sender’s end, the segments are added using 1’s complement
arithmetic to get the sum. The sum is complemented to get the checksum.
 The checksum segment is sent along with the data segments.

Checksum – Operation at Receiver’s Side


 At the receiver’s end, all received segments are added using 1’s
complement arithmetic to get the sum. The sum is complemented.
 If the result is zero, the received data is accepted; otherwise discarded.

Cyclic Redundancy Check (CRC)


 Unlike the checksum scheme, which is based on addition, CRC is based
on binary division.
 In CRC, a sequence of redundant bits, called cyclic redundancy check bits,
are appended to the end of the data unit so that the resulting data unit
becomes exactly divisible by a second, predetermined binary number.
 At the destination, the incoming data unit is divided by the same number.
If at this step there is no remainder, the data unit is assumed to be correct and
is therefore accepted.
 A remainder indicates that the data unit has been damaged in transit and
therefore must be rejected.

CRC Working
We have given dataword of length n and divisor of length k.
Step 1: Append (k-1) zero’s to the original message
Step 2: Perform modulo 2 division
Step 3: Remainder of division = CRC
Step 4: Code word = Data with append k-1 zero’s + CRC
Note:
 CRC must be k-1 bits
Example: Let’s data to be send is 1010000 and divisor in the form of polynomial
is x3+1. CRC method discussed below.


 Length of Code word = n+k-1 bits

Advantages of Error Detection

 Increased Data Reliability: Error detection ensures that the data


transmitted over the network is reliable, accurate, and free from errors. This
ensures that the recipient receives the same data that was transmitted by the
sender.
 Improved Network Performance: Error detection mechanisms can help to
identify and isolate network issues that are causing errors. This can help to
improve the overall performance of the network and reduce downtime.
 Enhanced Data Security: Error detection can also help to ensure that the
data transmitted over the network is secure and has not been tampered with.
Disadvantages of Error Detection
 Overhead: Error detection requires additional resources and processing
power, which can lead to increased overhead on the network. This can result
in slower network performance and increased latency.
 False Positives: Error detection mechanisms can sometimes generate false
positives, which can result in unnecessary retransmission of data. This can
further increase the overhead on the network.
 Limited Error Correction: Error detection can only identify errors but
cannot correct them. This means that the recipient must rely on the sender to
retransmit the data, whic

Medium Access Control Sublayer (MAC sublayer)

The medium access control (MAC) is a sublayer of the data link layer of the open
system interconnections (OSI) reference model for data transmission.

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 −

1. The logical link control (LLC) sublayer

2. The medium access control (MAC) sublayer


Functions of MAC Layer

• It provides an abstraction of the physical layer to the LLC and upper layers
of the OSI network.

• It is responsible for encapsulating frames so that they are suitable for


transmission via the physical medium.

• It resolves the addressing of source station as well as the destination station,


or groups of destination stations.

• It performs multiple access resolutions when more than one data frame is to
be transmitted. It determines the channel access methods for transmission.

• It also performs collision resolution and initiating retransmission in case of


collisions.

• It generates the frame check sequences and thus contributes to protection


against transmission errors.

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.

Logical Link Control (LLC) provides conventional data link protocol functions,
such as error control and flow control

LLC provides the following three services for a local network application:

(1)Unacknowledged connectionless service: This is a data gram-type of service, so


there is no overhead to establish a connection. It provides no acknowledgment to
ensure the delivery of a frame.

(2)Acknowledged connectionless service: This service provides acknowledgment


to a frame received to relieve the burden in the higher layer.

(3)Connection-oriented service: This service provides flow control, sequencing,


and error recovery between SAPs. It also allows for multiplexing logical endpoints
over a single physical link.

ALOHA

The multiple access protocol ALOHA (Advocates of Linux Open-source Hawaii


Association) is used to transmit data over a public network channel. It functions
within the Open Systems Interconnection (OSI) model’s Medium Access Control
(MAC) sublayer.

ALOHA in Computer Network

• Access to the shared communication network channel can be coordinated


and arbitrated using the ALOHA system.
• It was created in the 1970s at the University of Hawaii by Norman
Abramson and his associates.

• The system was originally designed for ground-based radio broadcasting,


but satellite communication systems now use it.

• When two or more systems seek to transmit on the same channel at the same
time, a shared communication system such as ALOHA needs a way to
handle collisions.

• A node in the ALOHA system transmits whenever data is ready to be sent. A


collision takes place and the sent frames are lost if the other node transmits
at the same time

• ALOHA Means “Hello”

• ALOHA is basically a multiple access protocol which describes how all the
terminals can access a medium without interfering at all with one another or
even colliding.

• The Slotted ALOHA protocol divides the time interval into discrete slots,
each of which is equal to one frame’s worth of time.

• To avoid collisions, this approach needs synchronisation between the


sending nodes.

Versions of ALOHA

Pure ALOHA

The total time of transmission is continuous in pure ALOHA. A station sends a


frame whenever one is available. The sender waits for an arbitrary period of time
before retransmitting the frame if there is a collision and it is destroyed.
Slotted ALOHA

Slotted ALOHA increases the capacity of pure ALOHA while reducing collisions.
Slots are discrete time periods that are used to divide up the shared channel. Only
at the start of each time slot is the station able to transmit data. If multiple stations
attempt to transmit at the start of the same time slot, there may still be collisions

Random Access Protocols

The random access protocols consist of the following characteristics:

• There is no time restriction for sending the data (you can talk to your friend
without a time restriction).

• There is a fixed sequence of stations that are transmitting the data.

Random-access protocol is further divided into four categories, which are:

ALOHA

CSMA

CSMA/CD

CSMA/CA

ALOHA Random Access Protocol

The ALOHA protocol or also known as the ALOHA method is a random access
protocol in which every transmitting station or source in a network will send the
data whenever a frame is available for transmission. If we succeed and the frame
reaches its destination, the next frame is lined-up for transmission. But remember,
if the data frame is not received by the receiver (maybe due to collision) then the
frame is sent again until it successfully reaches the receiver's end.

CSMA Random Access Protocol.

The CSMA has 4 access modes:

1-persistent mode: In this, first the node checks the channel, if the channel is idle
then the node or station transmits data, otherwise it keeps on waiting and whenever
the channel is idle, the stations transmit the data frame.
Non-persistent mode: In this, the station checks the channel similarly as the 1-
persistent mode, but the only difference is that when the channel is busy it checks
it again after a random amount of time, unlike the 1-persistent where the stations
keep on checking continuously.

P-persistent mode: In this, the station checks the channel and if found idle then it
transmits the data frame with the probability of P and if the data is not transmitted
(1-P) then the station waits for a random amount of time and again transmits the
data with the probability P and this cycle goes on continuously until the data-frame
is successfully sent.

O-persistent: In this, the transmission occurs based on the superiority of stations


which is decided beforehand and transmission occurs in that order. If the channel is
idle, then the station waits for its turn to send the data frame.

Throughput & Efficiency of CSMA:

It is comparatively much greater than the throughput of pure and slotted ALOHA.
Here, for the 1-persistent mode, the throughput is 50% when G=1; for the Non-
persistent mode, the throughput can reach 90%.

CSMA/CD Random Access Protocol

CSMA/CD means CSMA with Collision Detection.

In this, whenever the station transmits data-frame it then monitors the channel or
the medium to acknowledge the state of the transmission i.e. successfully
transmitted or failed. If the transmission succeeds, then it prepares for the next
frame otherwise it resends the previously failed data frame. The point to remember
here is, that the frame transmission time should be at least twice the maximum
propagation time, which can be deduced when the distance between the two
stations involved in a collision is maximum.

CSMA/CA Random Access Protocol

CSMA/CA means CSMA with collision avoidance.

To detect the possible collisions, the sender receives the acknowledgment and if
there is only one acknowledgment present (its own) then this means that the data
frame has been sent successfully. But, if there are 2 or more acknowledgment
signals then this indicates that the collision has occurred.

This method avoids collisions by:

Interframe space: in this case, assume that your station waits for the channel to
become idle and found that the channel is idle, then it will not send the data frame
immediately (in order to avoid collision due to propagation delay) it rather waits
for some time called interframe space or IFS, and after this time the station again
checks the medium for being idle. But it should be kept in mind that the IFS
duration depends on the priority of the station.

Contention Window: here, the time is divided into slots. Say, if the sender is ready
for transmission of the data, it then chooses a random number of slots as waiting
time which doubles every time whenever the channel is busy. But, if the channel is
not idle at that moment, then it does not restart the entire process but restarts the
timer when the channel is found idle again.

Acknowledgment: as we discussed above that the sender station will re-transmit


the data if acknowledgment is not received before the timer expires.
CSMA/CD

The Carrier Sense Multiple Access/ Collision Detection protocol is used to detect a
collision in the media access control (MAC) layer. Once the collision was detected,
the CSMA CD immediately stopped the transmission by sending the signal so that
the sender does not waste all the time to send the data packet. Suppose a collision
is detected from each station while broadcasting the packets. In that case, the
CSMA CD immediately sends a jam signal to stop transmission and waits for a
random time context before transmitting another data packet. If the channel is
found free, it immediately sends the data and returns it.

Advantage of CSMA/ CD:

1. It is used for collision detection on a shared channel within a very short time.
2. CSMA CD is better than CSMA for collision detection.
3. CSMA CD is used to avoid any form of waste transmission.
4. When necessary, it is used to use or share the same amount of bandwidth at
each station.
5. It has lower CSMA CD overhead as compared to the CSMA CA.

Disadvantage of CSMA/CD

1. It is not suitable for long-distance networks because as the distance


increases, CSMA CD' efficiency decreases.
2. It can detect collision only up to 2500 meters, and beyond this range, it
cannot detect collisions.
3. When multiple devices are added to a CSMA CD, collision detection
performance is reduced.
CSMA/CA

CSMA stands for Carrier Sense Multiple Access with Collision Avoidance.
It means that it is a network protocol that uses to avoid a collision rather than
allowing it to occur, and it does not deal with the recovery of packets after a
collision. It is similar to the CSMA CD protocol that operates in the media
access control layer. In CSMA CA, whenever a station sends a data frame to
a channel, it checks whether it is in use. If the shared channel is busy, the
station waits until the channel enters idle mode. Hence, we can say that it
reduces the chances of collisions and makes better use of the medium to
send data packets more efficiently.

Advantage of CSMA /CA

1. When the size of data packets is large, the chances of collision in CSMA CA
is less.
2. It controls the data packets and sends the data when the receiver wants to
send them.
3. It is used to prevent collision rather than collision detection on the shared
channel.
4. CSMA CA avoids wasted transmission of data over the channel.
5. .It is best suited for wireless transmission protocol
6. It avoids unnecessary data traffic on the network with the help of the RTS/
CTS extension.

Disadvantage of CSMA /CA


1. Sometime CSMA/CA takes much waiting time as usual to transmit
the data packet.
2. It consumes more bandwidth by each station.
3. Its efficiency is less than a CSMA CD.

DIFFERENCE BETWEEN CSMA /CA AND CSMA /CD

S. CSMA CD CSMA CA
NO

1. It is the type of It is the type of CSMA to avoid collision on


CSMA to detect the a shared channel.
collision on a shared
channel.

2. It is the collision It is the collision avoidance protocol.


detection protocol.

3. It is used in 802.3 It is used in the 802.11 Ethernet network.


Ethernet network
cable.

4. It works in wired It works in wireless networks.


networks.
5. It is effective after It is effective before collision detection on a
collision detection network.
on a network.

6. Whenever a data Whereas the CSMA CA waits until the


packet conflicts in a channel is busy and does not recover after a
shared channel, it collision.
resends the data
frame.

7. It minimises the It minimises the risk of collision.


recovery time.

8. The efficiency of The efficiency of CSMA CA is similar to


CSMA CD is high CSMA.
as compared to
CSMA.

9. It is more popular It is less popular than CSMA CD.


than the CSMA CA
protocol.

You might also like