0% found this document useful (0 votes)
13 views83 pages

UNIT -II(DLL)(PART 2)

The document discusses multiple access protocols in the data link layer, highlighting the roles of the logical link control (LLC) and media access control (MAC) layers. It explains various random access protocols such as ALOHA and CSMA, as well as controlled access protocols like reservation, polling, and token passing. Additionally, it covers channelization methods including FDMA, TDMA, and CDMA for efficient bandwidth sharing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views83 pages

UNIT -II(DLL)(PART 2)

The document discusses multiple access protocols in the data link layer, highlighting the roles of the logical link control (LLC) and media access control (MAC) layers. It explains various random access protocols such as ALOHA and CSMA, as well as controlled access protocols like reservation, polling, and token passing. Additionally, it covers channelization methods including FDMA, TDMA, and CDMA for efficient bandwidth sharing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 83

UNIT II

MULTIPLE ACCESS PROTOCOLS


MULTIPLE ACCESS PROTOCOLS
• We can consider the data link layer as two sub layers. The upper
sub layer is responsible for data link control, and the lower sub
layer is responsible for resolving access to the shared media
MULTIPLE ACCESS PROTOCOLS

• The upper sub layer that is responsible for flow and error
control is called the logical link control (LLC) layer; the lower
sub layer that is mostly responsible for multiple access
resolution is called the media access control (MAC) layer.

• When nodes or stations are connected and use a common


link, called a multipoint or broadcast link, we need a multiple-
access protocol to coordinate access to the link.
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.
• Two features give this method its name.

• First, there is no scheduled time for a station to transmit.


Transmission is random among the stations. That is why these
methods are called random access.

• Second, no rules specify which station should send next. Stations


compete with one another to access the medium. That is why
these methods are also called contention methods.
ALOHA

1. 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. However, since there is only one channel to
share, there is the possibility of collision between frames
from different stations.

•Below Figure shows an example of frame collisions in pure


ALOHA.
Frames in a pure ALOHA network
• In pure ALOHA, whenever any station transmits a frame, it
expects the acknowledgement from the receiver. If
acknowledgement is not received within specified time, the
station assumes that the frame (or acknowledgement) has been
destroyed.

• If the frame is destroyed because of collision the station waits


for a random amount of time and sends it again.
• This waiting time must be random otherwise same frames will
collide again and again. This randomness will help avoid more
collisions.
Vulnerable time
• Let us find the length of time, the vulnerable time, in which
there is a possibility of collision.
We assume that the stations send fixed- length frames with each
frame taking Tfr S to send. Below Figure shows the vulnerable
time for station A.

The throughput for pure ALOHA is S = G × e −2G . The


maximum throughput Smax = 0.184 when G= (1/2).
• Station A sends a frame at time t. Now imagine station B has
already sent a frame between t - Tfr and t. This leads to a
collision between the frames from station A and station B.
• The end of B's frame collides with the beginning of A's frame.
On the other hand, suppose that station C sends a frame
between t and t + Tfr .
• Here, there is a collision between frames from station A and
station C. The beginning of C's frame collides with the end of
A's frame
• Looking at Figure, we see that the vulnerable time, during
which a collision may occur in pure ALOHA, is 2 times the
frame transmission time. Pure ALOHA vulnerable time = 2 x Tfr
2.Slotted ALOHA

• Pure ALOHA has a vulnerable time of 2 x Tfr . This is so


because there is no rule that defines when the station can send.
A station may send soon after another station has started or
soon before another station has finished. 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.
Figure 3 shows an example of frame collisions in slotted
ALOHA
Collisions in slotted ALOHA
• 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. Of course,
there is still the possibility of collision if two stations try to
send at the beginning of the same time slot.

• However, the vulnerable time is now reduced to one-half,


equal to Tfr . Below figure shows the situation
• Below fig shows that the vulnerable time for slotted ALOHA is
one-half that of pure ALOHA. Slotted ALOHA vulnerable time =
Tfr

The throughput for slotted ALOHA is S = G × e−G . The


maximum throughput Smax = 0.368 when G = 1.
Comparison between Pure Aloha & Slotted Aloha
Carrier Sense Multiple Access (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.

• Carrier sense multiple access (CSMA) requires that each


station first listen to the medium (or check the state of the
medium) before sending.

• In other words, CSMA is based on the principle "sense


before transmit" or "listen before talk."
• CSMA can reduce the possibility of collision, but it cannot
eliminate it. The reason for this is shown in below Figure.

• The possibility of collision still exists because of propagation


delay; station may sense the medium and find it idle, only
because the first bit sent by another station has not yet been
received.

• At time tI' station B senses the medium and finds it idle, so


it sends a frame. At time t2 (t2> tI)' station C senses the
medium and finds it idle because, at this time, the first bits
from station B have not reached station C. Station C also
sends a frame. The two signals collide and both frames are
destroyed.
Space/time model of the collision in CSMA
Vulnerable Time
•The vulnerable time for CSMA is the propagation time Tp.
This is the time needed for a signal to propagate from one
end of the medium to the other.
Persistence Methods

•What should a station do if the channel


is busy? What should a station do if the channel is idle?
Three methods have been devised to answer these
questions:

•1-persistent method
•non-persistent method
•p-persistent method
• 1-Persistent: In this method, after the station finds the line
idle, it sends its frame immediately (with probability 1).
This method has the highest chance of collision because
two or more stations may find the line idle and send their
frames immediately.

• Non-persistent: 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. This approach reduces the chance of collision
However, this method reduces the efficiency of the network
because the medium remains idle when there may be
stations with frames to send.
p-Persistent: This 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.
In this method, after the station finds the line idle it follows
these steps:
1.With probability p, the station sends its frame.
2. With probability q = 1-p, the station waits for the
beginning of the next time slot and checks the line
again.
a.If the line is idle, it goes to step 1.
b. If the line is busy, it acts as though a collision has occurred
and uses the backoff procedure.
Carrier Sense Multiple Access with Collision
Detection (CSMA/CD)

• The CSMA method does not specify the procedure following


a collision. CSMA/CD augments the 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 successful,
the station is finished, if not, the frame is sent again.

• 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 below Figure, stations A and C are involved in
the collision.
Collision of the first bit in CSMA/CD
How CSMA/CD works?

•Step 1: Check if the sender is ready for transmitting data


packets.

•Step 2: Check if the transmission link is idle?


Sender has to keep on checking if the transmission
link/medium is idle. For this it continuously senses
transmissions from other nodes. Sender sends dummy data on
the link. If it does not receive any collision signal, this means
the link is idle at the moment. If it senses that the carrier is free
and there are no collisions, it sends the data. Otherwise it
refrains from sending data.
•Step 3: Transmit the data & check for collisions.
Sender transmits its data on the link. CSMA/CD does not use
‘acknowledgement’ system.

•It checks for the successful and unsuccessful transmissions


through collision signals. During transmission, if collision signal
is received by the node, transmission is stopped.

•The station then transmits a jam signal onto the link and waits
for random time interval before it resends the frame. After some
random time, it again attempts to transfer the data and repeats
above process.

•Step 4: If no collision was detected in propagation, the sender


completes its frame transmission and resets the counters.
Carrier Sense Multiple Access with Collision
Avoidance (CSMA/CA)
• We need to avoid collisions on wireless networks because
they cannot be detected. Carrier sense multiple access with
collision avoidance (CSMA/CA) was invented for wirelesss
network. Collisions are avoided through the use of
CSMA/CA's three strategies:

• the inter frame space(IFS),


• the contention window, and
• acknowledgments, as shown in Below Figure
• 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-
transmits the data if acknowledgment is
not received before the timer expires.

1.32
CONTROLLED ACCESS PROTOCOLS
 Incontrolled access, the stations consults each
other to find which station has right to send.

 Controlledaccess protocols grants permission to


send only one node at a time, to avoid collision of
messages on the shared medium.

A station cannot send data unless it is authorized


by the other stations.
CONTROLLED ACCESS
 Nowwe will discuss three named controlled access
methods.

1. Reservation.
2. Polling
3. Token Passing
RESERVATION
• In the reservation method, a station needs to make a
reservation before sending data.

• If there are N stations in the system, there are


exactly N reservation mini slots in the reservation
frame.
• Suppose if station 1 has a frame to send, it transmits 1
bit during the slot 1. No other station is allowed to
transmit during this slot.

• After data transmission period, next reservation interval


begins.
RESERVATION

o Since everyone agrees on who goes next,


there will never be any collisions.

a situation with five stations and a five minislot


reservation frame.
2.POLLING

• Polling process is similar to the roll-call performed in


class. Just like the teacher, a controller sends a message
to each node in turn.

• In this, one acts as a primary station(controller) and


the others are secondary stations. All data exchanges
must be made through the controller.

• The message sent by the controller contains the


address of the node being selected for granting access.
 It
works with topologies in which one device is
designated as a Primary Station and the other
devices are Secondary Stations.

 ThePrimary device controls the link, where as the


secondary follows it’s instructions.

 Exchange of data must be made through the


primary device even though the final destination is
secondary.
POLL FUNCTION:
 When the primary is ready to receive data, it must
ask (poll) each device if it has anything to send.

 If
the secondary has data to transmit, it sends the
data frame. Otherwise, it sends a negative
acknowledgement(NAK) .

 The primary then polls the next secondary. When


the response is positive (a data frame), the primary
reads the frame and returns an acknowledgment
(ACK).
SELECT FUNCTION:

 Whenever primary has something to send, it sends


the message to each node.

 BeforeSending the data, it creates and transmits a


Select(SEL) frame, one field of it includes the
address of the intended secondary.

 While sending, the primary should know whether the


target device is ready to receive or not.
 Hence, it alerts the secondary for the upcoming
transmission and wait for an acknowledgement
(ACK) of secondary’s status.
3.TOKEN PASSING
FEATURES:
 A Station is authorized to send data it receives a
when special frame called a Token.
 Stations are arranged around a ring (physically or
logically)
- A Token circulates around a ring
 If a station needs to send data ,it waits for the
token captures the token and sends one or more
 The Station
frames as long as the allocated time has not expired
 It releases the token to be used by the successor
station.

Token
Station Interface is in two states :

Listen state: Listen to the arriving bits and check the


destination address to see if it is its own address. If yes the frame
is copied to the station otherwise it is passed through the output
port to the next station.

Transmit state: station captures a special frame called free


token and transmits its frames. Sending station is responsible
for reinserting the free token into the ring medium and for
removing the transmitted frame from the medium.
TOKEN PASSING FLOW CHART :
m

Channelization Protocol

• Channelization is a multiple access method in which


the available bandwidth of a link is shared in time,
frequency or code between different stations.
• There are three basic channelization protocols:
– Frequency Division Multiple Access (FDMA)
– Time Division Multiple Access (TDMA)
– Code Division Multiple Access (CDMA)
Frequency Division Multiple Access (FDMA)

• In FDMA, the available bandwidth is divided into frequency


bands.
• Each station is allocated a band to send its data.
• This band is reserved for that station for all the time.
• The frequency bands of different stations are separated guard
bands, it prevents station interferences.
• FDMA is different from FDM (Frequency Division
Multiplexing).
• FDM is a physical layer technique, whereas, FDMA is an access
method in the data link layer.
Time-Division Multiple Access (TDMA):

• In time-division multiple access (TDMA), the stations


share the bandwidth of the channel in time.

• Each station is allocated a time slot during which it can


send data. Each station transmits its data in is assigned
time slot.

• The following figure shows the idea behind TDMA.


• The main problem with TDMA lies in achieving synchronization
between the different stations. Each station needs to know the
beginning of its slot and the location of its slot.

• This may be difficult because of propagation delays introduced


in the system if the stations are spread over a large area.

• To compensate for the delays, we can insert guard times.


Synchronization is normally accomplished by having some
synchronization bits at the beginning of each slot.
CDMA
• Unlike TDMA, in CDMA all stations can transmit data
simultaneously.
• CDMA allows each station to transmit over the entire
frequency spectrum all the time.
• Multiple simultaneous transmissions are separated using
coding theory.
• In CDMA, each user is given a unique code sequence.
Working of CDMA
• Let us assume that we have four stations: 1, 2, 3 and 4 that are
connected to the same channel.
• The data from station 1 is d1, from station 2 is d2 and so on.
• The code assigned to station 1 is c1, station 2 is c2 and so on.
• These assigned codes have two properties:

If we multiply each code by another, we get 0.


If we multiply each code by itself, we get 4, (no. of stations).
Working of CDMA
Working of CDMA
• When these four stations send data on the same channel,
then station 1 multiplies its data by its code i.e. d1.c1, station
2 multiplies its data by its code i.e. d2.c2 and so on.

• The data that goes on the channel is the sum of all these
terms:
d1.c1 + d2.c2 + d3.c3 + d4.c4

• Any station that wants to receive data from the channel


multiplies the data on the channel by the code of the sender.
Working of CDMA
• For e.g.: suppose station 2 wants to receive data from station1.

• It multiplies the data on the channel by c1, (code of station 1).

• Because (c1.c1) is 4, but (c2.c1), (c3.c1) and (c4.c1) are all 0s, station
2 divides the result by 4 to get the data from station 1.
data = (d1.c1 + d2.c2 + d3.c3 + d4.c4).c1

= d1.c1.c1 + d2.c2.c1+ d3.c3.c1+ d4.c4.c1

= d1.4 + 0 + 0 + 0

= (d1.4) / 4 = d1
Collision-Free Protocols

• Bit-map Protocol
• Binary Countdown
• The Adaptive Tree Walk Protocol
1. Bit-map Protocol:

• Bit map protocol is collision free Protocol . In bitmap protocol


method, each contention period consists of exactly N slots.

• where N is the total number of stations sharing the channel. If


a station has a frame to send, , then it transmits a 1 bit in the
respective slot.

• For example if station 2 has a frame to send, it transmits a 1


bit during the second slot.
2. Binary Countdown:
• In binary countdown, binary station addresses are used. A
station wanting to use the channel broadcast its address as
binary bit string starting with the high order bit.
• All addresses are assumed of the same length. Here, we will
see the example to illustrate the working of the binary
countdown.
• For example, if there are 6 stations, they may be assigned the
binary addresses 001, 010, 011, 100, 101 and 110. All stations
wanting to communicate broadcast their addresses. The
station with higher address gets the higher priority for
transmitting.
• In this method, different station addresses are ORed together
who decide the priority of transmitting. If these stations 0001,
1001, 1100, 1011 all are trying to seize the channel for
transmission.
• All the station at first broadcast their most significant address
bit that is 0, 1, 1, 1 respectively. The most significant bits are
ORed together. Station 0001 see the 1MSB in another station
addresses and knows that a higher numbered station is
competing for the channel, so it gives up for the current
round.
• Other three stations 1001, 1100, 1011 continue. The next bit is
1 at station 1100, swiss station 1011 and 1001 give up. Then
station 110 starts transmitting a frame, after which another
bidding cycle starts.
Adaptive Tree Walk Protocol

• In adaptive tree walk protocol, the stations or nodes


are arranged in the form of a binary tree as follows -
• Initially all nodes (A, B ……. G, H) are permitted to compete for
the channel.
• If a node is successful in acquiring the channel, it transmits its
frame.
• In case of collision, the nodes are divided into two groups (A,
B, C, D in one group and E, F, G, H in another group).
• Nodes belonging to only one of them is permitted for
competing. This process continues until successful
transmission occurs.
Wired LANs: Ethernet
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.

• Project 802 is a way of specifying functions of the physical


layer and the data link layer of major LAN protocols.

• The relationship of the 802 Standard to the traditional OSI


model is shown in below Figure.

• The IEEE has subdivided the data link layer into two sub
layers: logical link control (LLC) and media access
control(MAC).
Figure 13.1 IEEE standard for LANs

IEEE has also created several physical layer standards for


different LAN protocols
STANDARD ETHERNET

• The original Ethernet was created in 1976 at Xerox’s Palo


Alto Research Center (PARC). Since then, it has gone through
four generations. We briefly discuss the Standard (or
traditional) Ethernet in this section.

Figure Ethernet evolution through four generations


MAC Sublayer
•In Standard Ethernet, the MAC sublayer governs the operation of
the access method. It also frames data received from the upper layer
and passes them to the physical layer.

Frame Format
• The Ethernet frame contains seven fields: preamble, SFD,
DA, SA, length or type of protocol data unit (PDU), upper-
layer data, and the CRC.

• Ethernet does not provide any mechanism for acknowledging


received frames, making it what is known as an unreliable
medium. Acknowledgments must be implemented at the higher
layers. The format of the MAC frame is shown in below figure
Figure 802.3 MAC frame
Preamble. Alerts the receiving system to the coming frame and
enables it to synchronize its input timing. The preamble is
actually added at the physical layer and is not (formally) part of
the frame.

Start frame delimiter (SFD). The second field (l byte: 10101011)


signals the beginning of the frame. The SFD warns the station or
stations that this is the last chance for synchronization. The last
2 bits is 11 and alerts the receiver that the next field is the
destination address.

Destination address (DA). The DA field is 6 bytes and contains


the physical address of the destination station or stations to
receive the packet.
Source address (SA). The SA field is also 6 bytes and contains
the physical address of the sender of the packet.

Length or type. The IEEE standard used it as the length field to


define the number of bytes in the data field. Both uses are
common today.

Data. This field carries data encapsulated from the upper-layer


protocols. It is a minimum of 46 and a maximum of 1500 bytes.

CRC. The last field contains error detection information, in this


case a CRC-32
Frame Length
• Ethernet has imposed restrictions on both the minimum and maximum
lengths of a frame, as shown in below Figure

Figure Minimum and maximum lengths


Addressing
• The Ethernet address is 6 bytes (48 bits), normally written
in hexadecimal notation, with a colon between the bytes.

Figure Example of an Ethernet address in hexadecimal notation


Unicast, Multicast, and Broadcast Addresses A source
address is always a unicast address-the frame comes from
only one station.The destination address, however, can be
unicast, multicast, or broadcast. Below Figure shows how to
distinguish a unicast address from a multicast address.
If the least significant bit of the first byte in a destination
address is 0, the address is unicast; otherwise, it is multicast.

Unicast and multicast addresses


Physical Layer
The Standard Ethernet defines several physical layer
implementations; four of the most common, are shown in Figure

Figure Categories of Standard Ethernet


Encoding and Decoding

•All standard implementations 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.
lOBase5: Thick Ethernet

lOBase5 was the first Ethernet specification to use a bus


topology with an external transceiver (transmitter/receiver)
connected via a tap to a thick coaxial cable. Figure shows a
schematic diagram of a lOBase5 implementation

Figure 10Base5 implementation


10Base2: Thin Ethernet
The second implementation is called 10 Base2, thin Ethernet, or
Cheapernet.10Base2 also uses a bus topology, but the cable is much
thinner and more flexible. Figure shows the schematic diagram of a
10Base2 implementation.

Figure 10Base2 implementation


1OBase-T: Twisted-Pair Ethernet
• It uses a physical star topology. The stations are connected
to a hub via two pairs of twisted cable, as shown in Figure
• The maximum length of the twisted cable here is defined as
100 m, to minimize the effect of attenuation in the twisted
cable

Figure 10Base-T implementation


• 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, as
shown in Figure

Figure 10Base-F implementation


Table 13.1 Summary of Standard Ethernet implementations

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy