Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 16 Random Access protocols r A node transmits at random at full channel data rate R. r If two or more nodes “collide”, they retransmit at random.

Similar presentations

Presentation on theme: "Lecture 16 Random Access protocols r A node transmits at random at full channel data rate R. r If two or more nodes “collide”, they retransmit at random."— Presentation transcript:

1 Lecture 16 Random Access protocols r A node transmits at random at full channel data rate R. r If two or more nodes “collide”, they retransmit at random times r The random access MAC protocol specifies how to detect collisions and how to recover from them (via delayed retransmissions, for example) r Examples of random access MAC protocols m SLOTTED ALOHA m ALOHA m CSMA and CSMA/CD

2 Lecture 16-2 Slotted Aloha r Time is divided into equal size slots (= sending one frame) r a newly arriving station transmits at the beginning of the next slot r if collision occurs (assume channel feedback, eg the receiver informs the source of a collision), the source retransmits the packet at each slot with probability P, until successful. r Success (S), Collision (C), Empty (E) slots r Fully decentralized

3 Lecture 16-3 Slotted Aloha efficiency If N stations always have frames to send, and each transmits in each slot with probability P, the probability of successful transmission S is: S = Prob (only one transmits) = N P (1-P)^(N-1) Optimal value of P: P = 1/N For example, if N=2, S=.5 For N very large one finds S= 1/e (approximately,.37)

4 Lecture 16-4 Pure (unslotted) ALOHA r Slotted ALOHA requires slot synchronization r A simpler version, pure ALOHA, does not require slots r A node transmits without awaiting for the beginning of a slot r Collision probability increases (packet can collide with other packets which are transmitted within a window twice as large as in S-Aloha) r Throughput is reduced by one half, S= 1/2e

5 Lecture 16-5 CSMA (Carrier Sense Multiple Access) r CSMA: listen before transmit. If channel is sensed busy, defer transmission r Persistent CSMA: retry immediately when channel becomes idle (this may cause instability) r Non persistent CSMA: retry after random interval of time r Note: collisions may still exist, since two stations may sense the channel idle at the same time ( or better, within a “vulnerable” window = round trip delay) r In case of collision, the entire pkt transmission time is wasted

6 Lecture 16-6 CSMA collisions

7 Lecture 16-7 CSMA/CD (Collision Detection) r CSMA/CD: like in CSMA m collisions are detected within a few bit times m Transmission is then aborted, reducing the channel wastage considerably m persistent retransmission is implemented r Collision detection is easy in wired LANs: m can measure signal strength on the line r Collision detection cannot be done in wireless LANs : r CSMA/CD can approach channel utilization =1 in LANs: m low ratio of propagation over frame transmission time

8 Lecture 16-8 CSMA/CD collision detection

9 Lecture 16-9 “Taking Turns” MAC protocols Recall the first 2 types of MAC Protocols: H channel partitioning MAC protocols :TDM, FDM and CDMA m + can share channel fairly m - a single station cannot use it all H Random access MAC protocols m + a single station can use full channel rate m - cannot share the channel fairly a Third type of MAC protocol is Taking Turns protocol: r Taking Turns MAC protocols: m Achieve both fair and full rate m with some extra control overhead (a) Polling: Master “invites” slaves - Request/Clear overhead, latency, single point of failure (b) Token passing: token is passed from one node to the next + Reduce latency, improve fault tolerance - elaborate procedures to recover from lost token

10 Lecture 16-10 LAN technologies r MAC protocols used in LANs, to control access to the channel r Token Rings: IEEE 802.5 (IBM token ring), for computer room, or Department connectivity, up to 16Mbps; FDDI (Fiber Distributed Data Interface), for Campus and Metro connectivity, up to 200 stations, at 100Mbps. r Ethernets: employ the CSMA/CD protocol; 10Mbps (IEEE 802.3), Fast E-net (100Mbps), Giga E-net (1,000 Mbps); by far the most popular LAN technology

11 Lecture 16-11 LAN Addresses and ARP r IP address: drives the packet to destination network r LAN (or MAC or Physical) address: drives the packet to the destination node’s LAN interface card on the local LAN r 48 bit MAC address (for most LANs); burned in the adapter ROM (alias Ethernet address, alias physical address)

12 Lecture 16-12 LAN Address (cont) r MAC address allocation administered by IEEE r A manufacturer buys a portion of the address space m to assure uniqueness r Analogy: (a) MAC address: like Social Security Number (b) IP address: like postal address r MAC flat address => portability r IP hierarchical address NOT portable (need mobile IP) r Broadcast LAN address: 1111………….1111 (FF-FF-FF-FF-FF-FF)

13 Lecture 16-13 ARP: Address Resolution Protocol r Each IP node (Host, Router) on the LAN has ARP module and Table r ARP Table: IP/MAC address mappings for some LAN nodes r TTL (Time To Live): timer, typically 20 min

14 Lecture 16-14 ARP (cont) r Host A wants to send packet to destination IP addr XYZ on same LAN r Source Host first checks own ARP Table for IP addr XYZ r If XYZ not in the ARP Table, ARP module broadcasts ARP pkt: r ALL nodes on the LAN accept and inspect the ARP pkt r Node XYZ responds with unicast ARP pkt carrying own MAC addr: r MAC address cached in ARP Table

15 Lecture 16-15 Routing pkt to another LAN r Say, route packet from source IP addr to destination addr r In routing table at source Host, find router r In ARP table at source, find MAC address E6-E9-00-17-BB-4B, etc

Download ppt "Lecture 16 Random Access protocols r A node transmits at random at full channel data rate R. r If two or more nodes “collide”, they retransmit at random."

Similar presentations

Ads by Google