ECE 158A: Lecture 13. Fall 2015

Similar documents
Ethernet. EE 122: Intro to Communication Networks. Fall 2007 (WF 4-5:30 in Cory 277) Vern Paxson TAs: Lisa Fowler, Daniel Killebrew & Jorge Ortiz

Switching and Forwarding Reading: Chapter 3 1/30/14 1

Multiple Access and Spanning Tree

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

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

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

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

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

Goals of Today s Lecture. Adaptors Communicating

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

Review. Error Detection: CRC Multiple access protocols. LAN addresses and ARP Ethernet. Slotted ALOHA CSMA/CD

Link Layer and Ethernet

Reminder: Datalink Functions Computer Networking. Datalink Architectures

Principles behind data link layer services

Networking Technologies and Applications

L2 Addressing and data plane. Benjamin Baron

Link Layer and Ethernet

Addressing and Switching in the Link Layer

Professor Yashar Ganjali Department of Computer Science University of Toronto.

Networks and Distributed Systems. Sarah Diesburg Operating Systems CS 3430

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

Summary of MAC protocols

Medium Access Protocols

Data Link Layer -2- Network Access

Chapter 12 Multiple Access 12.1

Link Layer: Retransmissions

Principles behind data link layer services:

Principles behind data link layer services:

RMIT University. Data Communication and Net-Centric Computing COSC 1111/2061/1110. Lecture 8. Medium Access Control Methods & LAN

Links. CS125 - mylinks 1 1/22/14

Multiple Access Protocols

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

Data Link Layer -2- Network Access

CCM 4300 Lecture 5 Computer Networks, Wireless and Mobile Communications. Dr Shahedur Rahman. Room: T115

EITF25 Internet Techniques and Applications L4: Network Access. Stefan Höst

EE 122: Ethernet and

Random Access. 1. Aloha. 2. Slotted Aloha 3. CSMA 4. CSMA/CD

Announcements. Ethernet. Goals of Today s Lecture. Three Ways to Share the Media. Random Access Protocols. Key Ideas of Random Access

Communication Networks

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

Hubs. twisted pair. hub. 5: DataLink Layer 5-1

Page 1. CS162 Operating Systems and Systems Programming Lecture 22. Networking II. Multiple Access Algorithm

ECE 4450:427/527 - Computer Networks Spring 2017

COMP476 Networked Computer Systems. Polling. Sharing the Wire. LAN Technologies. COMP476 Networked Computer Systems 1

Medium Access Control

Your Future?! Links and LANs! Regrading of Homework! Other Announcements! Goals of Todayʼs Lecture! Link-Layer Services!

Chapter 5 Link Layer and LANs

Some portions courtesy Srini Seshan or David Wetherall

Medium Access Control. CSCI370 Lecture 5 Michael Hutt New York Institute of Technology

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

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

Multiple Access. Data Communications and Networking

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

Lecture 6: Example LAN: Ethernet

Lecture 8 The Data Link Layer part I. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

Link Layer. (continued)

ECE 4450:427/527 - Computer Networks Spring 2017

A primer on modern LANs

Redes de Computadores. Medium Access Control

Principles behind data link layer services:

Link Layer. (continued)

ECE453 Introduction to Computer Networks. Broadcast vs. PPP. Delay. Lecture 7 Multiple Access Control (I)

Chapter 4. The Medium Access Control Sublayer. Points and Questions to Consider. Multiple Access Protocols. The Channel Allocation Problem.

CSE 123: Computer Networks Alex C. Snoeren. HW 2 due Thursday 10/21!

CS 43: Computer Networks Switches and LANs. Kevin Webb Swarthmore College December 5, 2017

Lecture 9 The Data Link Layer part II. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

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

COS 140: Foundations of Computer Science

Project 3a is out! Goal: implement a basic network firewall. l We give you the VM & framework. l You implement the firewall logic.

Computer Networks. Medium Access Sublayer (Part I)

Outline: Connecting Many Computers

Link layer: introduction

CSCD 330 Network Programming Spring 2017

CSCD 433 Network Programming Fall Lecture 7 Ethernet and Wireless

LAN Overview (part 2) Interconnecting LANs - Hubs

Ethernet. Lecture 6. Outline. Ethernet - Physical Properties. Ethernet - Physical Properties. Ethernet

1-1. Switching Networks (Fall 2010) EE 586 Communication and. November 8, Lecture 30

CS610- Computer Network Solved Subjective From Midterm Papers

CSC 4900 Computer Networks: Link Layer (2)

CCM 4300 Lecture 6 Computer Networks, Wireless and Mobile Communications. Dr Shahedur Rahman. Room: T115

Lecture 4b. Local Area Networks and Bridges

CMPE 257: Wireless and Mobile Networking

CSMA/CD (Collision Detection)

Telematics I. Chapter 6 Internetworking. (Acknowledement: These slides have been compiled from H. Karl s set of slides)

CSEN 503 Introduction to Communication Networks. Mervat AbuElkheir Hana Medhat Ayman Dayf. **Slides are attributed to J. F. Kurose

Lecture 19. Principles behind data link layer services Framing Multiple access protocols

A B C D E Total / 24 / 23 / 12 / 18 / 3 / 80

CSE 123A Computer Networks

Lecture 9: Bridging & Switching"

Computer Networks. Randomized Multiple Access

Contention Protocols and Networks

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

CARRIER SENSE MULTIPLE ACCESS (CSMA):

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

ECE 4450:427/527 - Computer Networks Spring 2017

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

Lecture 12 December 04, Wireless Access. Graduate course in Communications Engineering. University of Rome La Sapienza. Rome, Italy

Protocols for Multiaccess Networks

Computer Networks Principles LAN - Ethernet

Transcription:

ECE 158A: Lecture 13 Fall 2015

Random Access and Ethernet!

Random Access! Basic idea: Exploit statistical multiplexing Do not avoid collisions, just recover from them When a node has packet to send Transmit at full channel data rate No a priori coordination among nodes Two or more transmitting nodes collision Random access MAC protocol specifies: How to detect collisions How to recover from collisions

Key Ideas of Random Access Carrier sense Listen before speaking, and don t interrupt Check if someone else is already sending data and wait till the other node is done Collision detection If someone else starts talking at the same time, stop Realize when two nodes are transmitting at once by detecting that the data on the wire is garbled Randomness Don t start talking again right away Wait for a random time before trying again

Aloha net (70 s) First random access network Setup by Norm Abramson at the University of Hawaii First data communication system for Hawaiian islands Hub at University of Hawaii, Oahu Alohanet had two radio channels: Random access: Sites sending data Broadcast: Hub rebroadcasting data

Aloha Signaling Two channels: random access, broadcast Sites send packets to hub (random) If received, hub sends ACK (random) If not received (collision), site resends Hub sends packets to all sites (broadcast) Sites can receive even if they are also sending Questions: When do you resend? Resend with probability p How does this perform? Will analyze in class, stay tuned.

Slot-by-slot Aloha Example Legend: C = collision E = empty slot S = success

Carrier Sense Multiple Access CSMA: Listen before transmit If channel sensed idle: transmit entire frame If channel sensed busy, defer transmission Human analogy: do not interrupt others Does this eliminate all collisions? No, because of nonzero propagation delay

CSMA/CD (Collision Detection) Collision detection easy in wired LANs: Compare transmitted, received signals Collision detection difficult in wireless LANs: Reception shut off while transmitting Even if on, might not be able to hear the other sender, even though the receiver can Leads to use of collision avoidance instead (WiFi)

Ethernet Multiple Access!

Ethernet Bob Metcalfe, Xerox PARC, visits Hawaii and gets an idea Shared wired medium coax cable

Ethernet: Typical Installation

CSMA/CD Protocol Carrier sense: wait for link to be idle Collision detection: listen while transmitting No collision: transmission is complete Collision: abort transmission Random access: binary exponential back-off After collision, wait a random time before trying again After mth collision, choose K randomly from {0,, 2^m-1} and wait for K*512 bit times before trying again Using min packet size as slot If transmission occurring when ready to send, wait until end of transmission (CSMA)

BEB: Theory vs Reality In reality, BEB performs well (far from optimal, but no one cares) Is mostly irrelevant Almost all current ethernets are switched

Shuttling Data at Different Layers! Different devices switch different things Physical layer: electrical signals (hubs) Link layer: frames (switches) broadcast all bits forward based on MAC addresses Network layer: packets (routers) forward based on IP headers Router! Switch! Hub! Frame Packet TCP header! header! header! User! data!

Physical Layer: Hubs Joins multiple input lines electrically Very similar to physical-layer repeaters, used to amplify signals that need to be transmitted over long distances A hub repeats each packet on all its ports hub hub hub

Limitations of Hubs One large collision domain Every bit is sent everywhere So, aggregate throughput is limited E.g., three departments each get 10 Mbps independently and then if connect via a hub must share 10 Mbps Cannot support multiple LAN technologies Repeaters/hubs do not buffer or interpret frames So, can t interconnect between different rates or formats E.g., no mixing 10 Mbps Ethernet & 100 Mbps Ethernet Limitations on maximum nodes and distances E.g., still cannot go beyond 2500 meters on Ethernet

Link Layer: Switches Connect two or more LANs at the link layer Extracts destination address from the frame Looks up the destination in a table Forwards the frame to the appropriate port Each segment is its own collision domain (if not just a link) switch collision domain hub collision domain

Switched Ethernet If host has (dedicated) point-to-point link to switch: Full duplex: each connection can send in both directions Completely avoids collisions No need for carrier sense, collision detection For example: Host A can talk to C, while B talks to D B! A! C! switch D!

Advantages over Hubs Only forwards frames as needed Filters frames to avoid unnecessary load on segments Sends frames only to segments that need to see them Extends the geographic span of the network Separate collision domains allow longer distances Improves privacy by limiting scope of frames Hosts can snoop the traffic traversing their segment but not all the rest of the traffic Applies CSMA/CD in segment (not whole net) Smaller collision domain Joins segments using different technologies

Disadvantages over Hubs Higher cost More complicated devices that cost more money Delay in forwarding frames Switch must receive and parse the frame and perform a look-up to decide where to forward Introduces store-and-forward delay Need to learn where to forward frames Switch needs to construct a forwarding table Ideally, without intervention from network administrators Solution: self-learning

Self Learning: Building the Table Switch Table: Map between MAC address and swtich interfaces When a frame arrives Inspect source MAC address Associate address with the incoming interface Store mapping in a switch table Switch just learned how to reach A.! B! A! C! D!

Self Learning: Handling Misses When frame arrives with unfamiliar destination Forward the frame out all of the interfaces ( flooding ) except for the one where the frame arrived Hopefully, this case won t happen very often When destination replies, switch learns that node, too When in doubt, shout!! B! A! C! D!

Flooding Can Lead to Loops Switches sometimes need to broadcast frames Upon receiving a frame with an unfamiliar destination Upon receiving a frame sent to the broadcast address Implemented by flooding Flooding can lead to forwarding loops E.g., if the network contains a cycle of switches Either accidentally, or by design for higher reliability

Solution: Spanning Trees Avoid using some of the links when flooding Ensure the forwarding topology has no loops Switches run a spanning tree protocol Form a sub-graph that covers all vertices but contains no cycles Links not in the spanning tree do not forward frames Graph Has Cycles! Graph Has No Cycles

Spanning Tree Protocol Switches need to Select a root, e.g., the switch with the smallest identifier (MAC addr) Determine if an interface is on the shortest path from the root. If not, exclude it from the tree if not root! One hop! Three hops!

Spanning Tree Protocol Switches exchange messages with information (myid, CurrentRootID, DistanceToCurrentRoot) myid: ID (MAC address) of the switch CurrentRootID: ID of the proposed root DistanceToCurrentRoot: Distance from the switch to the proposed root A switch only relays messages whose CurrentRootID is the smallest the switch has seen so far Before forwarding the message, the DistanceToCurrentRoot is increased by 1

Steps in Spanning Tree Algorithm! Initially, each switch proposes itself as the root Switch sends a message out every interface proposing its ID as CurrentRootID and distance 0 Switches update their view of the root Upon receiving a message, check CurrentRootID If that is smaller the switch has seen so far, start viewing that switch as root Switches compute their distance from the root Add 1 to the distance received from a neighbor Identify interfaces not on shortest path to the root and exclude them from the spanning tree If root or shortest distance to it changed, flood an updated message

Example From Switch #4 s Viewpoint! Switch #4 thinks it is the root Sends (4, 4, 0) message to 2 and 7 Then, switch #4 hears from #2 Receives (2, 2, 0) message from 2 1! and thinks that #2 is the root And realizes it is just one hop away 3! 5! Then, switch #4 hears from #7 Receives (7, 2, 1) from 7 And realizes this is a longer path So, prefers its own one-hop path 4! 7! 2! 6! And removes 4-7 link from the tree

Example From Switch #4 s Viewpoint! Switch #2 hears about switch #1 Switch 2 hears (3, 1, 1) from 3 Switch 2 starts treating 1 as root And sends (2, 1, 2) to neighbors Switch #4 hears from switch #2 1! Switch 4 starts treating 1 as root And sends (4, 1, 3) to neighbors Switch #4 hears from switch #7 Switch 4 receives (7, 1, 3) from 7 And realizes this is a longer path So, prefers its own three-hop path And removes 4-7 Iink from the tree 4! 3! 7! 2! 5! 6!

Summary Ethernet as an exemplar of link-layer technology Simplest form, single segment: Carrier sense, collision detection, and random access Extended to span multiple segments: Hubs: physical-layer interconnects Switches: link-layer interconnects Key ideas in switches Self learning of the switch table Spanning trees