R19 CNSA - Unit 3
R19 CNSA - Unit 3
UNIT – III
Media Access Control Layer
Contents
link.
Multiple access protocols are needed in LANs, Wi-Fi, and satellite networks to
Logical Link Control (LLC): responsible for data link control (flow
shared media
Taxonomy of Multiple-Access Protocols
Random Access Protocols
In random access or contention methods, no station is superior to another
station and none is assigned the control over another.
No station permits another station to send.
At each instance, a station that has data to send uses a procedure defined
by the protocol to make a decision on whether or not to send.
ALOHA
• Collision: An access conflict occurs when more than one station tries to
send, as a result the frame will be either destroyed or modified.
Random Access
Each station follows a procedure that answer the following questions to
avoid collision:
When can the station access the medium?
transmission?
What can the station do if there is an access conflict ?
Evolution of Random-Access methods
ALOHA: Uses MA (Multiple Access), No carrier sense
It divides the time into slots of Tfr and force the station to send only at the
beginning of the time slot.
If the station miss the beginning of synchronized time slot, it must wait
until the beginning of next time slot.
Frames in a Slotted ALOHA network
Carrier Sense Multiple Access (CSMA)
Developed to minimize collisions and increase the performance
A station now “follows” the activity of other stations
Simple rules for a polite human conversation
If someone else begins talking at the same time as you, stop talking
Based on the principle “Listen before talk” or “Sense before transmit”
CSMA
A node should not send, if another node is already sending → carrier
sensing
C
Vulnerable time in CSMA
Vulnerable time: Time in which there is a possibility of collision.
Vulnerable time for CSMA is the max propagation time, Tp needed for a
signal to propagate from one end of the medium to the other.
When a station sends a frame, and any other station tries to send during
this time it leads to collision.
But if the first bit of frame reaches the end of medium, every other station
will already have heard the bit and will refrain from sending.
Types of CSMA Protocols
1. 1-persistence method
2. Non-persistence method
3. P-persistence method
1-persistence method
Jamming signal enforces the collision in case other stations have not yet
sensed the collision.
Collision Detection
How the station detects a collision?
Detecting voltage level on the line
Detecting energy level
Detecting simultaneous transmissions and receptions
Energy in channel can have three values: zero, normal, and abnormal.
At zero level, the channel is idle.
At the normal level, a station has successfully captured the channel and is
sending its frame.
At the abnormal level, there is a collision and the level of the energy is
twice the normal level.
Carrier Sense Multiple Access /Collision Avoidance
In CSMA/CA, if the station finds the channel busy, it does not restart the
timer of the contention window; it stops the timer and restarts it when
the channel becomes idle.
CSMA/CA was mostly intended for use in wireless networks.
Contention window
size is 2K-1
Predecessor is the station which is logically before the station in the ring
Successor is the station which is logically after the station in the ring
How is the right to access the channel passed from one station to
another?
Token Passing (Contd.)
Station is authorized to send data when it receives a special packet called
a token.
Stations are arranged around a ring.
When no data is being sent, a token circulates the ring.
If a station needs to send data, it waits for the token.
The station captures the token and sends one or more frames (as long as it
has frames to send or the allocated time has not expired), and finally it
releases the token to be used by next station (successor).
The maximum time any station can hold the token is limited.
Since there is only one token, only one station transmits at a time, and
collisions never occur.
Token Passing (Contd.)
Token management is needed for this access method:
Stations must be limited in the time they can have possession of the token.
The token must be monitored to ensure it has not been lost or destroyed
(if the station that is holding the token fails, the token will disappear from
the network).
Data Representation
Transmission in CDMA
CDMA Encoding
Signal Created by CDMA
CDMA Decoding
IEEE 802.11 Wireless LAN Standard
• In response to lacking standards, IEEE developed the first
internationally recognized wireless LAN standard – IEEE 802.11
• IEEE published 802.11 in 1997, after seven years of work
• Scope of IEEE 802.11 is limited to Physical and Data Link Layers
• Benefits:
Appliance Interoperability
Fast Product Development
Stable Future Migration
Price Reductions
The 802.11 standard takes into account the following significant
differences between wireless and wired LANs:
Power Management
Security
Bandwidth
IEEE 802.11 Terminology
Access Point (AP): A station that provides access to the DS.
Basic Service Set (BSS): An ad-hoc self-contained network with
station-to-station traffic flowing directly, receiving data transmitted by
another station, and only filtering traffic based on the MAC address of
the receiver.
A set of stationary or mobile wireless stations and an optional central
base station, known as the access point (AP).
Distribution System (DS): A system used to interconnect a set of BSSs
to create an ESS.
DS is implementation-independent. It can be a wired 802.3
Ethernet LAN, 802.4 token bus, 802.5 token ring or another 802.11
medium.
Extended Service Set (ESS):Two or more BSS interconnected by DS
Extended service set uses two types of stations: mobile and
stationary.
The mobile stations are normal stations inside a BSS. The stationary
stations are AP stations that are part of a wired LAN.
IEEE 802.11 – MAC Sublayer
IEEE 802.11 defines two MAC sublayers:
The Distributed Coordination Function (DCF) and the Point
Coordination Function (PCF)
Frame Control (FC): The FC field is 2 bytes long and defines the type of
frame and some control information.
Subfields in FC field
Frame Format (Contd.)
D (Duration):
In all frames types (except in one type), this field defines the value
of Network Allocation Vector (NAV).
In one control frame only, this field defines the ID of the frame.
Addresses:
There are 4 address fields, each 6 bytes long.
The meaning of each address field depends on the value of To DS
and From DS subfields.
Sequence Control:
This field defines the sequence number of the frame to be used in
flow control.
Frame Format (Contd.)
Frame body:
This field, which ranges between 0 and 2312 bytes, contains
information based on the type and the subtype defined in the FC field.
FCS:
The FCS field is 4 bytes long and contains a CRC-32 error detection
sequence.
Frame Types
IEEE 802.11 has 3 categories of frames: Management frames, Control
frames, Data frames.
Management frames: Management frames are used for the initial
communication between stations and access points.
Control frames: Control frames are used for accessing the channel
and acknowledging frames.
Values of subfields in
control frames
Data Frames: Data frames are used for carrying data and control
information.
Switched Network
With a large number of end systems it is not practical to connect each pair.
In large networks, we need some means to allow one-to-one
communication between any two nodes.
These are ruled out for large networks either because of the increased
distance or devices.
Tear-down phase:
When the last of the data arrives at the destination, the tear-down
begins where the resources are released.
“Busy Signal” if capacity for a circuit not available.
Circuit Switch - Telephone call between two users
Delay in a circuit-switched network
Once the connection is established, there is minimal delay for data
between the stations.
networks because
o Resources are allocated during entire session of connection that
Connectionless implies that the path between sender and receiver is not
dedicated. Hence no resource allocation (bandwidth, processing time).
Resources are allocated on demand, i.e., on FCFS.
Switch 1 receives the request and gets to know that it should go out
through Port 3 and creates an entry for this virtual circuit. It fills only
three of the four columns and the outgoing VCI will be found during the
acknowledgement step.
It then forwards to switch 2 and the same events happen here as at switch
Now, “B” receives setup frame and if it is ready to receive frames from “A”,
it assigns VCI to incoming frames from “A”, i.e., 77. This VCI lets
destination know that frames come from “A” and not from other sources.
Set up Acknowledgement in VCN
Acknowledgement Frame
After sending all frames, a special frame called Tear Down Request is sent to
end the connection. “B” responds with a tear down confirmation frame. All
switches delete the corresponding entry from their tables.
Delay in a Virtual Circuit Network
In VCN, all the packets that belong to the same source and destination
travel the same path, but packet may arrive at the destination with
different delays if resource allocation is on demand.
Comparison
Datagram Packet VC Packet
Circuit Switching Switching Switching
Dedicated transmission No dedicated No dedicated
path transmission path transmission path
Continuous Transmission of Transmission of
transmission packets packets
Path stays fixed for
Route of each packet Path stays fixed for
is independent entire connection
entire connection
No setup delay Call setup delay
Call setup delay
Transmission delay Transmission delay
Negligible transmission for each packet for each packet
delay
Queueing delays at Queueing delays at
No queuing delay switches switches
Busy signal overloaded Delays increase in Delays increase in
network overloaded networks overloaded networks
Fixed bandwidth for Bandwidth is shared Bandwidth is shared
each circuit by all packets by all packets
No overhead after call Overhead in each Overhead in each
setup packet packet