Unit-2 Data Link Layer
Unit-2 Data Link Layer
frequency bands
frequency bands 2,5,6 idle
FDM cable
CDMA: Code Division Multiple Access
• CDMA assigns a different code to each node, While TDM and
FDM assign time slots and frequencies respectively.
• Each node then uses its unique code to encode the data bits it
sends.
• If the codes are chosen carefully, CDMA networks have the
wonderful property that different nodes can transmit
simultaneously.
• Their respective receivers correctly receive a sender’s encoded
data bits in spite of interfering transmissions by other nodes.
• Example: Used in military and widespread civilian use,
particularly in cellular telephony.
• Because CDMA’s use is so tightly tied to wireless channels.
Pure Aloha Protocol
• It allows users to transmit whenever they have data to be sent.
• Senders wait to see if a collision occurred (after whole message has
been sent).
• If collision occurs, each station involved waits a random amount of time
then tries again.
• Systems in which multiple users share a common channel in a way that
can lead to conflicts are widely known as contention systems.
• Whenever two frames try to occupy the channel at the same time, there
will be a collision and both will be garbled.
• If the 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 later.
Pure ALOHA – Cont…
• Frames are transmitted at completely arbitrary times.
• The throughput of the Pure ALOHA is maximized when the frames are of
uniform length.
• The formula to calculate the throughput of the Pure ALOHA is
S-=G*e-2G
• The throughput is maximum when G=1/2 which is 18% of the total
transmitted data frames.
Slotted Aloha
• It was invented to improve the efficiency of pure
ALOHA as chances of collision in pure ALOHA are
very high.
• 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.
Slotted Aloha – Cont…
• If any station is not able to place the frame onto the channel at the
beginning of the slot then the station has to wait until the
beginning of the next time slot.
• The formula to calculate the throughput of the Slotted ALOHA is
S=G*e-G
• The throughput is maximum when G=1 which is 37% of the total
transmitted data frames.
• 37% of the time slot is empty, 37% successes and 26% collision.
CSMA/CD (CSMA with Collision Detection)
• If two stations sense the channel to be idle and
begin transmitting simultaneously, they will both
detect the collision almost immediately.
• Rather than finish transmitting, they should abruptly
stop transmitting as soon as the collision is detected.
• Quickly terminating damaged frames saves time and
bandwidth.
• This protocol, known as CSMA/CD (CSMA with
Collision Detection) is widely used on LANs in the
MAC sub layer.
CSMA/CD – Cont…