12.1
Multiple Access
12.2
Figure 12.1 Data link layer divided into two functionality-oriented sublayers
We can consider the data link layer as two
sublayers:-•
The upper sublayer is responsible for data link control,
IEEE has actually made this division for LANs.
The upper sublayer that is responsible for flow and
error control is called the logical link control
(LLC) layer
The lower sublayer 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.
12.4
12.5
12-1 RANDOM ACCESS
12-1 RANDOM ACCESS
•
In random access
In
random access
or contention
or
contention
methods, no station
methods, no station
is superior to another station and none is assigned
is superior to another station and none is assigned
the control over another.
the control over another.
•
No station permits, or does not permit, another
No station permits, or does not permit, another
station to send.
station to send.
•
At each instance, a station that has data to send
At each instance, a station that has data to send
uses a procedure defined by the protocol to make a
uses a procedure defined by the protocol to make a
decision on whether or not to send.
12.6
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
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.
12.8
ALOHA:-Pure ALOHA
The original ALOHA protocol is called pure ALOHA.
In pure ALOHA, the stations transmit frames whenever
they have data to send.
When two or more stations transmit simultaneously, there is
collision and the frames are destroyed.
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.
Therefore pure ALOHA dictates that when time-out period
passes, each station must wait for a random amount of time before resending its frame. This randomness will help avoid more collisions.
Whenever two frames try to occupy the channel at the same
time, there will be a collision and both will be damaged. If first bit of a new frame overlaps with just the last bit of a frame almost finished, both frames will be totally destroyed
and both will have to be retransmitted.
12.11
Slotted ALOHA
Slotted ALOHA was invented to improve the
efficiency of pure ALOHA as chances of collision
in pure ALOHA are very high.
In slotted ALOHA, the time of the shared channel
is divided into discrete intervals called slots.
The stations can send a frame only at the beginning
of the slot and only one frame is sent in each slot.
12.13
In slotted ALOHA, if any station is not able to
place the frame onto the channel at the beginning of
the slot i.e. it misses the time slot then the station
has to wait until the beginning of the next time slot.
In slotted ALOHA, there is still a possibility of
collision if two stations try to send at the beginning
of the same time slot as shown in fig.
Slotted ALOHA still has an edge over pure
ALOHA as chances of collision are reduced to
one-half.
CSMA
CSMA is a network access method used on shared
network topologies such as Ethernet to control access to the network.
Devices attached to the network cable listen (carrier
sense) before transmitting. If the channel is in use, devices wait before transmitting.
MA (Multiple Access) indicates that many devices can
connect to and share the same network. All devices have equal access to use the network when it is clear.
CSMA (Carrier Sense Multiple Access)
CSMA protocol was developed to overcome the problem found in ALOHA i.e. to minimize the chances of collision, so as to improve the performance.
CSMA protocol is based on the principle of 'carrier sense'. The station senses the carrier or channel before transmitting a frame. It means the station checks the state of channel, whether it is idle or busy.
The chance of collision can be reduced if a station senses the medium before trying to use it.
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" .
CSMA can reduce the possibility of collision, but it
cannot eliminate it.
The possibility of collision still exists because of
propagation delay; when a station sends a frame, it
still takes time (although very short) for the first bit
to reach every station and for every station to sense
it.
In other words, a station may sense the medium
and find it idle, only because the first bit sent by
another station has not yet been received.
e.g. At time t1 station B senses the medium and finds it idle, so it
sends a frame. At time t2 (t2> t1) 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.
12.19
There Are Three Different Type of CSMA Protocols
12.20
(i) 1-persistent CSMA
• In this method, station that wants to transmit data continuously senses the channel to check whether the channel is idle or busy.
• If the channel is busy, the station waits until it becomes idle.
• When the station detects an idle-channel, it immediately transmits the frame with probability 1. Hence it is called 1-persistent CSMA.
• This method has the highest chance of collision because two or more stations may find channel to be idle at the same time and transmit their frames.
12.21
Drawback of 1-persistent
12.22
In the 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.
This method reduces the efficiency of the network because
the medium remains idle when there may be stations with frames to send as the stations wait a random amount of time after the collision.
12.23
(iii) p-persistent CSMA
• This method is used when channel has time slots such that the time slot duration is equal to or greater than the maximum propagation delay time.
• Whenever a station becomes ready to send, it senses the channel.
• If channel is busy, station waits until next slot.
• If channel is idle, it transmits with a probability p.
• With the probability q=(1-p), the station then waits for the beginning of the next time slot.
12.24
• This process is repeated till either frame has been transmitted or another station has begun transmitting.
12.25
12.26
12.27
Carrier Sense Multiple Access with Collision Detection
(CSMA/CD)
•
CSMA/CD is a protocol in which the station senses the carrier or channelbefore transmitting frame just as in persistent and non-persistent CSMA.
•
If the channel is busy, the station waits. It listens at the same time oncommunication media to ensure that there is no collision with a packet sent by another station.
•
In a collision, the issuer immediately cancel the sending of the package.•
CSMA/CD defines what happens when two devices sense a clear channel, then attempt to transmit at the same time. A collision occurs, and both devices stop transmission, wait for a random amount of time, and then retransmit.12.28