Multiple Access Protocols For Link Layer: Nodes: Interference
Multiple Access Protocols For Link Layer: Nodes: Interference
Channelization
Examples: Time-division multiple access (TDMA) or Frequency-division F di i i multiple lti l acesss (FDMA) (FDMA). Take TDMA example:
Aloha Protocols
Initially developed in 1970 for radio communication between a computer and several terminals in Univ. of Hawai. Mother of all random access protocols, even though very inefficient. We present an idealized version for easy analysis. analysis
Slotted Aloha
Assumptions All frames same size Time is divided into equal size slots, time to transmit 1 frame Nodes start to transmit frames only at beginning of slots Slots are synchronized Collision = more than one node transmit in a slot. Operation When node has a new frame to transmit, it transmits in the next slot If collision, node retransmits frame in each subsequent slot with prob p until success prob.
Slotted ALOHA
Pros single active node can continuously transmit at tf full ll rate t of f channel h l highly decentralized: only slots in nodes need to be in sync simple
Cons collisions, wasting slots idle slots nodes may be able to detect collision in less than time to transmit packet clock synchronization
At best: channel
Even worse !
= 1/(2e) = .18
CSMA : Persistence
New arrival senses busy carrier Continue sensing until idle (persistent CSMA). Retry after a random time interval (nonpersistent CSMA). Retry again if still busy. Two types of persistent CSMA Transmit new arrival as soon as carrier becomes idle (1-persistent (1 persistent CSMA) CSMA). Transmit new arrival after a random time interval after carrier becomes idle (ppersistent CSMA).
Note on Backoff
Random backoff interval, , b slots
Some event causes transmission to defer (e.g., medium busy, collision etc.) Trying to transmit in subsequent slots with some probability p is equivalent to sending after a random interval. Length of random interval in slots = b. Prob [b=k] = p(1-p)(k-1)
Collision Detection
Need to know whether transmission is successful. successful First idea: Detect collision. Retransmit after backoff (as in Aloha) if collision. CSMA/CD 1-persistent CSMA with collision detection. Used in Ethernet. IEEE LAN standard 802.3. 802 3 Listen while transmitting. If notice transmission being garbled, flag collision.
Ethernet CSMA/CD
Important parameter a = max. signal propagation delay in network / smallest packet transmission time. Packet transmission time = packet size / channel bandwidth. Parameter a must be less than 0.5 so that the packet lasts long enough at the transmitter for it be able to detect collision if it happens anywhere in the network.
Collision Detection
Propagation time Another node
Collision Detection
Propagation time Another node
Collision Detection
Propagation time Another node Some other node Transmitter
Time
To detect collision, min packet k tt transmit it ti time > 2 * max propagation delay in network. Thus Ethernet has a max cable length and a minimum packet size.
10
Performance Metrics
Throughput: Bits/sec or packets/sec received correctly y at the receiver. Offered load: Bits/sec or packets/sec actually transmitted on the network. Normalized throughput or load: The above normalized with respect to bandwidth. Delay: Delay between when the first bit of th packet the k t starts t t transmitting t itti for f the th first fi t time and the when the last bit of the packet correctly received.
11
CSMA/CD Performance
Much harder to analyze analytically than Aloha. Max. throughput is very dependent on parameter a = ratio of prop and transmit time. time With some conservative assumptions, max. normalized throughput = 1/(1+constant*a). Very small a close to zero -> almost ideal throughput. Large a means more waste before collision detect. Bad for CSMA/CD. constant 5 for Ethernet LAN. Find a from Ethernet specs.
12
CSMA on Wireless
Cannot depend on collision detection ability. y Full duplex radios are complex and expensive. Even if sender is able to detect collision, it may so happen that sender senses no collision, co s o , but co collision s o happens appe s at t the e receiver. This is due to path loss of wireless signals. Doesnt happen in Ethernet.
13
CSMA/CA Contd.
Avoids collision by randomization, but cant can t eliminate it. it So, So still need feedback from receiver unlike CSMA/CD. Receiver sends a short ACK packet after a SIFS (Short Inter Frame Spacing) period after correctly receiving a packet. retransmits but the max No ACK -> sender retransmits, value of backoff timer is now doubled much like Ethernet (exponential backoff).
14
CSMA/CA in 802.11
DIFS DIFS contention window (randomized back-off mechanism) Transmitted frame t slot time SIFS
medium busy direct access if medium is idle DIFS Ready for transmission
ACK
A and C cannot hear each other. When A transmits to B B, C cannot detect the transmission using carrier sense. If C transmits as well, packets collide at B. A and C are hidden from each other.
15
16
RTS D A
Timeline
DIFS sender i receiver RTS SIFS CTS SIFS data SIFS ACK
other stations
DIFS
data t
Contention period
Note Data > RTS/CTS/ACK > DIFS > SIFS. Times not to scale for clarity. NAV = network allocation vector. During the period NAV is set the node must act as if medium busy. Thus a packet from them ready during this time must go through a contention period.
17
A C
In principle, A->B and C->D transmissions can go in parallel without collisions. collisions But A and C can hear each other. C will wait for A>B to end before starting C->D. A and C are exposed terminals. Solutions??
18