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



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

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

Random Access Protocols

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

CSE 123A Computer Networks

TCOM 370 NOTES LOCAL AREA NETWORKS AND THE ALOHA PROTOCOL

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

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

CS263: Wireless Communications and Sensor Networks

Lecture 7 Multiple Access Protocols and Wireless

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

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

Ethernet, VLAN, Ethernet Carrier Grade

RTT 60.5 msec receiver window size: 32 KB

Controlled Random Access Methods

Lecture 17: Wireless Networking"

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

How To Make A Multi-User Communication Efficient

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

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

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

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

Introduction to Ethernet

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

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

Performance Evaluation of Wired and Wireless Local Area Networks

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

MAC Algorithms in Wireless Networks

EPL 657 Wireless Networks

Data Link Protocols. TCP/IP Suite and OSI Reference Model

EXAMPLES AND PROBLEMS. Competence Based Education Internet Protocols

ECE/CS 372 introduction to computer networks. Lecture 13

10. Wireless Networks

ECE 333: Introduction to Communication Networks Fall 2002

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

CSMA/CA. Information Networks p. 1

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

DATA COMMUNICATION AND NETWORKS

Real-Time (Paradigms) (51)

Data Link Layer. Page 1. Ethernet

CS 5480/6480: Computer Networks Spring 2012 Homework 4 Solutions Due by 1:25 PM on April 11 th 2012

Wireless Links - Wireless communication relies on radio signals or infrared signals for transmitting data.

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

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

Wiereless LAN

Communication Systems Internetworking (Bridges & Co)

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

standard. Acknowledgement: Slides borrowed from Richard Y. Yale

Chapter 9A. Network Definition. The Uses of a Network. Network Basics

Gigabit Ethernet: Architectural Design and Issues

1. The subnet must prevent additional packets from entering the congested region until those already present can be processed.

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

Operating System Concepts. Operating System 資 訊 工 程 學 系 袁 賢 銘 老 師

COMP 3331/9331: Computer Networks and Applications

First Semester Examinations 2011/12 INTERNET PRINCIPLES

Adaptive DCF of MAC for VoIP services using IEEE networks

ECE 428 Computer Networks and Security

Dynamic Source Routing in Ad Hoc Wireless Networks

TCP in Wireless Networks

Industrial Networks & Databases

Chapter 14: Distributed Operating Systems

Module 15: Network Structures

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

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

What s a protocol? What s a protocol? A closer look at network structure: What s the Internet? What s the Internet? What s the Internet?

2. What is the maximum value of each octet in an IP address? A. 128 B. 255 C. 256 D. None of the above

Chapter 16: Distributed Operating Systems

Wireless LAN Concepts

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

CSCI 362 Computer and Network Security

IT4405 Computer Networks (Compulsory)

TCP/IP Protocol Suite. Marshal Miller Chris Chase

Computer Networks: LANs, WANs The Internet

IEEE Ad Hoc Networks: Performance Measurements

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

R2. The word protocol is often used to describe diplomatic relations. How does Wikipedia describe diplomatic protocol?

Computer Networks CS321

Express Forwarding : A Distributed QoS MAC Protocol for Wireless Mesh

Overview of Computer Networks

Computer Networks. Computer Networks. Telecommunication Links. Connecting. Connecting via Telephone Lines ISDN

28 Networks and Communication Protocols

... neither PCF nor CA used in practice

Agenda. Distributed System Structures. Why Distributed Systems? Motivation

DATA COMMUNICATIONS AND NETWORKING. Solved Examples

TCP Westwood for Wireless

Chapter 7: Computer Networks, the Internet, and the World Wide Web. Invitation to Computer Science, C++ Version, Third Edition

The Wireless Network Road Trip

Fast Ethernet and Gigabit Ethernet. Networks: Fast Ethernet 1


Data Center Networks, Link Layer Wireless (802.11)

1 Which network type is a specifically designed configuration of computers and other devices located within a confined area? A Peer-to-peer network

Network Categories. Network Types for the Local Range. Ethernet

Local-Area Network -LAN

Frame Burst Adjusting for Transmitting Video Conference in Gigabit Ethernet

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

Mathatma Gandhi University

Chapter 8: Computer Networking. AIMS The aim of this chapter is to give a brief introduction to computer networking.

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

Topics: The Internet Network Edge Network Core Internet Backbone Loss & Delay Internet Protocol Stack CHAPTER 1: OVERVIEW OF COMPUTER NETWORKS

Transcription:

EECS 122: Introduction to Computer Networks Multiaccess Protocols Computer Science Division Department of Electrical Engineering and Computer Sciences University of California, Berkeley Berkeley, CA 94720-1776 ISO OSI Reference Model for Layers Application Presentation Session Transport Network Datalink Physical Service: - Framing (attach frame separators) - Send data frames between peers - Others: Arbitrate the access to common physical media Per-hop reliable transmission Per-hop flow control 2 1

Up Until Now... Short-term contention is lossless: - Main resource (link bandwidth) is controlled by router - Router deals with short-term contention by queueing packets - Usually, centralized algorithms to resolve contention Have focused on managing long-term contention - Queueing schemes (FQ, FIFO, RED, etc.) - End-to-end congestion control (TCP) 3 This Lecture Short-term contention for media yields losses! Focus on networking over shared media - Ethernet - Short-range radio (e.g., wireless LANs) - Long-range radio (e.g., packet radio, satellite) AKA multiple-access problem - Don t go through central router to get access to link - Instead, multiple users can access shared medium - Usually, decentralized algorithms to resolve contention 4 2

Approaches to Medium Access Channel partitioning - Divide channel into smaller pieces (e.g., time slots, frequency, code selection) - Allocate a piece to given node for exclusive use Random access - Allow collisions - Recover from collisions Taking-turns - Tightly coordinate shared access to avoid collisions 5 Problem Statement Managing shared media - If two users send at the same time, collision results in no packet being received (e.g., interference) - If no users send, channel goes idle - Thus, want to have only one user send at a time Achieve high network utilization - TDMA doesn t give high utilization But also use a simple distributed algorithm - No fancy token-passing schemes to avoid collisions 6 3

Focus of Lecture Understanding basic algorithmic choices Simple performance analysis Will not stress some practical details - Framing, packet formats, etc. 7 Where it all Started: AlohaNet Norm Abramson left Stanford in search of surfing Set up first radio-based data communication system connecting the Hawaiian islands - Hub at Alohanet HQ (Univ. Hawaii, Oahu) - Other sites spread among the islands Had two radio channels: - Random access: sites sent data on this channel - Broadcast: only used by hub to rebroadcast incoming data 8 4

Aloha Transmission Strategy When new data arrived at site, send to hub for transmission Site listened to broadcast channel - If it heard data repeated, knew transmission was rec d - If it didn t hear data correctly, it assumed a collision If collision, site waited random delay before retransmitting 9 Simple, but Radical in Concept! Aloha is to multiple access what Internet is to telephony, i.e., revolutionary! Previous attempts all partitioned channel - TDMA, FDMA, CDMA, etc. Aloha optimized the common case (few senders) and dealt with collisions through retries - Sound familiar? 10 5

Why Better than Time Slot Schemes? In TDMA, you have to wait your turn - Delay proportional to number of participating sites In Aloha, can send immediately Aloha gives much lower delays, at the price of lower utilization (as we will see) 11 Variation: Slotted Aloha Divide time into slots - Requires some way to synchronize geographically distributed sites (non-trivial problem!) Contend for transmission only at the beginning of slots, never in the middle of slots Effect is to decreases chance of partial collisions - Twice as efficient as un-slotted Aloha. Why? 12 6

Performance of Slotted Aloha Time is divided into equal size slots (packet transmission time) Node with new arriving packet: transmit at beginning of next slot If collision: retransmit packet in future slots with probability p, until successful. Success (S), Collision (C), Empty (E) slots 13 Efficiency of Slotted Aloha What is the maximum fraction of successful transmissions? Suppose N stations have packets to send - Each transmits in slot with probability p - Probability of successful transmission S is (very approximate analysis!): by a particular node i: S i = p (1-p) (N-1) by exactly one of N nodes S = Prob (only one transmits) = N p (1-p) (N-1) <= 1/e = 0.37 but must have p proportional to 1/N 14 7

Ethernet Bob Metcalfe, Xerox PARC, visits Hawaii and gets an idea! Shared medium (coax cable) Can sense carrier to see if other nodes are broadcasting at the same time - Sensing is subject to time-lag - Only detect those sending a short while before Monitor channel to detect collisions - Once sending, can tell if anyone else is sending too 15 CSMA and CSMA/CD Carrier sense multiple access: CSMA - Listen before you start sending CSMA with collision detect: CSMA/CD - Stop sending when you detect another station is sending 16 8

CSMA: Carrier Sense Multiple Access CS (Carrier Sense) implies that each node can distinguish between an idle and a busy link Sender operations: - If channel sensed idle: transmit entire packet - If channel sensed busy, defer transmission Various retry algorithms 17 Collisions can occur: propagation delay means two nodes may not hear each other s transmission CSMA collisions Collision: entire packet transmission time wasted Note: role of distance and propagation delay in determining collision probability 18 9

CSMA/CD (Collision Detection) Collisions detected within short time Colliding transmissions aborted, reducing channel wastage This is relatively easy in wired LANs: - Measure signal strengths - Compare transmitted, received signals Difficult in wireless LANs 19 CSMA/CD Collision Detection 20 10

Ethernet Frame Structure Sending adapter encapsulates IP datagram Preamble: - 7 bytes with pattern 10101010 followed by one byte with pattern 10101011 - Used to synchronize receiver, sender clock rates 21 Ethernet Frame Structure (more) Addresses: 6 bytes, frame is received by all adapters on a LAN and dropped if address does not match Type: 2 bytes, indicates the higher layer protocol - E.g., IP, Novell IPX, AppleTalk CRC: 4 bytes, checked at receiver, if error is detected, the frame is simply dropped Data payload: maximum 1500 bytes, minimum 46 bytes 22 11

Ethernet s CSMA/CD Sense channel, if idle - If detect another transmission Abort, send jam signal Delay, and try again - Else Send frame Receiver accepts: - Frames addressed to its own address - Frames addressed to the broadcast address (broadcast) - Frames addressed to a multicast address, if it was instructed to listen to that address - All frames (promiscuous mode) 23 Ethernet s CSMA/CD (more) Jam signal: make sure all other transmitters are aware of collision; 48 bits; Exponential back-off - Goal: adapt retransmission attempts to estimated current load - Heavy load: random wait will be longer - First collision: choose K from {0,1}; delay is K x 512 bit transmission times - After second collision: choose K from {0,1,2,3} - After ten or more collisions, choose K from {0,1,2,3,4,,1023} 24 12

Minimum Packet Size Why put a minimum packet size? Give a host enough time to detect collisions In Ethernet, minimum packet size = 64 bytes (two 6-byte addresses, 2-byte type, 4-byte CRC, and 46 bytes of data) If host has less than 46 bytes to send, the adaptor pads (adds) bytes to make it 46 bytes What is the relationship between minimum packet size and the length of the LAN? 25 Minimum Packet Size (more) a) Time = t; Host 1 starts to send frame Host 1 Host 2 propagation delay (d) b) Time = t + d; Host 2 starts to send a frame just before it hears from host 1 s frame Host 1 Host 2 propagation delay (d) c) Time = t + 2*d; Host 1 hears Host 2 s frame detects collision Host 1 Host 2 propagation delay (d) LAN length = (min_frame_size)*(light_speed)/(2*bandwidth) = = (8*64b)*(2.5*10 8 mps)/(2*10 7 bps) = 6400m approx What about 100 mbps? 1 gbps? 10 gbps? 26 13

Ethernet Technologies: 10Base2 10: 10Mbps; 2: under 200 meters max cable length Thin coaxial cable in a bus topology Repeaters used to connect up to multiple segments Repeater repeats bits it hears on one interface to its other interfaces: physical layer device only! 27 10BaseT and 100BaseT 10/100 Mbps rate; later called fast ethernet T stands for Twisted Pair Hub to which nodes are connected by twisted pair, thus star topology 28 14

10BaseT and 100BaseT (more) Max distance from node to Hub is 100 meters Hub can disconnect jabbering adapter Hub can gather monitoring information, statistics for display to LAN administrators Hubs still preserve one collision domain - Every packet is forwarded to all hosts Use bridges to address this problem - Bridges forward a packet only to the destination leading to the destination 29 GigaBit Ethernet Use standard Ethernet frame format Allows for point-to-point links and shared broadcast channels In shared mode, CSMA/CD is used; very short distances between nodes to be efficient Uses hubs, called here Buffered Distributors Full-Duplex at 1 Gbps for point-to-point links 30 15

Interconnecting LANs Why not just one big LAN? - Limited amount of supportable traffic: on single LAN, all stations must share bandwidth - Limited length - Large collision domain (can collide with many stations) 31 Family of Backoff Algorithms Use slotted transmission scheme - Carrier sense is irrelevant in slotted model When experience k th collision for a particular packet, send packet with probability 1/f(k) in each successive slot (until transmitted) Ethernet uses f(k)=2 k (with a bound on k) 32 16

WiFi (802.11) Designed for use in limited geographical area (i.e., couple of hundreds of meters) Designed for three physical media (run at either 1Mbps or 2 Mbps) - Two based on spread spectrum radio - One based on diffused infrared 33 Ethernet vs 802.11 Ethernet: one shared collision domain 802.11: radios have small range compared to overall system: collisions are local - Collisions are at receiver, not sender - Carrier-sense plays different role CSMA/CA not CSMA/CD - Collision avoidance, not collision detection 34 17

Collision Avoidance: The Problems Reachability is not transitive: if A can reach B, and B can reach C, it doesn t necessary mean that A can reach C A B C D Hidden nodes: A and C send a packet to B; neither A nor C will detect the collision! Exposed node: B sends a packet to A; C hears this and decides not to send a packet to D (despite the fact that this will not cause interference)! 35 Multiple Access with Collision Avoidance (MACA) sender RTS CTS data ACK receiver other node in sender s range Before every data transmission - Sender sends a Request to Send (RTS) frame containing the length of the transmission - Receiver respond with a Clear to Send (CTS) frame - Sender sends data - Receiver sends an ACK; now another sender can send data When sender doesn t get a CTS back, it assumes collision 36 18

Other Nodes When you hear a CTS, you keep quiet until scheduled transmission is over (hear ACK) If you hear RTS, but not CTS, you can send - Interfering at source but not at receiver is ok - Can cause problems when a CTS is interfered with 37 Summary Problem: arbitrate between multiple hosts sharing a common communication media Wired solution: Ethernet (use CSMA/CD) - Detect collisions - Backoff exponentially on collision Wireless solution: 802.11 (CSMA/CA) - Use MACA protocol - Cannot detect collisions; try to avoid them - Distribution system & frame format in discussion sections 38 19

What You Need to Know Basics of Aloha and Ethernet contention algorithms Basics of 802.11 contention algorithm 39 20