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

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

ECE 158A: Lecture 13. Fall 2015

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

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

Adaptors Communicating. Link Layer: Introduction. Parity Checking. Error Detection. Multiple Access Links and Protocols

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

Adaptors Communicating. Link Layer: Introduction. Parity Checking. Error Detection. Multiple Access Links and Protocols

Communication Networks

Links. Error Detection. Link Layer. Multiple access protocols. Nodes Links Frame. Shared channel Problem: collisions How nodes share a channel

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

Goals of Today s Lecture. Adaptors Communicating

Multiple Access and Spanning Tree

TCP Service Model. Announcements. TCP: Reliable, In-Order Delivery. Today s Lecture. TCP Support for Reliable Delivery. TCP Header

L2 Addressing and data plane. Benjamin Baron

Professor Yashar Ganjali Department of Computer Science University of Toronto.

Lecture 6: Bridging & Switching. Last time. Today. CSE 123: Computer Networks Chris Kanich. How do multiple hosts share a single channel?

Announcements. CS 5565 Network Architecture and Protocols. Ethernet. Ethernet. Ethernet Model. Ideal Multiple Access Protocol

Medium Access Protocols

Computer Networks Principles LAN - Ethernet

Links. CS125 - mylinks 1 1/22/14

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

The Link Layer and LANs: Ethernet and Swiches

Principles behind data link layer services

Chapter 5: The Data Link Layer. Chapter 5 Link Layer and LANs. Ethernet. Link Layer. Star topology. Ethernet Frame Structure.

A primer on modern LANs

Announcements. IP Forwarding & Transport Protocols. Goals of Today s Lecture. Are 32-bit Addresses Enough? Summary of IP Addressing.

EE 122: Ethernet and

Summary of MAC protocols

CSE/EE 461 Lecture 7 Bridging LANs. Last Two Times. This Time -- Switching (a.k.a. Bridging)

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

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

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

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

Broadcast Links, Addressing and Media Access Control. Link Layer B. Link and Physical Layers. MAC Addresses

Growth. Individual departments in a university buy LANs for their own machines and eventually want to interconnect with other campus LANs.

Computer Networks Principles LAN - Ethernet

Principles behind data link layer services:

Principles behind data link layer services:

Networking Acronym Smorgasbord: , DVMRP, CBT, WFQ

Some portions courtesy Srini Seshan or David Wetherall

Chapter 5 Link Layer and LANs

Goals for Today s Class. EE 122: Networks & Protocols. What Global (non-digital) Communication Network Do You Use Every Day?

EE 122: Introduction To Communication Networks. Some Questions & Answers

Reminder: Datalink Functions Computer Networking. Datalink Architectures

Addressing and Switching in the Link Layer

Distributed Algorithms in Networks EECS 122: Lecture 17

CSC 4900 Computer Networks: Link Layer (2)

Lecture 9: Bridging & Switching"

Research paper Measured Capacity of an Ethernet: Myths and Reality

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

Chapter 3 Part 2 Switching and Bridging. Networking CS 3470, Section 1

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

Link Layer: Introduction. Chapter 5 Link Layer & LANS. Link layer: context. Link Layer Services

Link layer: introduction

Link Layer and Ethernet

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

Links Reading: Chapter 2

CSC 4900 Computer Networks: The Link Layer

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

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

Name Student ID Department/Year. Final Examination. Introduction to Computer Networks Class#: Fall :50-11:30 Tuesday January 10, 2006

The Basics of Wireless Communication Octav Chipara

CSE 123A Computer Networks

ECSE 414 Fall 2014 Final Exam Solutions

Lecture 4b. Local Area Networks and Bridges

ECE 4450:427/527 - Computer Networks Spring 2017

Link Layer and Ethernet

Data Link Layer: Multi Access Protocols

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Underlying Technologies -Continued-

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

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

Switching and Forwarding

LAN Overview (part 2) Interconnecting LANs - Hubs

Topics. Link Layer Services (more) Link Layer Services LECTURE 5 MULTIPLE ACCESS AND LOCAL AREA NETWORKS. flow control: error detection:

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

What is Routing? EE 122: Shortest Path Routing. Example. Internet Routing. Ion Stoica TAs: Junda Liu, DK Moon, David Zats

ECE 4450:427/527 - Computer Networks Spring 2017

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

This Lecture. BUS Computer Facilities Network Management. Information Sharing. Local Area Network

Links. COS 461: Computer Networks Spring Mike Freedman h?p://

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

Chapter 5 Link Layer and LANs

More Routing. EE122 Fall 2012 Scott Shenker

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

CS 123: Lecture 12, LANs, and Ethernet. George Varghese. October 24, 2006

Master Course Computer Networks IN2097

What Global (non-digital) Communication Network Do You Use Every Day?"

The Link Layer II: Ethernet

Missing Pieces of the Puzzle

Link Layer: Introduction. Chapter 5 Link Layer & LANS. Link layer: context. Link Layer Services

THE OSI MODEL. Application Presentation Session Transport Network Data-Link Physical. OSI Model. Chapter 1 Review.

Chapter 5 Link Layer and LANs

CS 455/555 Intro to Networks and Communications. Link Layer Addressing, Ethernet, and a Day in the Life of a Web Request

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

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

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

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

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

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

Transcription:

Ethernet EE 1: Intro to ommunication Networks Fall 00 (WF -:0 in ory ) Vern Paxson Ts: Lisa Fowler, aniel Killebrew & Jorge Ortiz http://inst.eecs.berkeley.edu/~ee1/ nnouncements Solutions for Homework #1 are now out. Pick up your graded homeworks in Section, or swing by Jorge s office hours Phase of Project #1 is now out. No lecture next Wednesday, Oct 10 nd I won t have office hours that day Midterm Friday Oct 1 losed book, no gadgets You can have one 8.x11 sheet of notes (both sides) I will have extra office hours that day, 1-:0 nd by appointment on Monday Oct 8 Materials with thanks to Jennifer Rexford, Ion Stoica, and colleagues at Princeton and U erkeley 1 Goals of Today s Lecture M (Media ccess ontrol) protocols, esp. SM/ o arrier Sense Multiple ccess / ollision etection Ethernet: single segment Frame structure Length/timing constraints due to ollision etection Ethernet: spanning multiple segments Repeaters and s ridges and switches Self-learning (plug-and-play) Spanning trees (time permitting) Three Ways to Share the Media hannel partitioning M protocols (TM, FM): Share channel efficiently and fairly at high load Inefficient at low load (where load = # senders): o 1/N bandwidth allocated even if only 1 active node! Taking turns protocols (discussed in Section) Eliminates empty slots without causing collisions Overhead in acquiring the token Vulnerable to failures (e.g., failed node or lost token) Random access M protocols Efficient at low load: single node can fully utilize channel High load: collision overhead Key Ideas of Random ccess arrier sense Listen before speaking, and don t interrupt hecking if someone else is already sending data and waiting till the other node is done ollision detection If someone else starts talking at the same time, stop Realizing when two nodes are transmitting at once by detecting that the data on the wire is garbled Randomness on t start talking again right away Waiting for a random time before trying again Random ccess Protocols When node has packet to send Transmit at full channel data rate No a priori coordination among nodes Two or more transmitting nodes collision ata lost Random access M protocol specifies (1) how to detect collisions, () how to recover from collisions Examples LOH and Slotted LOH (discussed in Section) SM, SM/ (Ethernet), SM/ (wireless) o SM = arrier Sense Multiple ccess 1

SM ollisions ollisions can still occur: propagation delay means two nodes may not hear each other s transmission in time. t time t 1, still hasn t heard s signal sent at the earlier time t 0, so goes ahead and transmits: failure of carrier sense. ollision: entire packet transmission time wasted SM/ (ollision etection) SM/: carrier sensing, deferral as in SM ollisions detected within short time olliding transmissions aborted, reducing wastage ollision detection Easy in wired LNs: measure signal strengths, compare transmitted, received signals ifficult in wireless LNs o Reception shut off while transmitting o Even if on, might not be able to hear the other sender, even though the receiver can o Leads to use of collision avoidance instead 8 SM/ ollision etection Limits on SM/ Network Length oth and can tell that collision occurred. latency d This lets them (1) know that they need to resend the frame, and () recognize that there s contention and adopt a strategy for dealing with it. Note: for this to work, we need restrictions on minimum frame size and maximum distance 9 Latency depends on physical length of link Time to propagate a packet from one end to the other Suppose sends a packet at time t nd sees an idle line at a time just before t+d so happily starts transmitting a packet detects a collision, and sends jamming signal ut can t see collision until t+d 10 Limits on SM/ Network Length Ethernet: SM/ Protocol latency d needs to wait for time d to detect collision So, should keep transmitting during this period and keep an eye out for a possible collision Imposes restrictions. E.g., for 10 Mbps Ethernet: Maximum length of the wire:,00 meters Minimum length of a frame: 1 bits ( bytes) o 1 bits = 1. µsec (at 10 Mbit/sec) o For light in vacuum, 1. µsec 1,000 meters vs.,000 meters round trip to wait for collision 11 arrier sense: wait for link to be idle ollision detection: listen while transmitting No collision: transmission is complete ollision: abort transmission & send jam signal Random access: exponential back-off fter collision, wait a random time before trying again fter m th collision, choose K randomly from {0,, m -1} and wait for K*1 bit times before trying again The wired LN technology Hugely successful: /10/100/1000/10000 Mbps 1

Ethernet Frame Structure Sending adapter encapsulates packet in frame Preamble: synchronization Seven bytes with pattern 10101010, followed by one byte with pattern 10101011 Used to synchronize receiver & sender Type: indicates the higher layer protocol Usually IP (but also Novell IPX, ppletalk, ) R: cyclic redundancy check Receiver checks & simply drops frames with errors 1 Ethernet Frame Structure (ontinued) ddresses: 8-bit source and destination M addresses Receiver s adaptor passes frame to network-level protocol o If destination address matches the adaptor s o Or the destination address is the broadcast address (ff:ff:ff:ff:ff:ff) o Or the destination address is a multicast group receiver belongs to o Or the adaptor is in promiscuous mode ddresses are globally unique o ssigned by NI vendors (top three octets specify vendor) uring any given week, > 00 vendor codes seen at LNL ata: Maximum: 1,00 bytes Minimum: bytes (+1 bytes header + byte trailer = 1 bits) 1 Ethernet, con t onnectionless No handshaking between sending and receiving adapter Unreliable Receiving adapter doesn t send Ks or NKs Packets passed to network layer can have gaps Gaps will be filled if application is using TP Otherwise, application will see the gaps,00 page IEEE 80. standardization http://standards.ieee.org/getieee80/80..html Note, classical Ethernet has no length field instead, sender pauses 9. µsec when done 80. shoehorns in a length field 1 enefits of Ethernet Easy to administer and maintain Inexpensive Increasingly higher speed Evolved from shared media to switches nd from electrical signaling to also optical hanges everything except the frame format good general lesson for evolving the Internet: o The right interface (service model) can often accommodate unanticipated changes 1 Shuttling ata at ifferent Layers ifferent devices switch different things Physical layer: electrical signals (repeaters and s) Link layer: frames (bridges and switches) Network layer: packets (routers) pplication gateway Transport gateway Router Frame header Packet header TP header User data Physical Layer: Repeaters istance limitation in local-area networks Electrical signal becomes weaker as it travels Imposes a limit on the length of a LN o In addition to limit imposed by collision detection Repeaters join LNs together nalog electronic device ontinuously monitors electrical signals on each LN Transmits an amplified copy ridge, switch Repeater, 1 Repeater 18

Physical Layer: Hubs Limitations of Repeaters and Hubs Joins multiple input lines electrically o not necessarily amplify the signal Very similar to repeaters lso operates at the physical layer 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 must share 10 Mbps 19 annot support multiple LN technologies Repeaters/s 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 oes not circumvent limitations of shared media E.g., still cannot go beyond 00 meters on Ethernet 0 Link Layer: Switches / ridges Minute reak onnect two or more LNs at the link layer Extracts destination address from the frame Looks up the destination in a table Forwards the frame to the appropriate LN segment o Or point-to-point link, for higher-speed Ethernet Each segment is its own collision domain switch/bridge Questions efore We Proceed? collision domain 1 collision domain collision domain Switches & oncurrent omunication Host can talk to, while talks to switch If host has (dedicated) point-to-point link to switch: Full duplex: each connection can send in both directions o t the same time (otherwise, half duplex ) ompletely avoids collisions dvantages Over Hubs & Repeaters 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 If needed, applies carrier sense & collision detection oes not transmit when the link is busy pplies exponential back-off after a collision Joins segments using different technologies o No need for carrier sense, collision detection, and so on

isadvantages Over Hubs & Repeaters Higher cost More complicated devices that cost more money elay in forwarding frames ridge/switch must receive and parse the frame and perform a look-up to decide where to forward Introduces store-and-forward delay o an ameliorate using cut-through switching Start forwarding after only header received Need to learn where to forward frames ridge/switch needs to construct a forwarding table Ideally, without intervention from network administrators Solution: self-learning Motivation For Self Learning Large benefit if switch/bridge forward frames only on segments that need them llows concurrent use of other links Switch table Maps destination M address to outgoing interface Goal: construct the switch table automatically switch Self Learning: uilding the Table When a frame arrives Inspect source M address ssociate address with the incoming interface Store mapping in the switch table Use time-to-live field to eventually forget the mapping o Soft state Self Learning: Handling Misses When frame arrives with unfamiliar destination Forward the frame out all of the interfaces ( flooding ) o except for the one where the frame arrived Hopefully, this case won t happen very often When destination replies, switch learns that node, too Switch just learned how to reach. When in doubt, shout! 8 Switch Filtering / Forwarding Flooding an Lead to Loops When switch receives a frame: index the switch table using M dest address if entry found for destination { if dest on segment from which frame arrived then drop frame else forward frame on interface indicated 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 o Either accidentally, or by design for higher reliability roadcast storm } else flood Problems? forward on all but the interface on which the frame arrived 9 0

Solution: Spanning Trees Ensure the forwarding topology has no loops void using some of the links when flooding to prevent loop from forming Spanning tree (K&R pp. 0-08) Sub-graph that covers all vertices but contains no cycles Links not in the spanning tree do not forward frames 1 onstructing a Spanning Tree Need a distributed algorithm Switches cooperate to build the spanning tree and adapt automatically when failures occur Key ingredients of the algorithm Switches need to elect a root o The switch w/ smallest identifier (M addr) Each switch determines if its interface is on the shortest path from the root o Excludes it from the tree if not Messages (Y, d, X) One hop o From node X o Proposing Y as the root o nd the distance is d root Three hops Steps in Spanning Tree lgorithm Initially, each switch proposes itself as the root Switch sends a message out every interface proposing itself as the root with distance 0 Example: switch X announces (X, 0, X) Switches update their view of the root Upon receiving message (Y, d, Z) from Z, check Y s id If new id smaller, start viewing that switch as root Switches compute their distance from the root dd 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 Example From Switch # s Viewpoint Switch # thinks it is the root Sends (, 0, ) message to and Then, switch # hears from # Receives (, 0, ) message from and thinks that # is the root nd realizes it is just one hop away Then, switch # hears from # Receives (, 1, ) from nd realizes this is a longer path So, prefers its own one-hop path nd removes - link from the tree updated message (Y, d+1, X) 1 Example From Switch # s Viewpoint Robust Spanning Tree lgorithm Switch # hears about switch #1 Switch hears (1, 1, ) from Switch starts treating 1 as root nd sends (1,, ) to neighbors Switch # hears from switch # Switch starts treating 1 as root nd sends (1,, ) to neighbors Switch # hears from switch # Switch receives (1,, ) from nd realizes this is a longer path So, prefers its own three-hop path nd removes - Iink from the tree 1 lgorithm must react to failures Failure of the root node o Need to elect a new root, with the next lowest identifier Failure of other switches and links o Need to recompute the spanning tree Root switch continues sending messages Periodically reannouncing itself as the root (1, 0, 1) Other switches continue forwarding messages etecting failures through timeout (soft state) Switch waits to hear from others Eventually times out and claims to be the root

Moving From Switches to Routers omparing Hubs, Switches & Routers dvantages of switches over routers Plug-and-play Fast filtering and forwarding of frames isadvantages of switches over routers Topology restricted to a spanning tree Large networks require large RP tables roadcast storms can cause the network to collapse an t accommodate non-ethernet segments (why not?) traffic isolation s switches routers no yes yes plug & play yes yes no optimized routing no no yes cut-through yes yes * no * 8 Summary Ethernet as an exemplar of link-layer technology Simplest form, single segment: arrier sense, collision detection, and random access Extended to span multiple segments: Hubs & repeaters: physical-layer interconnects ridges / switches: link-layer interconnects Key ideas in switches Self learning of the switch table Spanning trees Next time: midterm review 9