Local Area Networks
Total Page:16
File Type:pdf, Size:1020Kb
Local area networks Katia Jaffr`es-Runserand Gentian Jakllari fkjr,jakllarig-at-n7.fr Toulouse INP - ENSEEIHT D´epartement Sciences du Num´erique 1`ereann`ee INP ENSEEIHT T O U L O U S E 1SN - Local area networks 1 Lecture 1: Introduction to local area networks Central question for this class : How to create a network for devices that are relatively close to each other { a local network ? 1SN - Local area networks 2 Local area networks NOT a dedicated wire per communication It doesn't scale: for N devices, we need N(N − 1)=2 wires. 1 1 source: https://cedarandthistle.files.wordpress.com/2013/09/messy_cables.jpg 1SN - Local area networks 3 Local area networks Share the wire ! All devices have to share the same wire. I In this case, the communication is by nature ***in broadcast*** mode Each transmitted bit is received by all other nodes on the channel 1SN - Local area networks 4 Different situations may occur: I No one else is transmitting data for the complete transmission duration. ! The message is received properly by the destination . I Another device transmits a message during the transmission, ! The messages are superimposed (destructively) and can't be understood: there is a collision ! / Shared access networks What happens if a device sends its message whenever needed? 1SN - Local area networks 5 I Another device transmits a message during the transmission ! The messages are superimposed (destructively) and can't be understood: there is a collision ! / Shared access networks What happens if a device sends its message whenever needed? Different situations may occur: I No one else is transmitting data for the complete transmission duration. ! The message is received properly by the destination . , 1SN - Local area networks 6 Shared access networks What happens if a device sends its message whenever needed? Different situations may occur: I No one else is transmitting data for the complete transmission duration. ! The message is received properly by the destination . I Another device transmits a message during the transmission, ! The messages are superimposed (destructively) and can't be understood: there is a collision ! / 1SN - Local area networks 7 Using a Medium Access Control protocol a.k.a. MAC protocol. These are rules enforced so as to: I Avoid collisions or re-transmit data if a collision occurs, I Offer each node a fair access to the channel. Each device on the network gets a fair share of channel bandwidth on average. Bandwidth The amount of data that can be passed along a communication channel in a given period of time. Shared access networks Collisions Have of course to be mitigated. But how? 1SN - Local area networks 8 Bandwidth The amount of data that can be passed along a communication channel in a given period of time. Shared access networks Collisions Have of course to be mitigated. But how? Using a Medium Access Control protocol a.k.a. MAC protocol. These are rules enforced so as to: I Avoid collisions or re-transmit data if a collision occurs, I Offer each node a fair access to the channel. Each device on the network gets a fair share of channel bandwidth on average. 1SN - Local area networks 9 Shared access networks Collisions Have of course to be mitigated. But how? Using a Medium Access Control protocol a.k.a. MAC protocol. These are rules enforced so as to: I Avoid collisions or re-transmit data if a collision occurs, I Offer each node a fair access to the channel. Each device on the network gets a fair share of channel bandwidth on average. Bandwidth The amount of data that can be passed along a communication channel in a given period of time. 1SN - Local area networks 10 MAC protocol and channel access method MAC protocol Decides when each device can transmit its messages on the shared channel (or who speaks next). There are numerous MAC protocols available: I For wired networks: Ethernet, switched Ethernet, HDLC, Token Ring, Token Bus, CAN, AFDX, FDDI, etc... I For wireless networks: WiFi, Bluetooth, ZigBee, WiMax, GSM, LTE, etc... 1SN - Local area networks 11 MAC protocol and channel access method Channel access methods MAC protocols follow different approaches for sharing the channel. Each type is called a channel access method. 1SN - Local area networks 12 Channel access methods Random Access I Stations contend with each other without any centralized coordination I Collisions are the norm I A specific algorithm for resolving contention/reducing collisions once they happen I resolve collisions : detect a collision and do something to fix it I reduce collisions : reduce the odds for a collision to happen 1SN - Local area networks 13 Channel access methods Deterministic Access I There is no contention { stations agree in advance I There are no collisions I Different ways to agreeing, resulting in different MAC protocols : I Centralized : a unique entity decides on resource allocation I Distributed : nodes agree by exchanging messages 1SN - Local area networks 14 Channel access methods Deterministic Access I Different ways to executing the agreement I Circuit-like: TDMA, FDMA, ... I Packet based: Polling, Token passing I Remember from telephony: Either we share time (TDMA), frequencies (FDMA), time-frequency blocks (FTDMA), orthogonal codes (CDMA), or space (SDMA). 1SN - Local area networks 15 This course This course introduces *** the main channel access methods *** and illustrates them with *** state-of-the-art MAC protocols.*** 1SN - Local area networks 16 Outline for the rest of this class Lecture 1: Introduction to local area networks Part 1: Random channel access Lecture 2: Random channel access Lecture 3: Ethernet and switched Ethernet Lecture 4: WiFi - Distributed Coordination Function (DCF) Part 2: Deterministic channel access Lecture 5: WiFi (PCF) Lecture 6: Token Ring 1SN - Local area networks 17 Lecture 2: Random channel access. ALOHA Carrier Sense Multiple Access 1SN - Local area networks 18 ALOHA networks ALOHA: The origin of random access2 I Developed in the late 60's by Norman Abramson et al to allow the 7 campuses of the Univ. of Hawai'i, located on 4 different islands, to share computer resources on the main campus I The first user terminals went into operation in June 1971 I The communication protocol was implemented by a special-purpose piece of equipment { the terminal control unit (TCU) I Compare it to a wifi card... I A user terminal was attached to the TCU 2 N. Abramson, "The AlohaNet - surfing for wireless data [History of Communications]," in IEEE Communications Magazine, vol. 47, no. 12, pp. 21-25, Dec. 2009. 1SN - Local area networks 19 How to try again ? Re-send data after a random duration called the Backoff period I Avoids repeated collisions. I The way this random choice is made influences the overall performance. ALOHA networks ALOHA networks I Key decision: Use the direct form of transmitting user information in a single high-speed packet burst in a shared wireless channel I Driven by the need for a simple design; throughput computed several weeks after the decision I Cost of memory for a packet buffer of 88 bytes was about $300 I Channel access philosophy : let collisions happen, detect when they occur and then try again. I Any station can send data at any time I If, while transmitting, any data is received concurrently, then there is a collision { will need to try again. 1SN - Local area networks 20 ALOHA networks ALOHA networks I Key decision: Use the direct form of transmitting user information in a single high-speed packet burst in a shared wireless channel I Driven by the need for a simple design; throughput computed several weeks after the decision I Cost of memory for a packet buffer of 88 bytes was about $300 I Channel access philosophy : let collisions happen, detect when they occur and then try again. I Any station can send data at any time I If, while transmitting, any data is received concurrently, then there is a collision { will need to try again. How to try again ? Re-send data after a random duration called the Backoff period I Avoids repeated collisions. I The way this random choice is made influences the overall performance. 1SN - Local area networks 21 ALOHA networks Vulnerability period The message transmitted at time t experiences a collision if any other message overlaps partially with its transmission. Sender A Sender B Fail Sender C Success T t−T t t+T time Vulnerability period 2T If all messages have equal length T , then the vulnerability period is of size 2T . 1SN - Local area networks 22 ALOHA networks Throughput achieved by ALOHA It can be derived as follow: I Suppose that the number of transmission attempts per frame duration T follows a Poisson distribution of mean G. G k e−G Thus the probability of having k attempts during T is: k! I The probability of having no collision for the vulnerability period of 2T is given by e−2G I Thus, the throughput is the number G of attempts during T that don't experience any collision : D = G · e−2G 1SN - Local area networks 23 Throughput for ALOHA Maximum throughout is obtained for a load G = 0:5, that is D = 0:5=e ' 0:184. I Very low! Only 18% of frames don't collide at best. 1SN - Local area networks 24 Slotted ALOHA Increase the efficiency of ALOHA Idea: reduce the vulnerability period duration by synchronizing transmissions Sender A Sender B Fail Success Sender C Clock node Slot Vulnerability period T I All nodes are synchronized on a given slot duration of size T I A transmission can only start at slot begin. ! vulnerability period is reduced to T .