0% found this document useful (0 votes)
6 views

computernetworksUNIT 2 PPT

computernetworks UNIT 2 PPT

Uploaded by

chinkyreddy1
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)
6 views

computernetworksUNIT 2 PPT

computernetworks UNIT 2 PPT

Uploaded by

chinkyreddy1
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
You are on page 1/ 44

MAC PROTOCOLS

MEDIUM ACCESS CONTROL


• MEDIUM ACCESS CONTROL SUBLAYER
• Data link layer in the OSI model is divided into two layers,
• 1)Logical Link control Sublayer
• 2) Medium Access Control Sublayer
• Medium Access Control Sublayer is responsible for
• Physical Addressing (MAC address)
• Access Control (Channel Allocation)
MAC ADDRESSING:
• A media access control address (MAC address) is a unique identifier
assigned to network interfaces for communications on the physical
network segment.
• MAC addresses are used for numerous network technologies and
most IEEE 802 network technologies, including Ethernet
• MAC addresses are most often assigned by the manufacturer of a
network interface card (NIC) and are stored in its hardware, such as
the card's read-only memory or some other firmware mechanism.
• MAC address is 48-bit address space contains potentially 2 power 48
or 281,474,976,710,656 possible MAC addresses.
CHANNEL ALOCATION
• Networks can be divided into two categories:
• Networks those are using point-to-point connections and
• Networks those using broadcast channels.
• In any broadcast network, the key issue is how to determine who
gets to use the channel when there is competition for it.
• Broadcast channels are sometimes referred to as multi-access
channels or random access channels.
• Static Channel Allocation in LANs and MANs
• Frequency Division Multiplexing (FDM): If there are N users, the
bandwidth is divided into N equal-sized portions, each user being
assigned one portion. Drawback of FDM: FDM is a simple and
efficient allocation mechanism. But, when the number of senders is
large and continuously varying or the traffic is bursty.
• Time Division Multiplexing: Each user is statically allocated every Nth
time slot. If a user does not use the allocated slot. The same holds if
we split up the networks physically
Dynamic Channel Allocation in LANs and
MANs
• Dynamic channel allocation problems have five key assumptions:
• Station Model. The model consists of N independent stations (e.g.,
computers, telephones, or personal communicators), each with a
program or user that generates frames for transmission.

• 2. Single Channel Assumption. A single channel is available for all


communication. All stations can transmit on it and all can receive
from it. As far as the hardware is concerned, all stations are
equivalent, although protocol software may assign priorities to them.
• Collision Assumption. If two frames are transmitted simultaneously,
they overlap in time and the resulting signal is garbled. This event is
called a collision. All stations can detect collisions. A collided frame
must be transmitted again later. There are no errors other than those
generated by collisions.
• 4)a. Continuous Time. Frame transmission can begin at any instant. There is
no master clock dividing time into discrete intervals.
• Slotted Time. Time is divided into discrete intervals (slots). Frame
transmissions always begin at the start of a slot. A slot may contain 0, 1, or
more frames, corresponding to an idle slot, a successful transmission, or a
collision, respectively.
• 5. a. Carrier Sense. Stations can tell if the channel is in use before trying to
use it. If the channel is sensed as busy, no station will attempt to use it until
it goes idle.
• b. No Carrier Sense. Stations cannot sense the channel before trying to use
it. They just go ahead and transmit. Only later can they determine whether
the transmission was successful
MAC PROTOCOLS
ALOHA
• ALOHA, the earliest random access method, was developed
at the University of Hawaii in early 1970.
• It was designed for a radio (wireless) LAN, but it can be used
on any shared medium.
• It is obvious that there are potential collisions in this
arrangement.
• The medium is shared between the stations. When a station
sends data, another station may attempt to do so at the
same time. The data from the two stations collide and
become garbled.
TYPES OF ALOHA

• Pure ALOHA
• Slotted ALOHA
PURE ALOHA
The original ALOHA protocol is called pure ALOHA.
This is a simple, but elegant protocol.
•The idea is that each station sends a frame
whenever it has a frame to send.
•Since there is only one channel to share, there is
the possibility of collision between frames from
different stations.
• A collision involves two or more stations
• The pure ALOHA protocol relies on acknowledgments from the
receiver.

• Collision Prevention in Pure ALOHA:


• Pure ALOHA dictates that when the time-out period passes, each station waits a
random amount of time before resending its frame.
• After a maximum number of retransmission attempts Kmax' a station must give
up and try later.
• Vulnerable Time: The length of the collision is given by the Vulnerable Time.
• Pure ALOHA vulnerable time = 2 x Tfr

Figure: Vulnerable Time of
SLOTTED ALOHA
Slotted ALOHA was invented to improve the
efficiency of pure ALOHA
In slotted ALOHA we divide the time into slots of
Tfr s and force the station to send only at the
beginning of the time slot.
• Because a station is allowed to send only at the beginning of the
synchronized time slot, if a station misses this moment, it must wait
until the beginning of the next time slot.
• This means that the station which started at the beginning of this slot
has already finished sending its frame
SLOTTED ALOHA
Slotted ALOHA vulnerable time = Tfr
CSMA
• To minimize the chance of collision and, therefore, increase the
performance, the CSMA method was developed.
• The chance of collision can be reduced if a station senses the medium
before trying to use it.
• CSMA is based on the principle "sense before transmit" or "listen
before talk.“
• Persistence Methods of CSMA
• There are three methods for CSMA persistence
• 1-persistent CSMA
• Non Persistent CSMA
• P-persistent CSMA
1-Persistennt CSMA:
The I-persistent method is simple and straightforward.
• In this method, after the station finds the line idle, it
sends its frame immediately (with probability 1).
2.Non Persistent Method, a station that has a frame to send
• senses the line. If the line is idle, it sends immediately. If the
line is not idle, it waits a random amount of time and then
senses the line again.
• The Non Persistent approach reduces the chance of collision
because it is unlikely that two or more stations will wait the
same amount of time and retry to send simultaneously.
3.P-Persistent CSMA:
• The p-persistent method is used if the channel has time slots
with a slot duration equal to or greater than the maximum
propagation time.
• The p-persistent approach combines the advantages of the
other two strategies.
• It reduces the chance of collision and improves efficiency.
CSMA/CD (Carrier Sense Multiple Access with Collision
Detection):
• The CSMA method does not specify the procedure following
a collision. Carrier sense multiple access with collision
detection (CSMA/CD) augments the algorithm to handle the
collision.
• If two stations sense the channel to be idle and begin
transmitting simultaneously, they will both detect the
collision. quickly stop sending the frame and retransmit,
saves time and bandwidth.
• Ex:Ethernet LAN
• The level of energy in a channel can have three values: zero,
normal, and abnormal.
• At the zero level, the channel is idle. This level is also called Idle
Period.
• At the normal level, a station has successfully captured the
channel and is sending its frame. This level is called Transmission
Period.
• At the abnormal level, there is a collision and the level of the
energy is twice the normal level. This is called Contention Period.
• A station that has a frame to send or is sending a frame needs to
monitor the energy level to determine if the channel is idle, busy,
or in collision mode.
CSMA-CD
CSMA -CA
Interframe Space:
• lCollisions 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
• The 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
• Acknowledgements:
• 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.
IEEE has defined the specifications for a
wireless LAN, called IEEE 802.11
Architecture
The standard defines two kinds of services:
The Basic Service Set (BSS) and The extended service set
(ESS).
•Basic Service Set
•IEEE 802.11 defines the basic service set (BSS) as
the building block of a wireless LAN.
•A basic service set is made of stationary or mobile wireless
stations and an optional central base station, known as the
access point (AP).
Extended Service Set:

An extended service set (ESS) is made up of two or more


BSSs with APs. In this case, the BSSs are connected
through a distribution system, which is usually a wired
LAN.The distribution system connects the APs in the BSS
Frame Format
Sub fields
• Addresses: There are four address fields, each 6 bytes long. The
meaning of each address field depends on the value of the To DS and
From DS subfields.
Sequence control: This field defines the sequence
number of the frame to be used in flow control.
Frame body: This field, which can be 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.
Hidden Station problem
Hidden Station Problem can be solved using
the handshake frames (RTS and CTS)
Exposed Station Problem:
Computer Network Devices
THANK YOU

You might also like