Reminder: Datalink Functions Computer Networking. Datalink Architectures

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

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

Link Layer and Ethernet

Link Layer and Ethernet

Medium Access Protocols

The Link Layer II: Ethernet

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

Summary of MAC protocols

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

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

1/29/2008. From Signals to Packets. Lecture 6 Datalink Framing, Switching. Datalink Functions. Datalink Lectures. Character and Bit Stuffing.

EE 122: Ethernet and

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

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

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

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

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

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

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

Lecture 6 Datalink Framing, Switching. From Signals to Packets

CSC 4900 Computer Networks: Link Layer (2)

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Chapter 5 Link Layer and LANs

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

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

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

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

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

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

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Multiple Access Protocols

Data Link Layer, Part 5. Medium Access Control

Introductory to Computer Networks Local Area Networks. Lecture 16 Fall Isfahan University of technology Dr.

Principles behind data link layer services:

ECE 158A: Lecture 13. Fall 2015

Link Layer and LANs. Our Goals. Link Layer

Data Link Layer, Part 3 Medium Access Control. Preface

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Outline: Connecting Many Computers

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

Master Course Computer Networks IN2097

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

Module 10 Data Link Layer CS655! 10-1!

Housekeeping. Fall /5 CptS/EE 555 1

Principles behind data link layer services

ECE 4450:427/527 - Computer Networks Spring 2017

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

Chapter 4. DataLink Layer. Reference: Computer Networking: A Top Down Approach 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

Links. CS125 - mylinks 1 1/22/14

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

CSMA/CD (Collision Detection)

Chapter 5 Link Layer and LANs

CSE 461: Multiple Access Networks. This Lecture

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

Chapter 3. Underlying Technology. TCP/IP Protocol Suite 1 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Medium Access Control

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

Local Area Networks (LANs) SMU CSE 5344 /

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

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

Link Layer and LANs 안상현서울시립대학교컴퓨터 통계학과.

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

CSC 4900 Computer Networks: The Link Layer

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

ECE 4450:427/527 - Computer Networks Spring 2017

Master Course Computer Networks IN2097

CIS 551 / TCOM 401 Computer and Network Security. Spring 2007 Lecture 7

Computer Networks Principles LAN - Ethernet

Access Technologies! Fabio Martignon

Direct Link Networks (II)

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

Principles behind data link layer services:

Principles behind data link layer services:

Multiple Access Channels

Redes de Computadores. Medium Access Control

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

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

LAN Interconnection and Other Link Layer Protocols

Raj Jain. The Ohio State University Columbus, OH

Lecture 8 Link Layer: functionality, error detection, media access algorithm

Chapter 5 part 2 LINK LAYER. Computer Networks Timothy Roscoe Summer Networks & Operating Systems Computer Networks

Data Link Layer: Overview, operations

The random access methods we study in this chapter have evolved from a very interesting protocol known as ALOHA, which used a very simple procedure

Chapter V: Link Layer

Module 4 Data Link Layer CS655! 4-1!

LAN PROTOCOLS. Beulah A AP/CSE

Chapter 5 Link Layer and LANs

Chapter 6 Medium Access Control Protocols and Local Area Networks

COS 140: Foundations of Computer Science

Computer and Network Security

The Link Layer and LANs: Ethernet and Swiches

Link layer, LANs: outline. Chapter 5-1 Link Layer. Link layer: introduction. Link layer services

Chapter 5 Link Layer. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

King Fahd University of Petroleum and Minerals College of Computer Sciences and Engineering Department of Computer Engineering

MULTIPLE ACCESS PROTOCOLS 2. 1

CS 3640: Introduction to Networks and Their Applications

Contention Protocols and Networks

Local Area Network Overview

Transcription:

Reminder: Datalink Functions 15-441 15 441 15-641 Computer Networking Lecture 5 Media Access Control Peter Steenkiste Fall 2015 www.cs.cmu.edu/~prs/15-441-f15 Framing: encapsulating a network layer datagram into a bit stream. Add header, mark and detect frame boundaries, Error control: error detection and correction to deal with bit errors. May also include other reliability support, e.g. retransmission Flow control: avoid sender overrunning receiver. Media access control (MAC): which frame should be sent over the link next. Easy for point to point links Harder for multi access links: who gets to send? So far Can connect two nodes But what if we want more nodes? Wires for everybody? Datalink Architectures Switches connected by point to point links store and forward. Used in WAN, LAN, and for home connections Conceptually similar to routing But at the datalink layer instead of the network layer MAC = (local) scheduling Multiple access networks contention based. Multiple hosts are sharing the same transmission medium Used in LANs and wireless Access control is distributed and much more complex 1

Datalink Classification Switching Virtual Circuits ATM, framerelay Switch-based Packet Switching Bridged LANs Datalink Multiple Access Scheduled Access Token ring, FDDI, 802.11 Random Access Ethernet, 802.11, Aloha Forward units of data based on address in header. Many data link technologies use switching. Virtual circuits: Frame Relay, ATM, X.25,.. Packets: Ethernet,... Switching also happens at the network layer. Layer 3: Internet protocol In this case, address is an IP address IP over SONET, IP over ATM,... Otherwise, operation is very similar Switching is different from traditional (hard) circuits E.g., telephone switches (not covered in this course) Switching is based on timing no addresses A Switch based Network Switch Architecture Switches are connected by point point links. Packets are forwarded hop by hop by the switches towards the destination. Forwarding is based on the address How does a switch work? How do nodes exchange packets over a link? How is the destination addressed? PCs at Work Switch Point-Point link PC at Home Packets come in one interface, forwarded to output interface based on address. Same idea for bridges, switches, routers: address look up differs Control processor manages the switch and executes higher level protocols. E.g. routing, management,... The switch fabric directs the traffic to the right output port. The input and output ports deal with transmission and reception of packets. Input Output Output Input Control Processor Switch Fabric Output Input Output Input 2

Connections or Not? Connectionless Two basic approaches to packet forwarding Connectionless (virtual) Circuit switched When would you use? Host can send anytime anywhere No idea if resources are available to get to destination Forwarding is independent for each packet No setup time Fault tolerant More on this later Destination A 3 B 0 C D E Virtual Circuit Switching Setup, assign VCIs Two stage process similar to traditional circuits Setup connection + create VC ID Send packets RTT introduced before any data is sent Per packet overhead can be smaller (VCI << adr) Switch failures are hard to deal with Reserves resources for connection possible Widely used in core networks (e.g. MPLS) More on this later 3

Packet Forwarding: Address Lookup Datalink Classification Switch Datalink Switch-based Multiple Access Address Next Hop Info B31123812508 3 38913C3C2137 3 13-25 2 31 128.2.15.3 1 (2,34) Address from header. Absolute address (e.g. Ethernet) (VC identifier, e.g. ATM) (IP address for routers) Next hop: output port for packet. Info: priority, timeout,.. Table is filled in by a protocol Virtual Circuits ATM, framerelay Packet Switching Bridged LANs Scheduled Access Token ring, FDDI, 802.11 Random Access Ethernet, 802.11, Aloha Problem: Sharing a Wire (or the wireless ether) Outline: Multiple Access Protocols A B C D E yada yada yak yak Scheduled access (short) Problem: how do you prevent nodes from talking at the same time causes collision Two classes of solutions: Explicit coordination: schedule transmissions sequentially Randomly access medium: and hope you get lucky Random access (long) Aloha Ethernet MAC Collisions Ethernet Frames 15 16 4

Scheduled Access MACs Random Access Protocols Central Controller 4 1 23 2 17 Reservation systems Central controller Distributed algorithm, e.g. using reservation bits in frame Polling: controller polls each nodes Token ring: token travels around ring and allows nodes to send one packet Distributer version of polling FDDI, When node has packet to send Transmit at full channel data rate R 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 (e.g., via delayed retransmissions) Examples of random access MAC protocols: Slotted ALOHA and ALOHA CSMA and CSMA/CD 18 Aloha Basic Technique First random MAC developed For radio based communication in Hawaii (1970) Aloha Throughput Comparison It is possible to calculate throughput for Aloha Many assumptions: exponential arrival, transmitters independent, Bad news: maximum throughput is low Slotted Aloha (a variant) can achieve higher throughput But has higher latency, especially under low load Basic idea: When ready, transmit Receivers send ACK for data Detect collisions by timing out for ACK Recover from collision by trying after random delay 19 protocol constrains effective channel throughput! 0.4 0.3 0.2 0.1 0.5 1.0 1.5 2.0 G = offered load = N X p Slotted Aloha Pure Aloha 22 5

How Can We Do Better? yada yada yak yak Natural scheme listen before you talk Works well in practice A cheap form of coordination But sometimes this breaks down Why? How do we fix/prevent this? Ethernet First practical local area network, built at Xerox PARC in 70 s Dominant LAN technology: Cheap Kept up with the speed race: 10, 100, 1000, Mbps Metcalfe s Ethernet sketch 24 25 Ethernet MAC Features Carrier Sense: listen before you talk Avoid collision with active transmission Collision Detection during transmission Listen while transmitting If you notice interference assume collision Abort transmission immediately saves time Why didn t ALOHA have this? Signal strength is reduced by distance for radio May not hear remote transmitter hidden terminal Very difficult for radios to listen and transmit More on this later in the course Ethernet MAC CSMA/CD Carrier Sense Multiple Access/Collision Detection Discard Packet Packet? Sense Carrier Send attempts < 16 attempts == 16 No Detect Collision Yes Jam channel b=calcbackoff(); wait(b); attempts++; 26 27 6

Ethernet CSMA/CD: Making it work Jam Signal: make sure all other transmitters are aware of collision; 48 bits; Exponential Backoff: If deterministic delay after collision, collision will occur again in lockstep Why not random delay with fixed mean? Few senders needless waiting Too many senders too many collisions Goal: adapt retransmission attempts to estimated current load heavy load: random wait will be longer 28 Ethernet Backoff Calculation Delay is set as K slots control K Exponentially increasing random delay Infer senders from # of collisions More senders increase wait time 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} 29 Outline: Multiple Access Protocols Collisions Scheduled access (short) Random access (long) Aloha Ethernet MAC Collisions Ethernet Frames Time A B C 30 Space 31 7

Minimum Packet Size Packets must be long enough to guarantee all nodes observe collision Depends on packet size and length of wire Propagation delay Min packet length > 2x max prop delay Delay & Collision Detection Speed in cable ~= 60% * c ~= 1.8 x 10^8 m/s 10Mb Ethernet, 2.5km cable ~= 12.5us delay +Introduced repeaters (max 5 segments) Worst case 51.2us round trip time! Corresponds to 512 bits Also used as slot time = 51.2us for backoff After this time, sender is guaranteed sole access to link Specifically, will have heard any signal sent in the previous slot 32 33 Scaling Ethernet Ethernet Frame Structure What about scaling? 10Mbps, 100Mbps, 1Gbps,... Use a combination of reducing network diameter and increasing minimum minimum packet size Reality check: 40 Gbps is 4000 times 10 Mbps 10 Mbps: 2.5 km and 64 bytes > silly Solution: switched Ethernet next lecture What about a maximum packet size? Needed to prevent node from hogging the network 1500 bytes in Ethernet = 1.2 msec on original Ethernet For 40 Gps > 0.3 microsec > silly and inefficient 34 Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame 35 8

Ethernet Frame Structure (cont.) Addressing Alternatives Preamble: 8 bytes 101010 1011 Used to synchronize receiver, sender clock rates CRC: 4 bytes Checked at receiver, if error is detected, the frame is simply dropped Type: 2 bytes Demultiplexing: indicates the higher layer protocol, mostly IP today but historically more protocols (such as Novell IPX and AppleTalk) 36 Broadcast 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) 37 Ethernet Address Assignment Each adapter is given a globally unique 6 byte IEEE 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 38 Why Did Ethernet Win? Failure modes Token rings network unusable (or expensive) Good performance in common case Deals well with bursty traffic Usually used at low load Volume lower cost higher volume. Adaptable To higher bandwidths (vs. FDDI) To switching (vs. ATM) Easy incremental deployment (backwards compatible) Cheap cabling, etc 39 9

And.. It is Easy to Manage Summary You plug in the host and it basically works Zero configuration at the datalink layer Today: may need to deal with security Protocol is fully distributed Broadcast based. In part explains the easy management Some LAN protocols (e.g. ARP) rely on broadcast Networking would be harder without ARP Not having natural broadcast capabilities adds complexity to a LAN (e.g., ATM) Network managers love it! CSMA/CD carrier sense multiple access with collision detection Why do we need exponential backoff? Why does collision happen? Why do we need a minimum packet size? How does this scale with speed? Ethernet What is the purpose of different header fields? What do Ethernet addresses look like? What are some alternatives to Ethernet design? 40 41 10