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

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

Links. CS125 - mylinks 1 1/22/14

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

Goals of Today s Lecture. Adaptors Communicating

Links Reading: Chapter 2

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

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

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

CSC 4900 Computer Networks: The Link Layer

Chapter 5 Link Layer and LANs

Data Link Layer: Multi Access Protocols

Chapter 5 Link Layer and LANs

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

Chapter 5: Link layer

ECE 4450:427/527 - Computer Networks Spring 2017

Data Link Layer: Overview, operations

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

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

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

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

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

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

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

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

CS 43: Computer Networks Media Access. Kevin Webb Swarthmore College November 30, 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 5 Link Layer. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

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

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

Chapter V: Link Layer

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

Module 10 Data Link Layer CS655! 10-1!

Physical Layer. Medium Access Links and Protocols. Point-to-Point protocols. Modems: Signaling. Modems Signaling. Srinidhi Varadarajan

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

Chapter 5 Link Layer and LANs

CSC 401 Data and Computer Communications Networks

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

EE 122: Ethernet and

CSCD 330 Network Programming

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

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

Master Course Computer Networks IN2097

Link Layer and Ethernet

Link Layer and Ethernet

CMPE 150: Introduction to Computer Networks

CC451 Computer Networks

Chapter V: Link Layer

Master Course Computer Networks IN2097

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

Principles behind data link layer services:

Principles behind data link layer services

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

Summary of MAC protocols

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

Reminder: Datalink Functions Computer Networking. Datalink Architectures

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

CS 3640: Introduction to Networks and Their Applications

Medium Access Control

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

MULTIPLE ACCESS PROTOCOLS 2. 1

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

Medium Access Protocols

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

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

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

CSCD 330 Network Programming Fall 2012

transferring datagram from one node data-link layer has responsibility of to adjacent node over a link 5-1 TDTS06 Computer networks

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

SC250 Computer Networking I. Link Layer. Prof. Matthias Grossglauser LCA/I&C.

Link Layer and LANs. Our Goals. Link Layer

Module 4 Data Link Layer CS655! 4-1!

Principles behind data link layer services:

Principles behind data link layer services:

Medium Access Control

Chapter 4 Network Layer

Link Layer and LANs. CMPS 4750/6750: Computer Networks

Computer and Network Security

Chapter 5: DataLink Layer

Chapter 6 The Link Layer and LANs

CS 3516: Computer Networks

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

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

ECE 158A: Lecture 13. Fall 2015

Multiple Access Links and Protocols

CSC 8560 Computer Networks: Link Layer

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

CSMC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala Set 4. September 09 CMSC417 Set 4 1

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

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

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

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

CS 640 Lecture 4: 09/11/2014

CSE 461: Multiple Access Networks. This Lecture

CSMA/CD (Collision Detection)

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

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

Medium Access Control

Lecture 6 - Link layer. Lecture 5 Review. Link Layer. Introduction, Services. Notes. Notes. Notes. Notes. Networks and Security. Jacob Aae Mikkelsen

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

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

Transcription:

Links COS 461: Computer Networks Spring 2011 Mike Freedman h?p://www.cs.princeton.edu/courses/archive/spring11/cos461/

2 Link layer protocols Outline Encoding, framing, error detecjon MulJple access links: sharing is caring! Strict isolajon: division over Jme or frequency Centralized management (e.g., token passing) Decentralized management (e.g., CSMA/CD) 2 nd precept this Friday Everybody assigned last week; a?endance mandatory Assignment 0 due Friday in precept

3 Recall the Internet layering model host HTTP HTTP message host HTTP TCP TCP segment TCP router router IP IP packet IP IP packet IP IP packet IP Ethernet interface Ethernet interface SONET interface SONET interface Ethernet interface Ethernet interface

4 Shu?ling Data at Different Layers Different devices switch different things Network layer: packets (routers) Link layer: frames (bridges and switches) Physical layer: electrical signals (repeaters and hubs) Application gateway Transport gateway Router Frame header Packet header TCP header User data Bridge, switch Repeater, hub

5 Link Transmissions in 1858 On August 16, 1858: "Glory to God in the highest; on earth, peace and good will toward men. 17 hours to transmit, 2 min per character, 0.1 words per minute

6 Link Transmissions in 1866 1866 cable: 8 words / minute Great Eastern cable laying ship

7 IP Transmissions in 1969 First message on Internet: $ lo >system crash<

8 Digital > Analog Encoding Signals sent over physical links Source node: bits > signal Receiving node: signal > bits Encoding in telegraph Morse code: long and short signals

9 Digital > Analog Encoding Signals sent over physical links Source node: bits > signal Receiving node: signal > bits Simplify some electrical engineering details Assume two discrete signals, high and low E.g., could correspond to two different voltages Simple approach: Non return to zero High for a 1, low for a 0

10 Problem With NRZ Long strings of 0s or 1s introduce problems No transijons from low to high, or high to low Receiver keeps average of signal it has received Uses the average to disjnguish between high and low Long flat strings make receiver sensijve to small change TransiJons also necessary for clock recovery Receiver uses transijons to derive its own clock Long flat strings do not produce any transijons Can lead to clock drij at the receiver

11 Protocols with clock recovery Manchester encoding (basic Ethernet) clock XOR NRZ: L H (0), H L (1) : self clocking Efficiency? Manchester: 2 clock transijons per bit: 50% efficient 1 GbE: 8b/10b: 80% efficient 10 GbE: 64b/66b: 96.9% efficient

Link Layer Protocols 12

13 Digital adaptors CommunicaJng datagram link layer protocol frame frame sending node adapter adapter receiving node Link layer implemented in adaptor (network interface card) Ethernet card, PCMCIA card, 802.11 card Sending side: Encapsulates datagram in a frame Adds error checking bits, flow control, etc. Receiving side Looks for errors, flow control, etc. Extracts datagram and passes to receiving node

14 Link Layer Services Encoding RepresenJng the 0s and 1s Framing EncapsulaJng packet into frame, adding header, trailer Using MAC addresses, rather than IP addresses Error detecjon Errors caused by signal a?enuajon, noise. Receiver detecjng presence of errors Error correcjon Receiver correcjng errors without retransmission Flow control Pacing between adjacent sending and receiving nodes

15 Framing Break sequence of bits into a frame Typically implemented by the network adaptor SenJnel based Delineate frame with special pa?ern (e.g., 01111110) 01111110 Frame contents 01111110 Problem: what if special pa?erns occurs within frame? SoluJon: escaping the special characters E.g., sender always inserts a 0 ajer five 1s and receiver always removes a 0 appearing ajer five 1s Similar to escaping special characters in C programs

16 Framing (ConJnued) Counter based Include the payload length in the header instead of putng a senjnel at the end Problem: what if the count field gets corrupted? Causes receiver to think the frame ends at a different place SoluJon: catch later when doing error detecjon And wait for the next senjnel for the start of a new frame Clock based Make each frame a fixed size No ambiguity about start and end of frame But, may be wasteful

17 Error DetecJon Errors are unavoidable Electrical interference, thermal noise, etc. Error detecjon Transmit extra (redundant) informajon Use redundant informajon to detect errors Extreme case: send two copies of the data Trade off: accuracy vs. overhead

18 Error DetecJon Techniques Parity check Add an extra bit to a 7 bit code Odd parity: ensure an odd number of 1s E.g., 0101011 becomes 01010111 Even parity: ensure an even number of 1s E.g., 0101011 becomes 01010110 Checksum Treat data as a sequence of 16 bit words Compute a sum of all 16 bit words, with no carries Transmit the sum along with the packet Cyclic Redundancy Check (CRC) See SecJon 2.4.3

Towards Concurrency 19

20 MulJple Access Protocol Single shared broadcast channel Avoid having muljple nodes speaking at once Otherwise, collisions lead to garbled data MulJple access protocol Distributed algorithm for sharing the channel Algorithm determines which node can transmit Classes of techniques Channel parjjoning: divide channel into pieces Taking turns: passing a token for the right to transmit Random access: allow collisions, and then recover

21 Channel ParJJoning: TDMA TDMA: Jme division muljple access Access to channel in "rounds" Each stajon gets fixed length slot in each round Time slot length is packet transmission Jme Unused slots go idle Example: 6 stajon LAN with slots 1, 3, and 4

22 Channel ParJJoning: FDMA FDMA: frequency division muljple access Channel spectrum divided into frequency bands Each stajon has fixed frequency band (Wifi channels 1 11) Unused transmission Jme in bands go idle Example: 6 stajon LAN with bands 1, 3, and 4 time frequency bands

23 Channel ParJJoning: FDMA FDMA: frequency division muljple access Channel spectrum divided into frequency bands Each stajon has fixed frequency band (Wifi channels 1 11) Unused transmission Jme in bands go idle Example: 6 stajon LAN with bands 1, 3, and 4 WDM: Wavelength division muljplexing MulJple wavelengths λ on same opjcal fiber

24 Taking Turns MAC protocols Polling Primary node invites secondary nodes to transmit in turn Concerns: Polling overhead Latency Single point of failure (primary) Token passing Control token passed from one node to next sequenjally Token message Concerns: Token overhead Latency Single point of failure (token)

25 Random Access Protocols When node has packet to send Transmit at full channel data rate R. No a priori coordinajon among nodes Two or more transmitng nodes collision Random access MAC protocol specifies: How to detect collisions How to recover from collisions

26 Key Ideas of Random Access Carrier Sense (CS) Listen before speaking, and don t interrupt Checking if someone else is already sending data and waijng Jll the other node is done Collision DetecJon (CD) If someone else starts talking at the same 8me, stop Realizing when two nodes are transmitng at once by detecjng that the data on the wire is garbled Randomness Don t start talking again right away WaiJng for a random Jme before trying again

27 Slo?ed ALOHA AssumpJons All frames same size Time divided into equal slots (Jme to transmit a frame) Nodes start to transmit frames only at start of slots Nodes are synchronized If two or more nodes transmit, all nodes detect collision OperaJon When node obtains fresh frame, transmits in next slot No collision: node can send new frame in next slot Collision: node retransmits frame in each subsequent slot with probability p unjl success

28 Slo?ed ALOHA Pros Single acjve node can conjnuously transmit at full rate of channel Highly decentralized: only slots in nodes need to be in sync Simple Cons Collisions, wasjng slots Idle slots Nodes may be able to detect collision in less than Jme to transmit packet Clock synchronizajon

29 CSMA (Carrier Sense MulJple Access) Collisions hurt the efficiency of ALOHA protocol At best, channel is useful 37% of the Jme CSMA: listen before transmit If channel sensed idle: transmit enjre frame If channel sensed busy, defer transmission Human analogy: don t interrupt others!

30 CSMA (Carrier Sense MulJple Access) CSMA: Listen before transmit Collisions can still occur: propagation delay means two nodes may not hear each other s transmission Collision: entire packet transmission time wasted

31 CSMA/CD (Collision DetecJon) CSMA/CD: carrier sensing, deferral as in CSMA Collisions detected within short Jme Colliding transmissions aborted, reducing wastage Collision detecjon Easy in wired LANs: measure signal strengths, compare transmi?ed, received signals Difficult in wireless LANs: receiver shut off while transmitng Human analogy: the polite conversajonalist

32 Ethernet Dominant wired LAN technology First widely used LAN technology Simpler, cheaper than token LANs and ATM Kept up with speed race: 10 Mbps 10 Gbps Metcalfe s Ethernet sketch

33 Ethernet Uses CSMA/CD Carrier Sense: wait for link to be idle Channel idle: start transmitng Channel busy: wait unjl idle Collision DetecJon: listen while transmitng No collision: transmission is complete Collision: abort transmission, and send jam signal Random access: exponenjal back off Ajer collision, wait a random Jme before trying again Ajer m th collision, choose K randomly from {0,, 2 m 1} and wait for K*512 bit Jmes before trying again

34 LimitaJons on Ethernet Length A latency d B Latency depends on physical length of link Time to propagate a packet from one end to the other Suppose A sends a packet at Jme t And B sees an idle line at a Jme just before t+d so B happily starts transmitng a packet B detects a collision, and sends jamming signal But A doesn t see collision Jll t+2d

35 LimitaJons on Ethernet Length A latency d B A needs to wait for Jme 2d to detect collision So, A should keep transmitng during this period and keep an eye out for a possible collision Imposes restricjons on Ethernet Maximum length of the wire: 2500 meters Minimum length of the packet: 512 bits (64 bytes)

36 Three Ways to Share the Media Channel parjjoning MAC protocols: Share channel efficiently and fairly at high load Inefficient at low load: delay in channel access, 1/N bandwidth allocated even if only 1 acjve node! Taking turns protocols Eliminates empty slots without causing collisions Vulnerable to failures (e.g., failed node or lost token) Random access MAC protocols Efficient at low load: single node can fully ujlize channel High load: collision overhead