Sharing Channels CS 118

Similar documents
Reminder: Datalink Functions Computer Networking. Datalink Architectures

Medium Access Control. IEEE , Token Rings. CSMA/CD in WLANs? Ethernet MAC Algorithm. MACA Solution for Hidden Terminal Problem

IEEE , Token Rings. 10/11/06 CS/ECE UIUC, Fall

Outline: Connecting Many Computers

Links Reading: Chapter 2. Goals of Todayʼs Lecture. Message, Segment, Packet, and Frame

CSE 461: Multiple Access Networks. This Lecture

High Level View. EE 122: Ethernet and Random Access protocols. Medium Access Protocols

CSE 461: Wireless Networks

CHAPTER 7 MAC LAYER PROTOCOLS. Dr. Bhargavi Goswami Associate Professor & Head Department of Computer Science Garden City College

Local Area Networks (LANs): Packets, Frames and Technologies Gail Hopkins. Part 3: Packet Switching and. Network Technologies.

Frames, Packets and Topologies

Direct Link Communication II: Wired Media. Multi-Access Communication

Media Access Control. Networked Systems (H) Lecture 5

EE 122: Ethernet and

The MAC Address Format

Link Layer and Ethernet

Link Layer and Ethernet

ECE 158A: Lecture 13. Fall 2015

Contention Protocols and Networks

Getting Connected (Chapter 2 Part 4) Networking CS 3470, Section 1 Sarah Diesburg

CS 43: Computer Networks. 27: Media Access Contd. December 3, 2018

STEVEN R. BAGLEY PACKETS

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

Computer Networking Lecture 5 Data link Layer Access Control. Based on slides by Peter Steenkiste Copyright, Carnegie Mellon

Lecture 5 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Medium Access Protocols

Lecture 6. Data Link Layer (cont d) Data Link Layer 1-1

Summary of MAC protocols

Network Layering CS 118

Wireless MACs: MACAW/802.11

15-441: Computer Networking. Wireless Networking

Strengthening Unlicensed Band Wireless Backhaul

Computer Networks. Today. Principles of datalink layer services Multiple access links Adresavimas, ARP LANs Wireless LANs VU MIF CS 1/48 2/48

Wireless Challenges : Computer Networking. Overview. Routing to Mobile Nodes. Lecture 25: Wireless Networking

ECE 4450:427/527 - Computer Networks Spring 2017

19: Networking. Networking Hardware. Mark Handley

Link Layer. (continued)

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

Lecture 6 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Links. CS125 - mylinks 1 1/22/14

Chapter 12 Multiple Access 12.1

Direct Link Communication II: Wired Media. Multi-Access Communication

Network Security Fundamentals. Network Security Fundamentals. Roadmap. Security Training Course. Module 2 Network Fundamentals

Review of Topology and Access Techniques / Switching Concepts

Goals. Fundamentals of Network Media. More topics. Topics. Multiple access communication. Multiple access solutions

Hands-On Network Security: Practical Tools & Methods

Data Link Layer: Overview, operations

The Link Layer and LANs. Chapter 6: Link layer and LANs

CCNA Exploration1 Chapter 7: OSI Data Link Layer

Ethernet Switches (more)

Chapter 5 Link Layer and LANs

COS 140: Foundations of Computer Science

Chapter 8 LAN Topologies

LECTURE PLAN. Script. Introduction about MAC Types o ALOHA o CSMA o CSMA/CD o CSMA/CA

Real-Time (Paradigms) (47)

CS 43: Computer Networks Media Access. Kevin Webb Swarthmore College November 30, 2017

Introduction to Wireless Networking ECE 401WN Spring 2008

CS 716: Introduction to communication networks. - 9 th class; 19 th Aug Instructor: Sridhar Iyer IIT Bombay

Final Review Fall 2017 Profs Peter Steenkiste & Justine Sherry

Homework 1. Question 1 - Layering. CSCI 1680 Computer Networks Fonseca

Data Link Layer, Part 3 Medium Access Control. Preface

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 19: Networks and Distributed Systems

COS 140: Foundations of Computer Science

Interface The exit interface a packet will take when destined for a specific network.

CSE/EE 461 Wireless and Contention-Free Protocols

CS 455/555 Intro to Networks and Communications. Link Layer

Lecture 9: Bridging. CSE 123: Computer Networks Alex C. Snoeren

Message, Segment, Packet, and Frame Link-layer services Encoding, framing, error detection, transmission control Error correction and flow control

CMPE 257: Wireless and Mobile Networking

Media Access Control (MAC) Sub-layer and Ethernet

CS 3640: Introduction to Networks and Their Applications

CS 716: Introduction to communication networks. - 8 th class; 17 th Aug Instructor: Sridhar Iyer IIT Bombay

Networking Technologies and Applications

ICE 1332/0715 Mobile Computing (Summer, 2008)

Outline. Introduction to Networked Embedded Systems - Embedded systems Networked embedded systems Embedded Internet - Network properties

The Link Layer II: Ethernet

CARRIER SENSE MULTIPLE ACCESS (CSMA):

Redes de Computadores. Medium Access Control

Link Layer: Retransmissions

Data Link Layer, Part 5. Medium Access Control

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 20: Networks and Distributed Systems

Part 5: Link Layer Technologies. CSE 3461: Introduction to Computer Networking Reading: Chapter 5, Kurose and Ross

Outline. Lecture 16: Wireless Networking. Physical Layer (Layer 1) Ethernet: Wireless is Different. Attenuation Over Space

ECSE 414 Fall 2014 Final Exam Solutions

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 16

Jaringan Komputer. Broadcast Network. Outline. MAC (Medium Access Control) Channel Allocation Problem. Dynamic Channel Allocation

Goal and Outline. Computer Networking. What Do We Need? Today s Story Lecture 3: Packet Switched Networks Peter Steenkiste

Medium Access Control

OSI Data Link Layer. Network Fundamentals Chapter 7. Version Cisco Systems, Inc. All rights reserved. Cisco Public 1

Local Area Networks (LANs) SMU CSE 5344 /

CSE 461: Multiple Access. Homework: Chapter 2, problems 1, 8, 12, 18, 23, 24, 35, 43, 46, and 58

Internetworking Part 1

Data Link Layer. Our goals: understand principles behind data link layer services: instantiation and implementation of various link layer technologies

Multiple Access Links and Protocols

Lecture 16: QoS and "

Hubs, Bridges, and Switches (oh my) Hubs

Random Assignment Protocols

Data and Computer Communications. Chapter 11 Local Area Network

Introduction to Internetworking

Some portions courtesy Srini Seshan or David Wetherall

Transcription:

Sharing Channels Computer Network Fundamentals Peter Reiher Page 1

Outline Carrier sense channel sharing Naming?? Page 2

Sending without a master 1. Message to send 2. Listen for quiet 3. Send message 4. Did you hear it? Yes DONE No resend (goto #3) Page 3

CSMA (IEEE 802.3) An implementation of this idea Carrier-sense multiple access (1974) Carrier = channel idle Listen before talking Page 4

CSMA behavior I don t hear anything! 1 2 3 4 5 6 7 2 Page 5

CSMA and persistence OK, so I listen to the channel What if it s busy? Well, I certainly don t send now My message would interfere with what I hear But do I keep listening? Persistent CSMA listens till channel is free Non-persistent CSMA stops listening and checks again later After some random interval Page 6

I don t hear I hear a anything! message! CSMA behavior 1 2 3 4 5 6 7 3 Node 1 wants to send a message to node 3 Node 1 listens to the medium It happens again But in the middle, node 2 wants to send a message to node 6 Node 2 listens to the medium Node 2 doesn t send Page 7

What about node 2 s message? 1 2 3 4 5 6 7 3 6 Node 2 wants to send a message to node 6 Node 2 listens to the medium Node 2 doesn t send Now node 2 can send his message Page 8

CSMA and collisions CSMA involves sharing a channel Multiple senders can all put messages on the same channel No master, no advanced reservations So more than one sender can try to use the channel at once When that happens, their messages collide Which corrupts both messages, making them useless (for most purposes) Page 9

Collisions can happen 1 2 3 4 5 6 7 6 2 Let s say 1 wants to send to 6 He listens and hears nothing And 7 wants to send to 2, at about the same time He listens and hears nothing So they both send Both messages are destroyed Page 10

CSMA variants CSMA/CD Carrier Sense Multiple Access/Collision Detection Essentially, listen to determine if the channel is in use and send if it isn t Continue listening to detect if collisions occur CSMA/CA Carrier Sense Multiple Access/Collision Avoidance Essentially, listen longer to determine if the channel is in use and send if it isn t Page 11

CSMA/CA- I m Not Listening! CSMA/CA listens before sending But some versions don t listen during sending So they don t detect collisions by listening So what do they do? Page 12

Why not listen? Not practical for some wireless channels Need to send and listen at the same time Sometimes expensive to build equipment that does both well simultaneously The hidden terminal problem We ll get to that a little later Page 13

Acknowledgements One way to detect collisions without listening during send Receiver instantly acknowledges received message on channel Using the channel, of course Acknowledgements are short But do take up channel space Possibly leading to collisions themselves Page 14

A note about CSMA Benefits: CA avoids always colliding after idle if multiple parties want to send Non-persistent, like CA, helps avoid collisions but also avoids work during busy period (spin-lock) CD reduces the impact of a collision These are NOT mutually exclusive Though we usually talk about CSMA/CD or /CA There are other optimizations Page 15

Ensuring channel capture Start sending data Data can collide in unpredictable ways Someone else might have just started to send, but it hasn t gotten to us yet Message might be very short how long do we wait to check to see if it worked? Solution: preamble Floods the channel before sending message Also enables frame sync Page 16

Flooding the Channel Put an unimportant signal onto the (apparently idle) channel The preamble Keep it there until you re sure that no one else is sending Implying long enough for you to hear everyone else who might be flooding And for them to hear you If preamble is trashed, someone else is sending too Page 17

More on flooding Don t start sending until you know you have the whole channel If you can send a round-trip bit with no collision, then the channel is yours At higher speeds, a given preamble is shorter So the round-trip distance protected is less Min preamble Must flood round-trip Distance Min preamble Must flood round-trip Distance Page 18

Limitations of no-master sharing Channel length Protocol overhead Capture effect Need for a single, shared channel Page 19

Preamble vs. channel length Preamble 7 bytes = 56 bits Maximum shared link size @3 Mbps = 1866 m @10 Mbps = 560 m (set to 500 m) @100 Mbps = 56 m @1 Gbps = 5.6 m Page 20

Protocol overhead Converse of channel length limit Faster symbol rate = longer preamble Longer preamble = higher overhead Page 21

Backoff What do you do if your packet is trashed when someone else also sends? Try again But not right away Wait some period of time before re-sending That s backoff Commonly used in many non-master channel sharing schemes Page 22

Capture effect Collision backoff is not fair (known in 1994) Ethernet backoff picks a random value in a range that increases with each failure A & B collide Both pick from the small initial interval A wins and transmits A & B collide A now picks from the small initial interval B picks from a larger, second-try interval A usually wins (repeatedly) A is rewarded by having its interval reset whenever it wins Page 23

Single, shared channel limit Signal power Protocol Topology Hidden terminal Page 24

Signal power Distance Power absorption (except for a vacuum) Most beams spread out Number of receivers Power needs to increase for everyone to get some of the signal Result: effective distance limit Page 25

Protocol effects Sharing can be inefficient Collisions = no transfer Page 26

Protocol variations Slight variations can have large effect Page 27

Protocol effect implications Channel negotiation takes time During which you might lose what you send And you can t know until you try Result: strict distance limit, efficiency limit Page 28

Topology A single channel can be hard to deploy RF doesn t go around corners Wire doesn t go where you want Page 29

The hidden terminal problem Incomplete sharing Not all nodes reach all others CSMA no longer works A and C won t know their transmissions collide Acknowledgements can help Page 30

Naming implications for shared medium Sharing is sharing Same rules about uniqueness of names In 1:N, only destination name must be unique In N:1, only source name must be unique In N:N (with no other info), source/destination pair must be unique And there could be N 2 pairs How do we achieve uniqueness? A priori coordination Page 31

The cost of naming Worst case: N 2 names Costly to add one more party Does not scale! Simpler cases: N names Adding one party adds at most one name One more receiver in 1:N One more sender in N:1 Need to be sure chosen names are unique Scales well Page 32

Shared media naming techniques Central authority Two-level delegation First three assigned per-organization (OUI) Rest assigned locally IEEE 802.* addresses are 48 bits (6 bytes) IEEE also assigns 64 bit addresses ATM NSAP Multi-level hierarchy, starting at ITU, including IANA IPv4 addresses Multi-level delegation, starting at IANA Self-assignment IPv6 local part is self-assigned, then check for duplicates ( roll again! = Duplicate Address Detection /DAD) Page 33

Other names Name for everyone Enables native (one-step) broadcast Often all 1 s Name for a group Enables native (one-step) multicast Name for I don t have an address yet Often all 0 s (for another day) Page 34

More switching Recall: Switching emulates sharing What makes it useful? Simper wiring (direct to closet) Independence Enhanced coordination Page 35

Simpler wiring First step: everyone on a bus A B C D E Limited by the bus path Page 36

Simpler wiring 2 Second step: delegate to a shorter bus A B C D E Move per-node smarts together E.g.: Ethernet MAU Page 37

Simpler wiring 3 Third step: box it up! A B C D E Simpler to manage and operate Page 38

A note about MAC protocols Media access control Just a name Protocol to control shared access NOT NEEDED without shared access! Page 39

Simpler wiring 4 Final step: who cares what s in the box? There are many ways to build N:N exchanges A B C D E What else changed? Page 40

Non-sharing protocol! We can turn channel sharing A sharing protocol Into central switching A 2-party protocol to the switch A non-sharing protocol A B C D E A B C D E NOTE THIS! Page 41

Benefits of independence Add/remove nodes without affecting others No need to shift wires Dead (or mostly-dead) node can t contaminate the network Page 42

Enhanced coordination What can a switch see? Everything at once, quickly (shorter channel) What can a switch do? Coordinate! (takeover role of master) Enforce long-term fairness, avoid starvation Page 43

So what s a switch really? A way to emulate a shared link Without the physical constraints Page 44

Switch examples Ethernet Emulates an RF channel SONET Emulates a wire ATM Emulates a phone wire (in particular) Not all of these emulate sharing! Page 45

How do switches work? Shared media An internal star coupler, bus, or memory A control algorithm to share the in/out links Usually TDMA on the in/out links A bunch of relays Page 46

Goal: scalable communication Number of channels for N nodes Maximum distance between two nodes 2-party channels (direct point-to-point) Limited by direct signal Can we do better? Page 47

Goal: scalable communication Number of channels for N nodes Maximum distance between two nodes 2-party channels (direct point-to-point) Limited by direct signal Shared media (shared mulbparty) Limited by signal sharing and MAC protocol Good for small groups what about large? Page 48

Sharing and relaying Emulate full connectivity Networking to enable communication Reduce connection cost Sharing can be expensive or limiting Page 49

Sharing vs. relaying Sharing Increases endpoint work Simple topology Efficient small scale Poor number scaling Poor size scaling Relaying Spreads the work Allows complex topologies Efficient at large scales Good number scaling Good size scaling If designed well Page 50

Relaying to the rescue! Communicate through a third party A to B, B to C = A to C Transitive closure Page 51

How does relaying help? Page 52

How can we relay? #1 2-party channels Media for action at a distance Telephone lines originally direct copper pairs Relay using actual switches Switch selects alternate direct copper paths Continuous path is called a circuit Page 53

The good, the bad, and Good news Relaying can reduce the number of links Bad news This kind of relaying limits how many pairs can communicate at once Page 54

Circuits a sure thing Trains on a track Scheduled in advance Allocated whether in use or not Resources locked along entire path Path is fixed Guarantees no competing traffic Fixed delay, fixed jitter, fixed capacity Can t share resources concurrently Page 55

Circuit movie transfer One long, continuous path No need to reformat the movie Lossless, in-order delivery X X Along a single, static path That blocks everything else until you re done Page 56

Circuits pros Guaranteed service Fixed capacity Fixed delay Advance knowledge Properties known in advance Advance reservation (if use-bounded) Efficiency within a single stream No overhead for processing, labels, etc. The circuit is the label (no names after setup) Page 57

Circuits cons Fairness on a per-circuit basis Per reservation At the time of reservation At the time of use Path blocking Resources blocked (even if not actively used) Capacity limited Min. of per-hop capacity of a single path Page 58

How can we relay? #2 Packets to the rescue TDMA relaying Allows circuits to be shared Avoids blocking of cross-traffic Packet coined in 1968 (Donald Davies) Page 59

Baran s study Compared central and distributed nets Divide messages into blocks (packets) Page 60

Baran s insight Page 61

Packet example Cars on a highway No need to schedule Resource used only during transit Path can vary, even given identical headers Focuses on sharing Aggregate, concurrent resource use Results in variable delay, variable jitter, variable capacity, and potential for loss Each car is independent, so these variations not too important Page 62

Packet movie transfer Fragmentation Split into chunks, label for reordering Reassembly Gather and restore the stream Sharing Concurrent transfers supported But there are relationships between the packets... Page 63

Packets pros Sharing Stat-Mux (statistical multiplexing) gain (2x-10x) Fair over shorter time-scales More dynamic and agile Avoids path blocking Brief uses share better and complete faster Allows multipath Concurrent use of multiple paths Can increase capacity for a given transfer Allows dynamic path variation Can route around outages, delays Page 64

Packets cons More work Pack/unpack Compute checksums Manage reordering, loss Capacity overhead Addressing to guide the chunks Demultiplexing fields allowing sharing Signaling fields to help undo chunking effects Storage required Buffering to accommodate reordering, loss Page 65

Circuits vs. Packets When circuits win: Data patterns are mostly predictable Sharing isn t important Service guarantees are important Data length is long (path setup is worth the benefit) When packets win: Data patterns are unpredictable Sharing is important Guarantees are more flexible Data length is short (relative to path setup cost) Page 66

Goal: scalable communication Number of channels for N nodes Maximum distance between two nodes 2-party channels (direct point-to-point) Limited by direct signal Shared media (shared mulbparty) Limited by signal sharing and MAC protocol Relaying Unlimited Sounds too good to be true Page 67

Summary We can share a channel without a master If parties can all listen to what s going on We can overcome some drawbacks of channel sharing by relaying Sending data over multiple separate channels connected together Relaying can be done via circuit switching or packet switching Page 68