Module 2 Part 4
Module 2 Part 4
Module 2 Part 4
1. Station Model:
Assumes that each of N stations( eg. Computers,telephones etc)
independently produce frames. The probability of producing a
frame in the interval of dt is Idt ,where I is the constant arrival
rate of new frames. Once a frame has been generated, the
station is blocked and does nothing until the frame has been
successfully transmitted.
• It divides the layer into parts such as data link control and
the multiple access resolution/protocol.
• The upper layer has the responsibility to flow control and the
error control in the data link layer, and hence it is termed
as logical data link control.
.
CSMA Access Modes
• 1-Persistent: In the 1-Persistent mode of CSMA
that defines each node, first sense the shared
channel and if the channel is idle, it immediately
sends the data. Else it must wait and keep track of
the status of the channel continuously and
broadcast the frame unconditionally as soon as
the channel is idle.
• Non-Persistent: It is the access mode of CSMA
that defines before transmitting the data, each
node must sense the channel, and if the channel is
inactive, it immediately sends the data.
Otherwise, the station must wait for a random
time (not continuously), and when the channel is
found to be idle, it transmits the frames.
• P-Persistent: It is the combination of 1-Persistent and
Non-persistent modes. The P-Persistent mode defines
that each node senses the channel, and if the channel
is inactive, it sends a frame with a P probability. If the
data is not transmitted, it waits for a (q = 1-p
probability) random time and resumes the frame
with the next time slot.
• P=(1-1/N)^N-1 where N is the number of stations
• If P<=1 station can transmit else it has to wait
• O- Persistent: It is an O-persistent method that
defines the superiority of the station before the
transmission of the frame on the shared channel.
Each node is assigned a transmission order by a
supervisory node. If it is found that the channel is
inactive, each station waits for its turn to retransmit
the data.
CSMA/ CD
• It is a carrier sense multiple access/ collision detection
network protocol to transmit data frames.
• The CSMA/CD protocol works with a medium access control
layer.
• Therefore, it first senses the shared channel before
broadcasting the frames, and if the channel is idle, it
transmits a frame to check whether the transmission was
successful.
• If the frame is successfully received, the station sends
another frame.
• If any collision is detected in the CSMA/CD, the station
sends a jam/ stop signal to the shared channel to terminate
data transmission.
• After that, it waits for a random time before sending a
frame to a channel.
• 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 an
‘acknowledgment’ system. It checks for successful and unsuccessful
transmissions through collision signals. During transmission, if a 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 intervals
before it resends the frame. After some random time, it again attempts to
transfer the data and repeats the above process.
• Step 4: If no collision was detected in propagation, the sender completes its
frame transmission and resets the counters.
• Frame Transmission time Tfr=2*Tp
• Where Tp is the propagation time
CSMA/ CA
• It is a carrier sense multiple access/collision avoidance
network protocol for carrier transmission of data frames.
• It is a protocol that works with a medium access control
layer.
• When a data frame is sent to a channel, it receives an
acknowledgment to check whether the channel is clear.
• If the station receives only a single (own) acknowledgments,
that means the data frame has been successfully
transmitted to the receiver.
• But if it gets two signals (its own and one more in which the
collision of frames), a collision of the frame occurs in the
shared channel.
• Detects the collision of the frame when a sender receives an
acknowledgment signal.
• Algorithm
• The algorithm of CSMA/CA is:
• When a frame is ready, the transmitting station checks whether the
channel is idle or busy.
• If the channel is busy, the station waits until the channel becomes
idle.
• If the channel is idle, the station waits for an Inter-frame gap (IFG)
amount of time and then sends the frame.
• After sending the frame, it sets a timer.
• The station then waits for acknowledgement from the receiver. If it
receives the acknowledgement before expiry of timer, it marks a
successful transmission.
• Otherwise, it waits for a back-off time period and restarts the
algorithm.
Methods used in the CSMA/ CA to avoid the collision
• Interframe space: In this method, the station waits for the
channel to become idle, and if it gets the channel is idle, it
does not immediately send the data. Instead of this, it
waits for some time, and this time period is called the
Interframe space or IFS. The IFS time is often used to
define the priority of the station.
• Contention window: In the Contention window, the total
time is divided into different slots. When the station/
sender is ready to transmit the data frame, it chooses a
random slot number of slots as wait time. If the channel
is still busy, it does not restart the entire process, except
that it restarts the timer only to send data packets when
the channel is inactive.
• Acknowledgment: In the acknowledgment method, the
sender station sends the data frame to the shared
channel if the acknowledgment is not received ahead of
time.
Controlled Access Protocol
◻ In this method, the stations consult each other to find which station has a right
to send
◻ A station cannot send unless it has been authorized by other station.
□ Reservation
□ Polling
□ Token Passing
Reservation
◻ In this method, a station needs to make a reservation before sending data.
◻ If there are N stations, then there are exactly N reservation slots in the reservation
frame.
◻ When a station needs to send a frame, it makes a reservation in its own slot.
◻ The stations that have made reservations can send their frames after the reservation
frame
Polling
Polling method works in those networks where primary and secondary stations
exist.
•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 controller
decides to which node access has to give for data transmission.
•The message sent by the controller contains the address of the node being
selected for granting access
•Although all nodes receive the message but the addressed one responds to it and
sends data, if any. If there is no data, usually a “poll reject”(NAK) message is sent
back.
•Problems include high overhead of the polling messages and high dependence on
the reliability of the controller.
Token Passing
◻ Token passing method is used in those networks where the stations are organized
in a logical ring.
◻ In such networks, a special packet called token is circulated through the ring.
◻ Station that possesses the token has the right to access the channel.
◻ Whenever any station has some data to send, it waits for the token. It transmits data
only after it gets the possession of token.
◻ After transmitting the data, the station releases the token and passes it to the next
station in the ring.
◻ If any station that receives the token has no data to send, it simply passes the token
to the next station in the ring.
Channelization Protocol
◻ Here the available bandwidth of a link is shared in time, frequency or code between
different stations.
◻ There are three basic channelization protocols:
◻ CDMA allows each station to transmit over the entire frequency spectrum all the
time.
◻ There is neither division of bandwidth nor division of time. In CDMA, each user
is given a unique code sequence
◻ Different CDMA codes are used to distinguish among different users.