CSE 123A Computer Networks



Similar documents
EECS 122: Introduction to Computer Networks Multiaccess Protocols. ISO OSI Reference Model for Layers

CSE331: Introduction to Networks and Security. Lecture 6 Fall 2006

Lecture 7 Multiple Access Protocols and Wireless

CS263: Wireless Communications and Sensor Networks

Random Access Protocols

Local Area Networks transmission system private speedy and secure kilometres shared transmission medium hardware & software

CS6956: Wireless and Mobile Networks Lecture Notes: 2/11/2015. IEEE Wireless Local Area Networks (WLANs)

Ethernet. Ethernet Frame Structure. Ethernet Frame Structure (more) Ethernet: uses CSMA/CD

Ethernet, VLAN, Ethernet Carrier Grade

Attenuation (amplitude of the wave loses strength thereby the signal power) Refraction Reflection Shadowing Scattering Diffraction

Based on Computer Networking, 4 th Edition by Kurose and Ross

How To Make A Multi-User Communication Efficient

Lecture 17: Wireless Networking"

MAC Algorithms in Wireless Networks

EPL 657 Wireless Networks

standard. Acknowledgement: Slides borrowed from Richard Y. Yale

What is it all about? Some simple solutions. Multiple Access. Contexts for the multiple access problem. Outline. Contexts

Controlled Random Access Methods

Collision of wireless signals. The MAC layer in wireless networks. Wireless MAC protocols classification. Evolutionary perspective of distributed MAC

TCOM 370 NOTES LOCAL AREA NETWORKS AND THE ALOHA PROTOCOL

LAN Switching Computer Networking. Switched Network Advantages. Hubs (more) Hubs. Bridges/Switches, , PPP. Interconnecting LANs

10. Wireless Networks

Unit of Learning # 2 The Physical Layer. Sergio Guíñez Molinos sguinez@utalca.cl

Markku Renfors. Partly based on student presentation by: Lukasz Kondrad Tomasz Augustynowicz Jaroslaw Lacki Jakub Jakubiak

COMP 3331/9331: Computer Networks and Applications

Wireless Networks. Reading: Sec5on 2.8. COS 461: Computer Networks Spring Mike Freedman

Data Link Protocols. Link Layer Services. Framing, Addressing, link access: Error Detection:

CSMA/CA. Information Networks p. 1

RTT 60.5 msec receiver window size: 32 KB

LANs. Local Area Networks. via the Media Access Control (MAC) SubLayer. Networks: Local Area Networks

ECE/CS 372 introduction to computer networks. Lecture 13

ECE 358: Computer Networks. Homework #3. Chapter 5 and 6 Review Questions 1

Wiereless LAN

Data Center Networks, Link Layer Wireless (802.11)

ECE 428 Computer Networks and Security

Medium Access Control (MAC) Protocols for Ad hoc Wireless Networks - III

Hello viewers, welcome to today s lecture on cellular telephone systems.

Express Forwarding : A Distributed QoS MAC Protocol for Wireless Mesh

Data Link Layer. Page 1. Ethernet

Wireless LAN Protocol CS 571 Fall Kenneth L. Calvert All rights reserved

Medium Access Control (MAC) and Wireless LANs

... neither PCF nor CA used in practice

TCP in Wireless Networks

Ring Local Area Network. Ring LANs

Module 5. Broadcast Communication Networks. Version 2 CSE IIT, Kharagpur

EXAMPLES AND PROBLEMS. Competence Based Education Internet Protocols

Adaptive DCF of MAC for VoIP services using IEEE networks

A research perspective on the adaptive protocols' architectures and system infrastructures to support QoS in wireless communication systems

Chapter 6: Wireless and Mobile Networks

ECE 333: Introduction to Communication Networks Fall 2002

Chapter 6: Medium Access Control Layer

Real-Time (Paradigms) (51)

Administrivia. CSMA/CA: Recap. Mobility Management. Mobility Management. Channel Partitioning, Random Access and Scheduling

The Wireless Network Road Trip

Chapter 4. Medium Access Control. IN2P3 Octobre 2002 Jean-Pierre Thomesse

EECC694 - Shaaban. Transmission Channel

Chapter 7 Low-Speed Wireless Local Area Networks

First Semester Examinations 2011/12 INTERNET PRINCIPLES

Mobile Communications Exercise: Satellite Systems and Wireless LANs. Georg von Zengen, IBR, TU Braunschweig,

Performance Evaluation of a Binary Exponential Code Backoff Algorithm for IEEE Kang Sun

DATA COMMUNICATIONS AND NETWORKING. Solved Examples

IEEE Technical Tutorial. Introduction. IEEE Architecture

Final Exam. Route Computation: One reason why link state routing is preferable to distance vector style routing.

Overview of Network Hardware and Software. CS158a Chris Pollett Jan 29, 2007.


ESSENTIALS. Understanding Ethernet Switches and Routers. April 2011 VOLUME 3 ISSUE 1 A TECHNICAL SUPPLEMENT TO CONTROL NETWORK

Video Transmission over Wireless LAN. Hang Liu

Network Categories. Network Types for the Local Range. Ethernet. Carrier Sense Multiple Access

VoIP in Mika Nupponen. S Postgraduate Course in Radio Communications 06/04/2004 1

Computer Network. Interconnected collection of autonomous computers that are able to exchange information

Performance Evaluation of Wired and Wireless Local Area Networks

Wireless and Mobile Networks

Direct Link Networks. Introduction. Physical Properties. Lecture - Ethernet 1. Areas for Discussion. Ethernet (Section 2.6)

Network Categories. Network Types for the Local Range. Ethernet

Protocolo IEEE Sergio Scaglia SASE Agosto 2012

A Short Look on Power Saving Mechanisms in the Wireless LAN Standard Draft IEEE

How To Solve A Network Problem In An Ipa (Ipa 2) (Ipam) (Networking) (For Acedo) (Ipta) (Powerline) (Network) (Nem

IEEE WLAN (802.11) ...Copyright. Renato Lo Cigno

IEEE Ad Hoc Networks: Performance Measurements

Lecture 3: Signaling and Clock Recovery. CSE 123: Computer Networks Stefan Savage

Algorithms for Interference Sensing in Optical CDMA Networks

Local Area Networks. Guest Instructor Elaine Wong. Elaine_06_I-1

Ethernet. Ethernet. Network Devices

IEEE e WLANs / WMM. S.Rajesh (rajeshsweb@gmail.com) AU-KBC Research Centre, BroVis Wireless Networks, smartbridges Pte Ltd.

Computer Networks. Wireless and Mobile Networks. László Böszörményi Computer Networks Mobile - 1

1 Wireless Media Access Control

Wireless Personal Area Networks (WPANs)

A Technical Tutorial on the IEEE Protocol

communication over wireless link handling mobile user who changes point of attachment to network

COMPUTER NETWORKS HANDOUTS LECTURERS # PREPARED BY: HAMMAD KHALID KHAN. Copyright Virtual University of Pakistan

Analog vs. Digital Transmission

Gigabit Ethernet. Abstract. 1. Introduction. 2. Benefits of Gigabit Ethernet

RETI DI TELECOMUNICAZIONI

Network Topologies. Network Topologies

Selecting a Web Server Connection Rate Gilbert Held

ISSN: ISO 9001:2008 Certified International Journal of Engineering Science and Innovative Technology (IJESIT) Volume 2, Issue 5, September

A TCP-like Adaptive Contention Window Scheme for WLAN

RESOURCE ALLOCATION FOR INTERACTIVE TRAFFIC CLASS OVER GPRS

Objectives. Lecture 4. How do computers communicate? How do computers communicate? Local asynchronous communication. How do computers communicate?

The MAC layer in wireless networks

Transcription:

CSE 123A Computer Networks Winter 2005 Lecture 5: Data-Link II: Media Access Some portions courtesy Srini Seshan or David Wetherall

Last Time Framing: How to translate a bitstream into separate packets 101010111 101010111001001111000010110 001001111 000010110 January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 2

Today: media access How to share a channel among different hosts? Approaches Channel partitioning» FDMA, TDMA, CDMA Random access» Contention-based Aloha CSMA, CSMA/CD, CSMA/CA Ethernet, 802.11» Contention-free Token-ring, FDDI January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 3

Channel partitioning Problem Have channel that can support 10Mbps Have 5 hosts, who want to send 2Mbps of data How to meet this need and use channel efficiently Solution Create 5 channels each 1/5 th the size Next question: how to split the channel January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 4

Frequency Division Multiple Access (FDMA) Divide channel with some bandwidth f Hz into n subchannels each with bandwidth f/n Hz Assign different hosts to different channels Easy to implement, but unused subchannels go idle Used by traditional analog cell phone service Amplitude Amplitude Frequency Frequency January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 5

Time Division Multiple Access (TDMA) Divide channel into time rounds of length t with n time slots in each round Assign different hosts to different time slots within a round Unused time slots are idle Used (in conjunction with FDM) in GSM cell phones Example, rounds of 1 second, with 4 timeslots (250ms) per round Host # 1 2 3 1 2 3 4 2 4 1 sec 1 sec 1 sec January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 6

Code Division Multiple Access Very different, spread spectrum coding All hosts use the whole channel all the time (?!?) Assign different hosts a unique spreading code which encodes transmitted data to cover the entire channel Receivers apply same code to extract the source signal they want out of the channel Used by cell phone networks using Qualcomm chipsets (e.g. Verizon, Sprint) Magic January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 7

Channel partitioning summary FDMA power frequency power TDMA time time time frequency CDMA power frequency Courtesy Takashi Inoue January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 8

Problem Not terribly well suited for random access usage. Why? New problem: how to do we share a single channel among different hosts who want to send different amounts of data at different times? January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 9

Aloha Designed in 1970 to explore wireless data connectivity between Hawaiian Islands Goal: distributed access control (no central arbitrator) over a shared broadcast channel Aloha protocol in a nutshell: When you have data send it If data doesn t get through (receiver sends acknowledgement) then retransmit after a random delay January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 10

Problem Any packet sent at t 0 collide with other pkts sent in [t 0-1, t 0 +1] January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 11

Slotted Aloha Time is divided into equal size slots (= pkt trans. time) Host wanting to transmit starts at start of next slot But requires time synchronization between hosts Success (S), Collision (C), Empty (E) slots January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 12

Slotted Aloha Efficiency Q: What is max fraction slots successful? A: Suppose N stations have packets to send Each transmits in slot with probability p Prob. successful transmission S is: single node: S = p (1-p) (N-1) any of N nodes: S = Prob (only one transmits) S = N p (1-p) (N-1) (optimal p as N->infinity = 1/N) = 1/e =.37 0.4 0.3 0.2 0.1 At best: channel used for useful transmissions 37% of time! Slotted Aloha Pure Aloha 0.5 1.0 1.5 2.0 offered load = N X p January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 13

Carrier Sense Multiple Access (CSMA) Aloha transmits even if another host is transmitting (guaranteed collision) Can do better by listening first to make sure channel is idle Effective if # of pkts on the channel is small (bw*delay/packet size) Small (<<1) for LANs, large (>>1) for satellites January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 14

How long to wait if channel is busy? 1-persistent CSMA Send as soon as channel is idle Problem: blocked senders all try to send at once non-persistent CSMA Send after some random delay Problem: may incur larger delay when channel is idle p-persistent CSMA If idle, send packet with probability p; repeat Make sure p * number of hosts < 1 January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 15

CSMA with Collision Detection (CSMA/CD) Even with CSMA there can still be collisions. Why? For wired media we can detect all collisions and abort (CSMA/CD): A Time for B to detect A s transmission X collision (wire) Requires a minimum frame size ( acquiring the medium ) B must continue sending ( jam ) until A detects collision Tough for radio (hard to listen & xmit at same time) B January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 16

Ethernet First local area network (building in early 70s by Metcalfe and Boggs) Originally 1Mbps, now supports 10Mbps, 100Mbps, 1Gbps and 10Gbps flavots Currently the dominant LAN technology January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 17

Classic Ethernet IEEE 802.3 standard wired LAN (modified 1-persistent CSMA/CD) Classic Ethernet: 10 Mbps over coaxial cable All nodes share same wire Max length 2.5km, max between stations 500m Framing nodes (wire) Preamble, 32bit CRC, variable length data, min frame 64 bytes (why?), max 1500 bytes (why?) Unique 48-bit address per host (bcast & multicast addrs too) Preamble (8) Source (6) Dest (6) Len (2) Payload (var) Pad (var) CRC (4) January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 18

Ethernet improvements Jamming Send special 48 bit sequence to ensure collision detection by all hosts Exponential backoff Problems with random delay with fixed mean» Few senders = unnecessary delay» Many senders = unnecessary collisions Ethernet approach: balance delay w/load» First collision: wait 0 or 1 min frame times at random, retry» Second time: wait 0, 1, 2, or 3 times» Nth time (N<=10): wait 0, 1,, 2 N -1 times» Max wait 1023 frames, give up after 16 attempts January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 19

Capture Effect Randomized access scheme is not fair Stations A and B always have data to send They will collide at some time Suppose A wins and sends, while B backs off Next time they collide and B s chances of winning are halved! January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 20

Ethernet Performance Much better than Aloha or CSMA in practice Source of protocol inefficiency: collisions More efficient to send larger frames» Acquire the medium and send lots of data Less efficient if» More hosts more collisions needed to identify single sender» Smaller packet sizes more frequent arbitration» Longer links collisions take longer to observe, more wasted bandwidth January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 21

Contention-free Protocols Problem with channel partitioning Inefficient at low load (idle subchannels) Problem with contention-based protocols Inefficient at high load (collisions) Contention-free protocols Try to do both by explicitly taking turns Can potentially also offer guaranteed bandwidth, latency, etc. January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 22

Two contention-free approaches Polling Master node invites slave nodes to transmit in turn Request to Send (RTS), Clear to Send (CTS) messages Problems: Polling overhead Latency Single point of failure (master) Token Passing Control token passed from one node to next sequentially. Point-to-point links can be fast Problems: Token overhead Latency Single point of failure (token) January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 23

Token Ring (802.5) D C A B nodes Direction of transmission Token rotates permission to send around node Sender injects packet into ring and removes later Maximum token holding time (THT) bounds access time Early or delayed token release Round robin service, acknowledgments and priorities Monitor nodes ensure health of ring (alerts on failures) January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 24

FDDI (Fiber Distributed Data Interface) Roughly a large, fast token ring 100 Mbps and 200km vs 4/16 Mbps and local Dual counter-rotating rings for redundancy Complex token holding policies for voice etc. traffic Token ring advantages No contention, bounded access delay Support fair, reserved, priority access Disadvantages Complexity, reliability, scalability Break! January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 25

Why Did Ethernet Win? Failure modes Token rings network unusable Ethernet node detached Good performance in common case Volume lower cost higher volume. Adaptable To higher bandwidths (vs. FDDI) To switching (vs. ATM) Completely distributed, easy to maintain/administer Easy incremental deployment Cheap cabling, etc January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 26

Wireless Media Access Wireless is more complicated than wired Cannot detect collisions Transmitter swamps co-located receiver Collision avoidance Different transmitters have different coverage areas Asymmetries lead to hidden/exposed terminal problems Also use contention-free protocols (RTS/CTS) January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 27

Hidden Terminals A B C transmit range A and C can both send to B but can t hear each other A is a hidden terminal for C and vice versa CSMA will be ineffective want to sense at receiver January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 28

Exposed Terminals A B C D transmit range B, C can hear each other but can safely send to A, D January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 29

CSMA with Collision Avoidance (CSMA/CA) Since we can t detect collisions, we try to avoid them When medium busy, choose random interval (contention window) Wait for that many idle timeslots to pass before sending ( Remember p-persistence a refinement When a collision is inferred, retransmit with binary exponential backoff (like Ethernet) Use ACK from receiver to infer no collision Again, exponential backoff helps us adapt p as needed January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 30

RTS / CTS Protocols (MACA) A RTS B C D CTS Overcome exposed/hidden terminal problems with contention-free protocol 1. B stimulates C with Request To Send (RTS) 2. A hears RTS and defers to allow the CTS 3. C replies to B with Clear To Send (CTS) 4. D hears CTS and defers to allow the data 5. B sends to C January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 31

IEEE 802.11 Wireless LAN 802.11b 2.4-5 GHz unlicensed radio spectrum up to 11 Mbps direct sequence spread spectrum (DSSS) in physical layer» All hosts use same code Widely deployed, using base stations 802.11a 5-6 GHz range up to 54 Mbps 802.11g 2.4-5 GHz range up to 54 Mbps All use CSMA/CA for multiple access Optional RTS/CTS All have base-station and ad-hoc network versions January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 32

IEEE 802.11 Wireless LAN Wireless host communicates with a base station Base station = access point (AP) Basic Service Set (BSS) (a.k.a. cell ) contains: Wireless hosts Access point (AP): base station BSS s combined to form distribution system (DS) January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 33

Ad Hoc Networks Ad hoc network: IEEE 802.11 stations can dynamically form network without AP Theoretical Applications: Laptops meeting in conference room, car Interconnection of personal devices Rare in practice January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 34

802.11 Twists How to support different speeds on same channel? Physical layer header encoded at lowest bitrate and indicates bitrate of rest of packet Network Allocation Vector (NAV) Each frame contains field that indicates the amount of time that will be used for the communication (channel reservation) All receivers defer xmit for that time Allows for long or multi-frame exchange RTS/CTS used as function of packet size Why? January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 35

Misc issues Addressing January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 36

Misc issue: Addressing Alternatives On a broadcast channel all nodes receive all packets Addressing determines which packets are kept and which are packets are thrown away Packets can be sent to:» Unicast one destination» Multicast group of nodes (e.g. everyone playing Quake )» Broadcast everybody on wire Dynamic addresses (e.g. Appletalk) Pick an address at random Broadcast is anyone using address XX? If yes, repeat Static address (e.g. Ethernet, 802.11, TokenRing, etc) January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 37

IEEE addressing (Ethernet,etc( Ethernet,etc) Addresses: 6 bytes (48bits) Each adapter is given a globally unique address at manufacturing time ($$$)» Address space is allocated to manufacturers 24 bits identify manufacturer E.g., 0:0:15:* 3com adapter» Frame is received by all adapters on a LAN and dropped if address does not match Special addresses» Broadcast FF:FF:FF:FF:FF:FF is everybody» Range of addresses allocated to multicast Adapter maintains list of multicast groups node is interested in Practical problems: non-unique addresses January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 38

Summary Ways to share a channel Subdivide the channel into subchannels Contention-based protocols» Try and retry if it fails Contention-free protocols» Explicit control over who gets to send at each time Particular issues for wireless Hidden/exposed terminal problems Addressing For next time: bridging/switching, read 3.2, 3.1 First homework & programming assignment will be given out January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 39

Backup: End to End Delay in Ethernet c in cable = 60% * c in vacuum = 1.8 x 10^8 m/s Modern 10Mb Ethernet 2.5km, 10Mbps ~= 12.5us delay +Introduced repeaters (max 5 segments) Worst case 51.2us round trip time! Slot time = 51.2us = 512bits in flight After this amount, sender is guaranteed sole access to link 51.2us = slot time for backoff January 20, 2005 CSE 123A -- Lecture 5 Datalink II: Media Access 40