Supplementary Material for Lecture 2, ComNet II Zhibin Wu

Slides:



Advertisements
Similar presentations
Nick Feamster CS 4251 Computer Networking II Spring 2008
Advertisements

Channel Allocation Protocols. Dynamic Channel Allocation Parameters Station Model. –N independent stations, each acting as a Poisson Process for the purpose.
EECC694 - Shaaban #1 lec #5 Spring Data Link In Broadcast Networks: The Media Access Sublayer Broadcast networks with multi-access (or random.
Ethernet – CSMA/CD Review
Multiple access What if multiple machines are sharing the same link?
– Wireless PHY and MAC Stallings Types of Infrared FHSS (frequency hopping spread spectrum) DSSS (direct sequence.
Communication Networks Lecture 5 NETW 501-L5: NETW 501-L5: Medium Access Control Dr.-Ing. Khaled Shawky Hassan Room: C3-222, ext: 1204,
Chapter 12 Multiple Access Figure 12.1 Data link layer divided into two functionality-oriented sublayers Figure 12.2 Taxonomy of multiple-access protocols.
1 Pertemuan 13 Teknik Akses Jaringan - Random Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao
MAC Protocols Media Access Control (who gets the use the channel) zContention-based yALOHA and Slotted ALOHA. yCSMA. yCSMA/CD. TDM and FDM are inefficient.
CS 5253 Workshop 1 MAC Protocol and Traffic Model.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 17 Introduction to Computer Networks.
Copyright © 2003, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 6 Multiple Radio Access.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 16 Introduction to Computer Networks.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao
EEC-484/584 Computer Networks Lecture 9 Wenbing Zhao (Part of the slides are based on materials supplied by Dr. Louise Moser at UCSB and.
Studying Local Area Networks Via Media Access Control (MAC) SubLayer
Networks: Local Area Networks1 LANs Studying Local Area Networks Via Media Access Control (MAC) SubLayer.
Computer Networks: Local Area Networks 1 LANs Studying Local Area Networks via the Media Access Control (MAC) SubLayer.
Semester EEE449 Computer Networks The Data Link Layer Part 2: Media Access Control En. Mohd Nazri Mahmud MPhil (Cambridge, UK) BEng (Essex,
Medium Access Control Sublayer
Shashank Srivastava Motilal Nehru National Institute Of Technology, Allahabad Medium Access Control.
1 ECE453 – Introduction to Computer Networks Lecture 7 – Multiple Access Control (I)
9/11/2015 5:55 AM1 Ethernet and CSMA/CD CSE 6590 Fall 2010.
CIS 725 Media Access Layer. Medium Access Control Sublayer MAC sublayer resides between physical and data link layer Broadcast/multiacess channels N independent.
McGraw-Hill © The McGraw-Hill Companies, Inc., 2004 Chapter 12 Multiple Access Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Chi-Cheng Lin, Winona State University CS412 Introduction to Computer Networking & Telecommunication Medium Access Control Sublayer.
Chapter 12 Multiple Access Figure 12.1 Data link layer divided into two functionality-oriented sublayers Figure 12.2 Taxonomy of multiple-access protocols.
CHAPTER 4: THE MEDIUM ACCESS SUBLAYER 4.1: The Channel Allocation Problem 4.2: Multiple Access Protocols.
LECTURE9 NET301. DYNAMIC MAC PROTOCOL: CONTENTION PROTOCOL Carrier Sense Multiple Access (CSMA): A protocol in which a node verifies the absence of other.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking LANs 2: MAC protocols.
جلسه دهم شبکه های کامپیوتری به نــــــــــــام خدا.
Medium Access Control NWEN302 Computer Network Design.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Medium Access Control Sublayer.
جلسه یازدهم شبکه های کامپیوتری به نــــــــــــام خدا.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Unit-II Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. © The McGraw-Hill Companies, Inc. Medium Access Control Asst. Prof. Chaiporn.
4: DataLink Layer1 Multiple Access Links and Protocols Three types of “links”: r point-to-point (single wire, e.g. PPP, SLIP) r broadcast (shared wire.
Medium Access Control Sub Layer
Data Communications, Kwangwoon University12-1 Chapter 12. Multiple Access 1.Random Access 2.Controlled Access 3.Channelization.
1 Kyung Hee University Chapter 12 Multiple Access.
Chapter 6 Multiple Radio Access
5: DataLink Layer 5a-1 Multiple Access protocol. 5: DataLink Layer 5a-2 Multiple Access Links and Protocols Three types of “links”: r point-to-point (single.
Data Link Layer. Useful References r Wireless Communications and Networks by William Stallings r Computer Networks (third edition) by Andrew Tanenbaum.
Ch 12. Multiple Access. Multiple Access for Shared Link Dedicated link – Point-to-point connection is sufficient Shared link – Link is not dedicated –
LECTURE9 NET301 11/5/2015Lect 9 NET DYNAMIC MAC PROTOCOL: CONTENTION PROTOCOL Carrier Sense Multiple Access (CSMA): A protocol in which a node verifies.
1 Ethernet CSE 3213 Fall February Introduction Rapid changes in technology designs Broader use of LANs New schemes for high-speed LANs High-speed.
Chapter 4 The Medum Access Sublayer. MA Sublayer Additional Reference –Local and Metropolitan Area Networks, William Stallings, Prentice Hall, 2000, 6th.
Medium Access Control Protocols, Local Area Networks, and Wireless Local Area Networks Lecture Note 10.
THE MEDIUM ACCESS CONTROL SUBLAYER 4.1 THE CHANNEL ALLOCATION PROBLEM 4.2 MULTIPLE ACCESS PROTOCOLS.
UNIT 3 MULTIPLE ACCESS Adapted from lecture slides by Behrouz A. Forouzan © The McGraw-Hill Companies, Inc. All rights reserved.
COMPUTER NETWORKS Data-link Layer (The Medium Access Control Sublayer) MAC Sublayer.
Example DLL Protocols 1. High-Level Data Link Control (HDLC).
Chapter 12 Multiple Access
Module 3 Medium Access Control.
Multiple Access Mahesh Jangid Assistant Professor JVW University.
Channel Allocation (MAC)
Net301 lecture9 11/5/2015 Lect 9 NET301.
Figure 12.1 Data link layer divided into two functionality-oriented sublayers Networks can be divided into two categories: those using point-to-point.
THE IEEE MAC SUB-LAYER – chapter 14
Channel Allocation Problem/Multiple Access Protocols Group 3
Chapter 12 Multiple Access
Link Layer and LANs Not everyone is meant to make a difference. But for me, the choice to lead an ordinary life is no longer an option 5: DataLink Layer.
Channel Allocation Problem/Multiple Access Protocols Group 3
Chapter 6 Multiple Radio Access.
Dr. John P. Abraham Professor UTPA
Multiple Access Control (MAC) Protocols
Chapter 12 Media Access Control (MAC)
Presentation transcript:

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

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

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?

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

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

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?

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

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

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)

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

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

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

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

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.

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

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

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!

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

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 + 1 + a , I = 1/G U = e-aG FY(y)=P{no packet occur in an duration of a-y } = e-G(a-y)

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.

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.

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

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

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

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.

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

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

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.

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 /

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 /

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.

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

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

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

TDMA Time Division Multiple Access

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

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

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?

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.

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

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 802.11 defines an 11-bit chipping code Random sequence: 0100101101011001 Data stream: 1010 XOR of the two: 1011101110101001 1

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>

CDMA Example

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

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