Medium Access Methods Lecture 9
Medium Access Control Medium Access Control (MAC) is the method that defines a procedure a station should follow when it needs to send a frame or frames. The use of regulated method ensure that there is no conflict among the stations. The problem of controlling the access to the medium is similar to the rules of speaking in an assembly. Rules are established to ensure that two people do not speak at the same time 2
Medium Access Methods MAC can be divided into two broad categories: Random access and controlled access. See the figure below
Random Access With Random Access or contention methods no station is superior to another station and non of them are assign the control of others. No schedule time for a station to transmit -transmission is random among the stations. No rule that specifies what station should send next stations complete with each other to access the medium hence contention methods Each station that has data to send uses the procedure defined in the protocol in relation to the state of the medium (idle/busy) to make a decision on whether or not to send 4
Random Access The procedure that station use to access the medium with Random Access method must answer the following Questions: When should the station access the medium? What should the station do when the medium is busy? How should the station determine the success or failure of the transmission? What should the station do if there is an access conflict? 5
Evolution of Random Access Methods
The first method, known as ALOHA, used a very simple procedure called Multiple Access (MA). This Method was improved with addition of procedure that forces the station to sense the medium before transmitting. This was called Carrier Sense Multiple Access (CSMA). This method was later evolved into two parallel methods: CSMA/CD and CSMA/CA CSMA/CD tries to show what the station should do if a collision is detected CSMA/CA tries to avoid the collision
Random Access Methods Multiple Access (MA) Carrier Sense with Multiple Access (CSMA) Carrier Sense with Multiple Access with Collision Detection (CSMA/CD) Carrier Sense with Multiple Access with Collision Avoidance (CSMA/CA)
Carrier Sense Multiple Access (CSMA) The chance of collision can be reduced if a station sense 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 CSMA is based on the principle sense before transmit or Listen before talk CSMA can reduce the possibility of collision, but can not eliminate it 9
Collision in CSMA
Vulnerable Time: Vulnerable Time: Vulnerable time for CSMA is the propagation time,. This is the time needed for a signal to propagate Tprop from one end of the medium to the other. When a station sends a frame, and any other station tries to send a frame during Vulnerable time, a collision will result. 11
Persistence Strategies Persistence Strategy: define what a station should do if, when sensing the medium, it finds it busy. Two strategies:
Non-persistent Method Non persistence Method: In the non-persistence method, a station with a frame to send, it senses the medium: If the medium is idle, it sends immediately If the medium is not idle it waits a random time and then sense the medium again
1-Persistent Approach In persistence strategy, a station senses the medium. If the medium is idle, it sends the frame. 1-persistence: In this method, after the station finds the medium idle, it sends its frame immediately (with a probability of 1). 1-persistence method increases the chances of collision as two or more station may find the medium idle and send their frames immediately.
P-Persistent Approach In P-Persistence method, after the station finds the medium idle, it may or may not send It sends with probability p and refrain from sending with probability 1-p The station generates the random number between 1 and 100. If the random number is less than 20, the station will send; otherwise the station refrain from sending. The station waits one time slot before sensing the medium again. P-Persistence: reduces the chances of collision and improves the efficiency
Example of P-Persistent For example, if p is 0.2, it means that each station, after sensing an idle line, sends with a probability of 0.2 (20 percent of the time) and refrain from sending with a probability of 0.8 (80 percent of the time)
Carrier Sense Multiple Access with Collision Detection (CSMA/CD) CSMA method does not define what should be done if a collision occurs. That is why it was never implemented. CSMA/CD, a modified version of CSMA, adds a procedure to handle the collision Back off time is between 0 and 2Nx(maximum propagation time) 17
Collision If the collision occurs, the frame should be sent again. To reduce the probability of collision the second time, the station should wait- is should back-off. It should wait a little the first time, more is the collision occur again, much more if it happens a third time, and so on
Back-off exponential Method In the exponential back-off method, the station waits an amount of time between 0 and 2 N x (Maximum propagation time) N: number of attempted transmission It waits between 0 and 2 x (Maximum propagation time) for the first time. Between 0 and 2 2 x (Maximum propagation time) for the second time
CSMA/CD Procedure
Jam Signal The jam signal is intended to inform other stations of the situation s collision. It alerts them that collision has occurred. The maximum value of the back-off parameter is 15
Controlled Access In controlled access method, the stations consult each other to find which station has the right to send. The station can not send unless it has been authorized by other stations. 22
Token Passing Network In the Token passing method, a station is authorized to send data when it receives a special frame called a token.
Token Passing When no data is being sent, a token circulate around the ring. If the station needs to send data, it waits for the token. The station capture the token, sends one or more frames (as long as it has some frames to send or the time allocated hasn t expired). It releases the token to be used by the successor station 24
Token Passing Procedure