The Link Layer II: Ethernet

Similar documents
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

EE 122: Ethernet and

CSMA/CD (Collision Detection)

Reminder: Datalink Functions Computer Networking. Datalink Architectures

Lecture 5 The Data Link Layer. 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 The Data Link Layer part II. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

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

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

Medium Access Protocols

Link Layer and Ethernet

Link Layer and Ethernet

Summary of MAC protocols

CSC 4900 Computer Networks: Link Layer (2)

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

Link Layer and LANs. Our Goals. Link Layer

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

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

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

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

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

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

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

Chapter 5 Link Layer and LANs

Master Course Computer Networks IN2097

Data Link Layer, Part 3 Medium Access Control. Preface

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

Master Course Computer Networks IN2097

Module 10 Data Link Layer CS655! 10-1!

Data Link Layer, Part 5. Medium Access Control

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

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

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

Protocols for Multiaccess Networks

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

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

Chapter V: Link Layer

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

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

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

Chapter 5 Link Layer and LANs

Principles behind data link layer services

CSCD 433 Network Programming Fall Lecture 7 Ethernet and Wireless

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

Chapter 5: DataLink Layer

Data and Computer Communications. Chapter 11 Local Area Network

CSC 4900 Computer Networks: The Link Layer

Module 4 Data Link Layer CS655! 4-1!

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

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

Chapter 5: Link layer

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

Physical and Link Layers. CS144 Review Session 6 November 6 th, 2008 Roger Liao Based on slides by Ben Nham

CSE 461: Multiple Access Networks. This Lecture

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

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

LAN PROTOCOLS. Beulah A AP/CSE

COMP/ELEC 429/556 Introduction to Computer Networks

CMPE 257: Wireless and Mobile Networking

Computer Networks Principles LAN - Ethernet

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Medium Access Control

Data Link Layer: Multi Access Protocols

The Link Layer and LANs: Ethernet and Swiches

Principles behind data link layer services:

Chapter V: Link Layer

Chapter 6: Link layer and LANs. Link layer, LANs: outline. Link layer: introduction. Link layer: context. Link layer services (more)

CSC 8560 Computer Networks: Link Layer

CS 3516: Computer Networks

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

ECE 4450:427/527 - Computer Networks Spring 2017

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

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

Link Layer. (continued)

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

Chapter 5 Data Link Layer

Medium Access Control

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

Reliable Transmission

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

Chapter 5 Data Link Layer

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

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

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

WiFi Networks: IEEE b Wireless LANs. Carey Williamson Department of Computer Science University of Calgary Winter 2018

Introduction to Computer Networks. IEEE Ethernet

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

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

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

COS 140: Foundations of Computer Science

Part3. Local Area Networks (LAN)

Redes de Computadores. Medium Access Control

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

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Data Link Layer. Goals of This Lecture. Engineering Questions. Outline of the Class

Chapter 5 Link Layer and LANs

CS 3640: Introduction to Networks and Their Applications

Data Communications. Automatic Repeat Request Medium Access Control

Transcription:

Monday Recap The Link Layer II: Ethernet q Link layer services q Principles for multiple access protocols q Categories of multiple access protocols CSC 249 March 24, 2017 1 2 Recap: Random Access Protocols q When node has packet to send v transmit at full channel data rate R. v no a priori coordination among nodes q two or more transmitting nodes collision q random access MAC protocol specifies: v how to detect collisions v how to recover from collisions (e.g., via delayed retransmissions) q Examples of random access MAC protocols: v Carrier Sense Multiple Access Collision detection vs. Collision avoidance v CSMA, CSMA/CD, CSMA/CA Recap: CSMA collisions collisions can still occur: propagation delay means two nodes may not hear each other s transmission collision: entire packet transmission time wasted note: role of distance & propagation delay in determining collision probability spatial layout of nodes 5 6 1

Recap: CSMA/CD (Collision Detection) Overview for Today qethernet details v Sensing delay v Jam signal q Examples v Indicate impact of length of links v Hubs vs. Switches introduction 7 8 Ethernet q Connectionless: No handshaking between sending and receiving adapter q Unreliable: receiving adapter does not send ACKs or NAKs to sending adapter v stream of frames passed to network layer can have gaps v gaps will be filled if application is using TCP v otherwise, application will see the gaps q Ethernet s MAC protocol: CSMA/CD Ethernet CSMA/CD Features q Adapter does not transmit if it senses that some other adapter is transmitting, that is, carrier sense q Transmitting adapter aborts when it senses that another adapter is transmitting, that is, collision detection q Before attempting a retransmission, adapter waits a random time, that is, random access 9 10 2

Ethernet CSMA/CD algorithm 1. Adaptor receives datagram from network layer & creates frame 2. If adapter senses channel idle (senses for 96 bittimes), it starts to transmit frame. If it senses channel busy, it waits until channel is idle. 3. If adapter transmits entire frame without detecting another transmission, the adapter is done with frame. 4. If adapter detects another transmission while transmitting, it aborts and sends jam signal 5. After aborting, adapter enters exponential backoff: 1. After the m th collision, adapter chooses a K at random from {0,1,2,,2 m -1}. 2. Adapter waits K 512 bit times and returns to Step 2 11 Ethernet s CSMA/CD (more) Jam Signal: make sure all other transmitters are aware of collision v Ensure there was/is enough energy to be detected v 48 bits long Bit time: For typical 10 Mbps Ethernet, (10x10 6 ) -1 = 0.1µs q If K=1023, the wait time is about 50 msec csma/cd applet: http://wps.aw.com/aw_kurose_network_5/ 111/28536/7305312.cw/index.html http://wps.aw.com/aw_kurose_network_3/ 0,9212,1406346-,00.html Exponential Backoff: q Goal: adapt retransmission attempts to estimated current load v heavy load = more collisions so the random wait will be longer q first collision: choose K from {0,1}; delay is K 512 bit transmission times q after second collision: choose K from {0,1,2,3} q after ten collisions, choose K from {0,1,2,3,4,,1023} 12 Question 1a q In CSMA/CD, after the fifth collision v What is the probability that a node chooses K=4? v How long will the adapter wait to retransmit on a 10 Mbps Ethernet? Question 1 (on handout) q Nodes A and B are on a 10Mbps link with d prop = 225 bit-times between nodes. If A transmits, and before it is done B begins to transmit: v Can A finish before it detects that B has begun? v (* If yes, then A believes its transmission was successful and collision-free *) q Ethernet frame (next slides) v Size of Frame: Header + CRC = 26 bytes Data field minimum = 46 bytes (up to 1500 bytes maximum for Ethernet) 13 14 3

What is a bit-time q Bit time is a concept in computer networking. It is defined as the time it takes for one bit to be ejected from a Network Interface Card (NIC) operating at some predefined standard speed, such as 10 Mbit/s. q The time is measured between the time the logical link control layer 2 sublayer receives the instruction from the operating system until the bit actually leaves the NIC. q The bit time has nothing to do with the time it takes for a bit to travel on the network medium, but has to do with the internals of the NIC Ethernet Frame Structure Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame { Preamble: v 7 bytes with pattern 10101010 followed by one byte with pattern 10101011 v used to synchronize receiver & sender clocks v = 8 bytes total } 15 16 Ethernet Frame Structure Link Layer q Addresses: 6 bytes each v if adapter receives frame with matching destination address, or with broadcast address (e.g., ARP packet), it passes data in frame to network layer protocol v otherwise, adapter discards frame q Type: indicates the higher layer protocol (mostly IP but others may be supported such as Novell IPX and AppleTalk) (2 bytes) q CRC: checked at receiver, if error is detected, the frame is simply dropped (4 bytes) 17 19 4

Ethernet Connections: Hubs Hubs are physical-layer repeaters: v bits coming from one link go out all other links v at the same rate v no buffering (no store-and-forward) v no CSMA/CD at hub q A physical layer device examines no headers v v Extends max distance between nodes good Creates one large collision domain bad 20 Question 2 (parts 1 and 2) q Suppose two nodes, A and B, are attached to opposite ends of a 900 m cable, and that they each have one frame of 1,000 bits (including all headers and preambles) to send to each other. v Both nodes attempt to transmit at time t=0. v There are four hubs between A and B, each inserting a 20-bit delay. v Assume the transmission rate is 10 Mbps, and CSMA/CD with backoff intervals of multiples of 512 bits is used. v After the 1st collision, A draws K=0 and B draws K=1 in the exponential backoff protocol. Ignore the jam signal and the 96 bittime delay. 1. What is the one-way propagation delay (including hub delays) between A and B in seconds? Assume that the signal propagation speed is 2*10 8 m/sec. 2. At what time (in seconds) is A's packet completely delivered to B? à For this problem, recall chapter 1-4 sources of delay. à Propagation + transmission = d/s + L/R à Now we have: (time allocated to collision) + d/s + L/R 21 Question 2 (part 3) q Suppose two nodes, A and B, are attached to opposite ends of a 900 m cable, and that they each have one frame of 1,000 bits (including all headers and preambles) to send to each other. v Both nodes attempt to transmit at time t=0. v There are four hubs between A and B, each inserting a 20-bit delay. v Assume the transmission rate is 10 Mbps, and CSMA/CD with backoff intervals of multiples of 512 bits is used. v After the 1st collision, A draws K=0 and B draws K=1 in the exponential backoff protocol. Ignore the jam signal and the 96 bittime delay. 3. Now only A has a packet to send and the hubs are replaced with switches. Each switch has a 20-bit processing delay in addition to a store-and-forward delay. At what time, in seconds, is A's packet delivered at B? 22 5