Presentation is loading. Please wait.

Presentation is loading. Please wait.

Supplementary Material for Lecture 2, ComNet II Zhibin Wu

Similar presentations


Presentation on theme: "Supplementary Material for Lecture 2, ComNet II Zhibin Wu"— Presentation transcript:

1 Supplementary Material for Lecture 2, ComNet II Zhibin Wu
Medium Access Control Supplementary Material for Lecture 2, ComNet II Zhibin Wu

2 Lecture Overview Introduction Random Access Scheduled Access
Aloha Slotted Aloha CSMA CSMA/CD CSMA/CA Scheduled Access TDMA Dynamic TDMA Spread-Spectrum/CDMA

3 Medium Access Sublayer
network Link layer control LLC Data link MAC Medium access control physical Medium access (MAC) sublayer is not relevant on point-to-point links The MAC sublayer is only used in broadcast or shared channel networks All communication entities “share” a common channel Examples: Wired networks: Ethernet LAN Wireless & Mobile Networks: Satellite, Cellular, Wireless LAN, Packet radio network?

4 Share a Channel Ideally
Broadcast channel of rate R bps 1. When one node wants to transmit, it can send at rate R. 2. When M nodes want to transmit, each can send at average rate R/M

5 Random Access Protocols
Single channel shared by a large number of hosts No coordination between hosts Control is completely distributed Examples: ALOHA, CSMA, CSMA/CD

6 Scenarios of ALOHA A group of nodes trying to sending frames to a central node Star-topology. Not a complete solution for bi-directional communication For half-duplex device, what if a data packet arrives while it is receiving?

7 Pure Aloha In Pure Aloha, frames are transmitted at completely arbitrary times.

8 Aloha Algorithm Transmit whenever you have data to send
Listen to the broadcast (probably a separate channel) Because broadcast is fed back, the sending host can always find out if its packet was destroyed just by listening to the downward broadcast one round-trip time after sending the packet If the packet was destroyed, wait a random amount of time and send it again The waiting time must be random to prevent the same packets from colliding over and over again

9 Vulnerable Period Vulnerable period for the shaded frame is 2t
Note that if the first bit of a new packet overlaps with the last bit of a packet almost finished, both packets are totally destroyed. (No capture effect)

10 Analysis of Aloha Packet Arrival is Poisson Process
P [k arrivals in t seconds] = Let G be the total number of frames attempted in t seconds P [k attempts in t seconds] = Conditional successful probability for one attempt is : P0 = P [0 other attempts in 2t seconds] =e-2Gt Set t as unit frame time Let S be the mean number of successful attempts S=GP0=Ge-2G S is optimum at G=1/2 S=1/2e = 0.184

11 Slotted Aloha Transmission of frames are synchronized slot by slot.
Channel feedback about whether packet is received or not

12 Slotted Aloha (Continued)
Slotted ALOHA cuts the vulnerable period for packets from 2t to t. Time is slotted. Packets must be transmitted within a slot. Procedure If a host has a packet to transmit, it waits until the beginning of the next slot before sending Listen to the broadcast and check if the packet was destroyed If there was a collision, wait a random number of slots and try to send again

13 Analysis of Slotted ALOHA
Packet Arrival is Poisson Process P [k arrivals in t seconds] = Let G be the total number of frames attempted in t seconds P [k attempts in t seconds] = Successful probability for each slot is : P [1 attempts in a t seconds slot] =Ge-Gt Set Slot time t as unit time, then S=Ge-G S is optimum at G=1 S=1/e = 0.368

14 Performance of ALOHA Throughput versus offered traffic for ALOHA systems The main reason for poor channel utilization of ALOHA (pure or slotted) is that all stations can transmit at will, without paying attention to what the other stations are doing.

15 There are several types of CSMA protocols:
Protocols in which stations listen for a carrier (i.e., a transmission) and act accordingly are called carrier sense protocols. There are several types of CSMA protocols: Non-Persistent CSMA 1-Persistent CSMA P-Persistent CSMA

16 Assumptions with CSMA Networks
Constant length packets No errors, except those caused by collisions No capture effect Each host can sense the transmissions of all other hosts The propagation delay is small compared to the transmission time

17 Propagation Delay A C D B
D only sense A’s transmission after a propagation delay τ If τ is larger than packet transmission time, there are too much time wastage. CSMA in satellite communication? No. The size (length) of the network must be limited!

18 Non-persistent CSMA To send data, a station first listens to the channel to see if anyone else is transmitting. If so, the station waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm. Otherwise, it transmits a frame. If a collision occurs, the station waits a random amount of time and starts all over again. Assumption: propagation delay is a constant common to all nodes: a is the ratio of propagation delay to packet transmission time

19 Analysis of Non-persistent CSMA
Unsuccessful transmission period Successful transmission period Normalized Time a a Y 1 1 a Idle period Busy period Busy period S= U/(B+I) B = Y a , I = 1/G U = e-aG FY(y)=P{no packet occur in an duration of a-y } = e-G(a-y)

20 Discussion of Collisions
What's the effect of signal propagation delay a? The longer the delay, the more the collisions, and the worse the performance of the protocol. How about zero propagation delay ? There still exist chances of collisions. S = G/(1+G) Is this protocol any better than ALOHA (both pure and slotted) ? Yes, because both stations have the decency to desist from interfering with the third station's frame.

21 1-persistent CSMA 1-persistent CSMA (Carrier Sense Multiple Access):
To send data, a station first listens to the channel to see if anyone else is transmitting. If so, the station waits (keeps sensing it) until the channel becomes idle. Otherwise, it transmits a frame. If a collision occurs, the station waits a random amount of time and starts all over again. It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle. (Greedy) This protocol has worse channel utilization than 1-persistent CSMA.

22 Tradeoff between Non-persistent and 1-persistent
If B and C become ready in the middle of A’s transmission, 1-Persistent: B and C collide Non-Persistent: B and C probably do not collide If only B becomes ready in the middle of A’s transmission, 1-Persistent: B succeeds as soon as A ends Non-Persistent: B may have to wait

23 P-persistent CSMA Algorithm Assume channels are slotted
One slot = contention period (i.e., one round trip propagation delay) Algorithm Sense the channel If channel is idle, transmit a packet with probability p if a packet was transmitted, go to step 2 if a packet was not transmitted, wait one slot and go to step 1 If channel is busy, wait one slot and go to step 1. In other words, wait until idle and then transmit with probability p Detect collisions If a collision occurs, wait a random amount of time and go to step 1

24 Persistent and Non-persistent CSMA
Comparison of the channel utilization versus load for various random access protocols.

25 CSMA with Collision Detection
CSMA/CD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected. The conceptual model: To send data, a station first listens to the channel to see if anyone else is transmitting. If so, the station waits until the end of the transmission (1-persistent) or wait a random period of time and repeats the algorithm (non-persistent). Otherwise, it transmits a frame. If a collision occurs, the station will detect the collision, abort its transmission, waits a random amount of time, and starts all over again.

26 How to Detect Collision
Tx Rx Prerequisite: A node can listening while talking Ethernet cables

27 CSMA/CD Continued CSMA/CD can be in one of three states: contention, transmission, or idle The minimum time to detect the collision is the time it takes the signal to propagate from one station to the other. How long could the transmitting station be sure it has seized the network ? ( or 2 ? where  is time equal to the full propagation) Model the contention interval as slotted aloha with slot width 2

28 CSMA/CA Wireless LAN How can detect collision if you cannot listening while talking? Collision Avoidance Random Backoff (instead of 1-persistent) RTS/CTS CS no longer works well Rules: carrier ==> do not transmit no carrier ==> OK to transmit But the above rules do not always apply to wireless.

29 Problems with carrier sensing
Hidden terminal problem Y Z W W finds that medium is free and it transmits a packet to Z no carrier ===> OK to transmit /

30 Problems with carrier sensing
Exposed terminal problem Z W Z is transmitting to W X Y Y will not transmit to X even though it cannot interfere Presence of carrier ===> hold off transmission /

31 Solving Hidden Node problem with RTS/CTS
listen RTS ==> transmitter is close to me listen CTS ==> receiver is close to me - listen RTS - wait long enough for the requested station to respond with CTS - if (timeout) then ready to transmit - listen CTS for the transmitter to send its data Y Z X W Note: RTS/CTS does not solve exposed terminal problem. In the example above, X can send RTS, but CTS from the responder will collide with Y’s data.

32 RTS/CTS exchange example
SIFS DIFS Frame RTS Src CTS ACK Dest 352 µs 304 µs 8192 s 304 µs 10 µs 10 µs 10 µs Dest NAV (RTS) NAV (CTS) RTS + CTS + Frame + ACK exchange invoked when frame size is large NAV (Network Allocation Vector) NAV maintains prediction of future traffic on the medium based on duration information that is announced in RTS/CTS frames prior to actual exchange of data

33 Pros & Cons of Random Access
Advantages Short delay for bursty traffic Simple (due to distributed control) Flexible to fluctuations in the number of hosts Fairness Disadvantages Low channel efficiency with a large number of hosts Not good for continuous traffic (e.g., voice) Cannot support priority traffic High variance in transmission delays

34 Scheduled Access TDMA Dynamic TDMA Widely used cellular,
Wi-Fi (HyperLAN), IEEE Wireless ATM

35 TDMA Time Division Multiple Access

36 TDMA Continued access to channel in "rounds"
each station gets fixed length slot (length = packet transmission time) in each round unused slots go idle example: 6-station LAN, 1,3,4 have pkt, slots 2,5,6 idle

37 Dynamic TDMA In dynamic time division multiple access, a scheduling algorithm dynamically reserves a variable number of timeslots in each frame to variable user data streams, based on the traffic demand of each user data stream. Negotiations (beforehand) to determine how to allocate slots dynamically. Modem preamble TDM Downlink D-TDMA Uplink S-ALOHA control User B User C TDMA Frame Burst from User A To Access Point Burst from Access Point -> Mobiles

38 Summary of Scheduled Access Protocols
Avoid of contention/collision; better channel efficiency with a large number of hosts predetermined channel allocation Need centralized control Require global synchronization Guard time period to protect slots Delay?

39 Spread Spectrum and CDMA
What if not divide up the channel by time (as in TDMA), or frequency (as in FDMA)? Is collision inevitable? Not if collision is no longer damaging! Is there any way to decode bits garbled by other overlapping frames? CDMA based on Spread Spectrum A new perspective to solve multiple access problems Spread Spectrum is a PHY innovation, not a MAC technique. CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing.

40 Spread Spectrum Idea spread signal over wider frequency band than required originally deigned to thwart jamming Frequency Hopping transmit over random sequence of frequencies sender and receiver share… pseudorandom number generator seed

41 Spread Spectrum (cont)
Direct Sequence for each bit, send XOR of that bit and n random bits random sequence known to both sender and receiver called n-bit chipping code defines an 11-bit chipping code Random sequence: Data stream: 1010 XOR of the two: 1

42 Code Division Multiple Access (CDMA)
Multiplexing Technique used with spread spectrum Start with data signal rate D Called bit data rate Break each bit into k chips according to fixed pattern specific to each user User’s code New channel has chip data rate kD chips per second E.g. k=6, three users (A,B,C) communicating with base receiver R Code for A = <1,-1,-1,1,-1,1> Code for B = <1,1,-1,-1,1,1> Code for C = <1,1,-1,1,1,-1>

43 CDMA Example

44 CDMA Explanation Consider A communicating with base
Base knows A’s code Assume communication already synchronized A wants to send a 1 Send chip pattern <1,-1,-1,1,-1,1> A’s code A wants to send 0 Send chip[ pattern <-1,1,1,-1,1,-1> Complement of A’s code Decoder ignores other sources when using A’s code to decode Orthogonal codes

45 Topics Not Covered in This Lecture
Dynamic behavior of Aloha Strict mathematical analysis Stabilize Aloha systems with channel feedback Taking Turns MAC protocols Token Ring FDMA


Download ppt "Supplementary Material for Lecture 2, ComNet II Zhibin Wu"

Similar presentations


Ads by Google