0% found this document useful (0 votes)
8 views67 pages

Understanding CSMA Variants in Networking

The document discusses the Carrier Sense Multiple Access (CSMA) method and its variations, including 1-persistent, non-persistent, P-persistent, and O-persistent algorithms, which help manage data transmission in shared media to minimize collisions. It also covers CSMA/CD and CSMA/CA protocols used in Ethernet and Wi-Fi, respectively, detailing their mechanisms for collision detection and avoidance. Additionally, the document outlines controlled access protocols such as reservation, polling, and token passing, along with the IEEE 802 standards for wired and wireless LANs.

Uploaded by

trailacc94
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)
8 views67 pages

Understanding CSMA Variants in Networking

The document discusses the Carrier Sense Multiple Access (CSMA) method and its variations, including 1-persistent, non-persistent, P-persistent, and O-persistent algorithms, which help manage data transmission in shared media to minimize collisions. It also covers CSMA/CD and CSMA/CA protocols used in Ethernet and Wi-Fi, respectively, detailing their mechanisms for collision detection and avoidance. Additionally, the document outlines controlled access protocols such as reservation, polling, and token passing, along with the IEEE 802 standards for wired and wireless LANs.

Uploaded by

trailacc94
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

DATA LINK LAYER

CSMA
• To minimize the chance of collisions and
increase performance, the Carrier Sense
Multiple Access (CSMA) method was developed
• CSMA verifies the absence of other traffic
before transmitting on a shared transmission
medium
• That is, it tries to detect the presence of a
carrier signal from another node before
attempting to transmit by using a carrier sense
mechanism
• CSMA can reduce the possibility of collision,
but it cannot eliminate it due to propagation
delay
• Variations of CSMA use different algorithms to
determine when to initiate transmission onto the
shared medium
• A key distinguishing feature of these algorithms
is how aggressive or persistent they are in
initiating transmission.
• A more aggressive algorithm may begin
transmission more quickly and utilize a greater
percentage of the available bandwidth of the
medium.
• Variations of CSMA are
1. 1-persistent
2. Non-persistent
3. P-persistent
4. O-persistent
1-persistent
• 1-persistent CSMA is an aggressive transmission
algorithm.
• When the transmitting node is ready to transmit,
it senses the transmission medium for idle or busy.
• If idle, then it transmits immediately.
• If busy, then it senses the transmission medium
continuously until it becomes idle, then transmits
the message unconditionally
• 1-persistent CSMA is used in CSMA/CD systems
including Ethernet.
Non-persistent
• Non persistent CSMA is a non-aggressive
transmission algorithm.
• When the transmitting node is ready to transmit
data, it senses the transmission medium for idle or
busy.
• If idle, then it transmits immediately.
• If busy, it waits for random period of time before
repeating the whole logic cycle again: it does not
persist in checking the busy channel trying to get its
transmission through, hence the name.
• This approach reduces the chance of collision
P-persistent
• This approach lies between the 1-persistent
and non-persistent CSMA access modes.
• P-persistent CSMA is used in CSMA/CA
systems including Wi-Fi and other packet
radio systems.
• When the transmitting node is ready to
transmit data, it senses the transmission
medium for idle or busy.
• If idle, then it transmits immediately.
• If busy, then it senses the transmission
medium continuously until it becomes idle,
then transmits with probability p.
• If the node does not transmit, it waits until
the next available time slot.
• If the transmission medium is not busy, it
transmits again with the same probability p.
O-persistent
• Each node is assigned a transmission order by
a supervisory node.
• When the transmission medium goes idle,
nodes wait for their time slot in accordance
with their assigned transmission order.
• The node assigned to transmit first transmits
immediately.
• The node assigned to transmit second waits
one time slot.
• Nodes monitor the medium for transmissions
from other nodes and update their assigned
order with each detected transmission
Variations on basic CSMA include
• Collision avoidance
• Collision detection
• Collision resolution
CSMA/CD
• Carrier Sense Multiple Access with Collision
Detection(CSMA/CD) expands the CSMA
algorithm to handle the collision
• In this method, a station monitors the
medium after it sends a frame to see if the
transmission was successful
• If so, the station is finished. If, however, there
is a collision, the frame is sent again.
• CSMA/CD improvers performance by
terminating transmission as soon as collision is
detected
• CSMA/CD is used by Ethernet
• To better understand CSMA/CD, let us look at
the first bits transmitted by the two stations
involved in the collision.
• Although each station continues to send bits
in the frame until it detects the collision, we
show what happens as the first bits collide.
• In Figure, stations A and C are involved in the
collision.
• At time t 1, station A has executed its
persistence procedure and starts sending the
bits of its frame.
• At time t2, station C has not yet sensed the
first bit sent by A.
• Station C executes its persistence procedure
and starts sending the bits in its frame, which
propagate both to the left and to the right.
The collision occurs sometime after time t2.
• Station C detects a collision at time t3 when it
receives the first bit of A's frame.
• Station C immediately (or after a short time,
but we assume immediately) aborts
transmission.
• Station A detects collision at time t4 when it
receives the first bit of C's frame; it also
immediately aborts transmission.
• A transmits for the duration t4 – t1; C
transmits for the duration t3 - t2.
• At time t4, the transmission of A’s frame,
though incomplete, is aborted; at time t3, the
transmission of B's frame, though incomplete,
is aborted.
CSMA/CA
• In Carrier Sense Multiple Access with Collision
Avoidance, collision avoidance is used to
improve the performance of CSMA
• If the transmission medium is sensed busy
before transmission, then the transmission is
delayed for a random interval.
• This random interval reduces the likelihood
that two or more nodes waiting to transmit
will simultaneously begin transmission upon
termination of the detected transmission, thus
reducing the incidence of collision.
• CSMA/CA is used by Wi-Fi.
• CSMA/CA uses the following three strategies
to avoid collisions:
1. The Inter-frame space
2. Contention Window
3. Acknowledgement
The Inter-frame space
• First, collisions are avoided by deferring
transmission even if the channel is found idle.
• When an idle channel is found, the station
does not send immediately.
• It waits for a period of time called the
interframe space or IFS.
• Even though the channel may appear idle
when it is sensed, a distant station may have
already started transmitting.
• The IFS variable can also be used to prioritize
stations or frame types.
• For example, a station that is assigned a
shorter IFS has a higher priority.
Contention Window
• The contention window is an amount of time
divided into slots.
• A station that is ready to send chooses a
random number of slots as its wait time.
• The number of slots in the window changes
according to the binary exponential back-off
strategy.
• This means that it is set to one slot the first
time and then doubles each time the station
cannot detect an idle channel after the IFS
time.
Acknowledgement
• With all these precautions, there still may be a
collision resulting in destroyed data.
• In addition, the data may be corrupted during
the transmission.
• The positive acknowledgment and the time-
out timer can help guarantee that the receiver
has received the frame
Controlled Access Protocols
• In controlled access, the stations consult one
another to find which station has the right to
send
• A station cannot send unless it has been
authorized by other stations.
Types of Controlled Access Techniques
• The three popular controlled-access methods
are:
1. Reservation
2. Polling
3. Token Passing
Reservation
• In the reservation method, a station needs to
make a reservation before sending data.
• Time is divided into intervals. In each interval,
a reservation frame precedes the data frames
sent in that interval.
• If there are N stations in the system, there are
exactly N reservation mini slots in the
reservation frame.
• Each mini slot belongs to a station.
• When a station needs to send a data frame, it
makes a reservation in its own mini slot.
• The stations that have made reservations can
send their data frames after the reservation
frame.
• Figure shows a situation with five stations and
a five-mini slot reservation frame. In the first
interval, only stations 1, 3, and 4 have made
reservations. In the second interval, only
station 1 has made a reservation.
Polling
• Polling works with topologies in which one
device is served as a primary station and the
other devices are secondary stations.
• All data exchanges must be made through the
primary device even when the destination is a
secondary device.
• The primary device controls the link; the
secondary devices follow its instructions.
• It is up to the primary device to determine
which device is allowed to use the channel at
a given time.
• The primary device, therefore, is always the
initiator of a session.
• The primary device sends and receives data by
using Select and Poll function.
Token Passing
• In the token-passing method, the stations in a
network are organized in a logical ring.
• In other words, for each station, there is a
predecessor and a successor.
• In this method, a special packet called a token
circulates through the ring.
• The possession of the token gives the station
the right to access the channel and send its
data.
• When a station has some data to send, it
waits until it receives the token from its
predecessor. It then holds the token and
sends its data.
• When the station has no more data to send, it
releases the token, passing it to the next
logical station in the ring.
• The station cannot send data until it receives
the token again in the next round.
• In this process, when a station receives the
token and has no data to send, it just passes
the data to the next station (successor)
• Token management is needed for this access
method.
• Stations must be limited in the time
• The token must be monitored to ensure it has
not been lost or destroyed
• Tokens can be assigned priorities also.
Wired LAN
• A local area network(LAN) is a computer
network that interconnects computers within
a limited area such as a residence, school,
laboratory, university campus or office
building
• A LAN may be wired, wireless or combination
of the two
• Wired is the term that refers to any physical
medium consisting of cables
• The cables can be copper wire, twisted pair or
fibre optic
• A wired LAN uses cables to connect devices to
the Internet or another network
IEEE Standards
• In 1985, The Computer Society of the IEEE
started a project called Project 802, to set
standards to enable intercommunication
among equipment from a variety of
manufacturers
• The objective was to provide a way for
specifying functions of the physical layer and
the data link layer of major LAN protocols
• The services and protocols specified in IEEE
802 map to the lower two layers (Data Link
Layer and Physical Layer) of the seven layer
OSI networking reference model
• The IEEE 802 standard splits the OSI Data Link
Layer into sub layers named Logical Link
Control (LLC) and Media Access Control (MAC)
Logical Link Control (LLC)
• The LLC provides single link-layer control
protocol for all IEEE LANS
• This means LLC protocol can provide
interconnectivity between different LANs
because it makes the MAC sublayer
transparent
• The LLC layer performs flow control, error
control and part of framing duties
Media Access Control (MAC)
• The MAC that defines the specific access
method for each LAN
• The MAC layer varies for different network
types and is defined by different standards
• A part of framing function is also handled by
the MAC layer
• IEEE 802 is subdivided into 22 parts that cover
the physical and data-link aspects of
networking
• Many of the standards are either inactive or
disbanded
• The better known specifications include 802.3
Ethernet, 802.11 Wi-Fi, 802.15 Bluetooth and
802.16 Broadband Wireless Access
IEEE 802.3 Ethernet
• The most widely used high-speed LANs are
based on Ethernet and were developed by the
IEEE 802.3 standards committee.
• The services and protocols specified in IEEE
802.3 map to the lower two layers of the
seven layers OSI networking reference model.
• IEEE 802.3 splits the OSI Data Link Layer into
two sub layers named logical link control and
media access control
• All standard implementation use digital
signalling (baseband) at 10 Mbps
• At the sender, data are converted to a digital
signal using the Manchester scheme.
• At the receiver, the received signal is
interpreted as Manchester and decoded into
data.
• The four most common physical layer
implementations are:
1.10 Base 5 : Thick Ethernet or Thicknet
2.10 Base 2 : Thin Ethernet or Cheapernet
3.10 Base T : Twisted Pair Ethernet
4.10 Base F : Fiber Ethernet
10 Base 5 : Thick Ethernet or Thicknet
• The name derives from the size of the cable
• 10 Base 5 used a thicker coaxial cable
to connect devices in a network.
• It supported a maximum speed of 10 Mbps
and had a maximum segment length of 500
meters.
• It was the first Ethernet specification to use a
bus topology with an external transceiver
10 Base 2 : Thin Ethernet or
Cheapernet
• 10 Base 2 also uses a bus topology, but the
cable is much thinner and more flexible
• The cable can be bent to pass very close to the
stations.
• In this case, the transceiver is normally part of
the network interface card (NIC), which is
installed inside the station.
10 Base T : Twisted Pair Ethernet
• 10 Base-T uses a physical star topology.
• The stations are connected to a hub via two pairs
of twisted cable.
• Two pairs of twisted cable create two paths
between the station and the hub.
• Any collision here happens in the hub. The hub
actually replaces the coaxial cable as far as a
collision is concerned.
• The maximum length of the twisted cable is
defined as 100 m, to minimize the effect of
attenuation in the twisted cable.
10 Base F : Fiber Ethernet
• Although there are several types of optical
fiber 10-Mbps Ethernet, the most common is
called 10Base-F.
• 10Base-F uses a star topology to connect
stations to a hub.
• The stations are connected to the hub using
two fiber-optic cables.
Summary
• Ethernet stations communicate by sending
each other data packets; blocks of data
individually sent and delivered.
• Each Ethernet station is given a 48-bit MAC
address
• The MAC addresses are used to specify both
the destination and the source of each data
packet
• In a modern Ethernet, each station
communicates with a switch, which in turn
forwards that traffic to the destination station.
• In this topology, collisions are only possible if
station and switch attempt to communicate
with each other at the same time, and
collisions are limited to this link.
• The 10 BASE T standard introduced a full
duplex mode of operation which became
common with Fast Ethernet and the standard
with Gigabit Ethernet.
• In full duplex, switch and station can send and
receive simultaneously, and therefore modern
Ethernets are completely collision-free.
IEEE 802.11 – Wireless LAN
• Wireless LANs are those Local Area Networks
that use electromagnetic waves
• Most Wireless LANs are based on the standard
IEEE 802.11 or WiFi
• It specifies the set of Media Access Control
(MAC) and physical layer protocols for
implementing Wireless Local Area
Network(WLAN)
• IEEE 802.11 uses various frequencies
including, but not limited to, 2.4 GHz, 5 GHz,
6 GHz, and 60 GHz frequency bands.
• Although IEEE 802.11 specifications list
channels that might be used, the radio
frequency spectrum availability varies
significantly by regulatory domain.
• They are the most widely used wireless
computer networking standards
• IEEE 802.11 is used in most home and office
networks to allow laptops, printers, smart
phones, and other devices to communicate
with each other and access
the Internet without connecting wires.
• The IEEE 802.11 protocols are typically used in
conjunction with IEEE 802.2, and are designed
to interwork seamlessly with Ethernet.
• These are very often used to carry Internet
Protocol traffic.
• The 802.11 protocol family employs CSMA/CA
whereby equipment listens to a channel for
other users before transmitting each frame
IEEE 802.15.1 Bluetooth
• Bluetooth is a wireless technology standard
• It is used for exchanging data between fixed
and mobile devices over short distances using
short wavelength Ultra High Frequency radio
waves
• It operates in the unlicensed industrial,
scientific and medical (ISM) band at 2.4 to
2.485 GHz and building Personal Area
Network(PAN)
• Bluetooth requires that a low cost transceiver
chip can be included in each device
• Bluetooth technology was invented in 1994 by
engineers at Ericsson, a Swedish company.
• Bluetooth is symmetrical between two
Bluetooth devices
• Bluetooth serves well in simple applications
where two devices need to connect with a
minimal configuration like a button press as
on headsets and remote controls.

You might also like