Carrier Sense Multiple Access • Improve ALOHA by using carrier sense • Stations listen to the carrier before transmitting • If channel is busy, the station waits until it becomes idle • Still might have collision • Two ready stations check the channel, and decide to transmit at the same time. • If a collision occurs, all colliding parties wait a random amount of time and start all over again. • P-persistent: when sensed channel idle, transmit at a probability p.
CSMA with Collision Detection • In CSMA, transmitting will not be interrupted even when a collision occurs • With collision detection, stations sense the carrier all the time and can abort transmission when something went wrong. Contention Period Idle Period Frame Frame Frame Transmission Period Contention slots
How long It Takes to detect Collision? • How long is enough to conclude that there is no collision? • Collision Detection is an Analogy Process • Hardware must check the voltage on the media (e.g., cable) • Need at least (2* propagation delay) • With 1km coaxial cable, that is 10 ms • This means that the first bit must last at least 10 ms.
Bit-map protocol Collision Free protocol • Bit-map protocol • N Contention slots, one for each of the N nodes • A `1’ at the corresponding slot indicate that that particular node want to transmit • The bit-map in contention period is observed by all nodes • After contention period, nodes transmit one packet in order • Efficiency: d/(n+d) when only one station has data to send • d/(d+1) when all stations have data
Collision Free protocol (cont) • Binary Countdown Protocol • Reduce the contention period • Basic bit-map is not efficient when you have 1000 nodes in network • All stations that want to transmit data broadcast their addresses simultaneously • If a station see an address of higher priority, it gives up • Efficiency: d/(d+ log_2 N)
Limited Contention Protocol • Adaptive Tree Walk Protocol • Stations are organized in a binary tree • Initially, all can content • If collide, A, B, C and D can participate the following contention • If collide again, only A and B are qualified
Medium Access Control in Wireless Network • Wireless signal have a shorter range • This make it difficult to detect collision among all nodes in the network • E.g., A send to B. C also send to B • A did not know C is also sending because A and C are `far’ apart • C did not know A is sending for the same reason • B suffer • Hidden station problem and exposed station problem
Solution: MACA Must use more signaling between sender and receiver. RTS(Request to send) CTS(Clear to send) This is the base of 802.11 protocols