Links COS 461: Computer Networks Spring 2011 Mike Freedman

Slides:



Advertisements
Similar presentations
Lecture 15 Link Layer Protocols. Lecture 15-2 Link Layer Services r Framing and link access: encapsulate datagram into frame adding header and trailer,
Advertisements

1 Links Reading: Chapter 2 COS 461: Computer Networks Spring 2006 (MW 1:30-2:50 in Friend 109) Jennifer Rexford Teaching Assistant: Mike Wawrzoniak
Network Layer4-1 Link Layer: Introduction Some terminology: r hosts and routers are nodes (bridges and switches too) r communication channels that connect.
5-1 Link Layer: Introduction Some terminology: r hosts and routers are nodes r communication channels that connect adjacent nodes along communication path.
15 – Data link layer Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction.
5: DataLink Layer5-1 Data Link Layer r What is Data Link Layer? r Multiple access protocols r Ethernet.
11/11/ /13/2003 DLL, Error Detection, MAC, ARP November 11-13, 2003.
Review r Multicast Routing m Three options m source-based tree: one tree per source shortest path trees reverse path forwarding m group-shared tree: group.
1 Link Layer Message M A B Problem: Given a message M at a node A consisting of several packets, how do you send the packets to a “neighbor” node B –Neighbor:
DataLink Layer session 1 TELE3118: Network Technologies Week 2: Data Link Layer Framing, Error Control, Multiple Access Some slides have been taken.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao
5-1 Data Link Layer r Today, we will study the data link layer… r This is the last layer in the network protocol stack we will study in this class…
5: DataLink Layer5-1 Link Layer – Error Detection/Correction and MAC.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
16 – CSMA/CD - ARP Network Layer4-1. 5: DataLink Layer5-2 CSMA (Carrier Sense Multiple Access) CSMA: listen before transmit: If channel sensed idle: transmit.
CS352- Link Layer Dept. of Computer Science Rutgers University.
5: DataLink Layer5-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction m.
Lecture 16 Random Access protocols r A node transmits at random at full channel data rate R. r If two or more nodes “collide”, they retransmit at random.
Introduction1-1 1DT014/1TT821 Computer Networks I Chapter 5 Link Layer and LANs.
Link Layer Zeinab Movahedi Some slides are from Computer networks course thought by Jennifer Rexford at Princeton University.
Introduction1-1 Data Communications and Computer Networks Chapter 5 CS 3830 Lecture 26 Omar Meqdadi Department of Computer Science and Software Engineering.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Part 3: MAC Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.
1 Link-Layer Contention EE 122: Intro to Communication Networks Fall 2007 (WF 4-5:30 in Cory 277) Vern Paxson TAs: Lisa Fowler, Daniel Killebrew & Jorge.
Computer Networking Lecture 4 - Physical Layer, Link Layer Basics, Switching.
1 Computer Communication & Networks Lecture 12 Datalink Layer: Multiple Access Waleed Ejaz
4-1 Last time □ Link layer overview ♦ Services ♦ Adapters □ Error detection and correction ♦ Parity check ♦ Internet checksum ♦ CRC □ PPP ♦ Byte stuffing.
NUS.SOC.CS2105 Ooi Wei Tsang Application Transport Network Link Physical you are here.
Chapter 5 Link Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Link Layer multiple.
CS 1652 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Jack Lange.
Link Layer5-1 Chapter 5: Link layer our goals:  understand principles behind link layer services:  error detection, correction  sharing a broadcast.
Medium Access Control NWEN302 Computer Network Design.
November 8 th, 2012 CS1652 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights Reserved.
5: DataLink Layer5a-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction.
4: DataLink Layer1 Multiple Access Links and Protocols Three types of “links”: r point-to-point (single wire, e.g. PPP, SLIP) r broadcast (shared wire.
Network Layer4-1 Link Layer: Introduction Some terminology: r hosts and routers are nodes (bridges and switches too) r communication channels that connect.
5: DataLink Layer5-1 Link Layer r 5.1 Introduction and services r 5.2 Error detection and correction r 5.3Multiple access protocols r 5.4 Link-Layer Addressing.
1 Week 5 Lecture 3 Data Link Layer. 2 Data Link Layer location application: supporting network applications –FTP, SMTP, STTP transport: host-host data.
11/25/20151 EEC-484 Computer Networks Lecture 12 Wenbing Zhao Cleveland State University
5: DataLink Layer5-1 The Data Link Layer Chapter 5 Kurose and Ross Today 5.1 and 5.3.
Multiple Access Links and Protocols
5: DataLink Layer 5a-1 Multiple Access protocol. 5: DataLink Layer 5a-2 Multiple Access Links and Protocols Three types of “links”: r point-to-point (single.
Data Link Layer. Useful References r Wireless Communications and Networks by William Stallings r Computer Networks (third edition) by Andrew Tanenbaum.
5: DataLink Layer5-1 Chapter 5: The Data Link Layer Our goals: r Understand principles behind data link layer services: m error detection, error correction.
EEC-484/584 Computer Networks
5: DataLink Layer5-1 Chapter 5: The Data Link Layer Our goals: r Understand principles behind data link layer services: m error detection, error correction.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
5: DataLink Layer5a-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction.
EE 122: Lecture 6 Ion Stoica September 13, 2001 (* this talk is based in part on the on-line slides of J. Kurose & K. Rose)
5: DataLink Layer5-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, error correction.
1 Point-to-Point Links: Encoding Encoding: Section 2.2 (Section 2.1 read on your own)
Transport Layer 3-1 Chapter 5 Link Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012  CPSC.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
5: DataLink Layer5-1 Link Layer r 5.1 Introduction and services r 5.2 Error detection and correction r 5.3Multiple access protocols r 5.4 Link-layer Addressing.
CS 457 – Lecture 3 Link Layer Protocols Fall 2011.
5: DataLink Layer5-1 Slotted ALOHA Assumptions r all frames same size r time is divided into equal size slots, time to transmit 1 frame r nodes start to.
EEC-484/584 Computer Networks
Chapter 5 Link Layer and LANs
Computer Communication Networks
Chapter 5: The Data Link Layer
CS 1652 Jack Lange University of Pittsburgh
CS 457 – Lecture 6 Ethernet Spring 2012.
Services of DLL Framing Link access Reliable delivery
Multiple access.
2017 session 1 TELE3118: Network Technologies Week 2: Data Link Layer Framing, Error Control, Multiple Access Slides have been adapted from: Computer.
2012 session 1 TELE3118: Network Technologies Week 2: Data Link Layer Framing, Error Control, Multiple Access Some slides have been taken from: Computer.
EEC-484/584 Computer Networks
Overview Jaringan Komputer (3)
Link Layer and LANs Not everyone is meant to make a difference. But for me, the choice to lead an ordinary life is no longer an option 5: DataLink Layer.
Link Layer 5.1 Introduction and services
Link Layer: Multiple Access
Presentation transcript:

Links COS 461: Computer Networks Spring 2011 Mike Freedman

Outline Link-layer protocols – Encoding, framing, error detection Multiple-access links: sharing is caring! – Strict isolation: division over time or frequency – Centralized management (e.g., token passing) – Decentralized management (e.g., CSMA/CD) 2 nd precept this Friday – Everybody assigned last week; attendance mandatory – Assignment 0 due Friday in precept 2

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

Shuttling 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 Bridge, switch Repeater, hub Frame header Packet header TCP header User data 4

Link Transmissions in 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

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

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

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 8

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 9

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

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

Link-Layer Protocols 12

Digital adaptors Communicating Link layer implemented in adaptor (network interface card) – Ethernet card, PCMCIA card, 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 sending node frame receiving node datagram frame adapter link layer protocol 13

Link-Layer Services Encoding – Representing the 0s and 1s Framing – Encapsulating packet into frame, adding header, trailer – Using MAC addresses, rather than IP addresses Error detection – Errors caused by signal attenuation, noise. – Receiver detecting presence of errors Error correction – Receiver correcting errors without retransmission Flow control – Pacing between adjacent sending and receiving nodes 14

Framing Break sequence of bits into a frame – Typically implemented by the network adaptor Sentinel-based – Delineate frame with special pattern (e.g., ) – Problem: what if special patterns occurs within frame? – Solution: escaping the special characters E.g., sender always inserts a 0 after five 1s … and receiver always removes a 0 appearing after five 1s – Similar to escaping special characters in C programs Frame contents

Framing (Continued) Counter-based – Include the payload length in the header – … instead of putting a sentinel at the end – Problem: what if the count field gets corrupted? Causes receiver to think the frame ends at a different place – Solution: catch later when doing error detection And wait for the next sentinel 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 16

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

Error Detection Techniques Parity check – Add an extra bit to a 7-bit code – Odd parity: ensure an odd number of 1s E.g., becomes – Even parity: ensure an even number of 1s E.g., becomes 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 Section

Towards Concurrency 19

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

Channel Partitioning: TDMA TDMA: time division multiple access Access to channel in "rounds" – Each station gets fixed length slot in each round Time-slot length is packet transmission time – Unused slots go idle Example: 6-station LAN with slots 1, 3, and 4 21

Channel Partitioning: FDMA FDMA: frequency division multiple access Channel spectrum divided into frequency bands – Each station has fixed frequency band (Wifi channels 1-11) Unused transmission time in bands go idle Example: 6-station LAN with bands 1, 3, and 4 22 frequency bands time

Channel Partitioning: FDMA FDMA: frequency division multiple access Channel spectrum divided into frequency bands – Each station has fixed frequency band (Wifi channels 1-11) Unused transmission time in bands go idle Example: 6-station LAN with bands 1, 3, and 4 WDM: Wavelength division multiplexing Multiple wavelengths λ on same optical fiber 23

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

Random Access Protocols 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 25

Key Ideas of Random Access Carrier Sense (CS) – Listen before speaking, and don’t interrupt – Checking if someone else is already sending data – … and waiting till the other node is done Collision Detection (CD) – 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 – Don’t start talking again right away – Waiting for a random time before trying again 26

Slotted ALOHA Assumptions All frames same size Time divided into equal slots (time 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 Operation 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 until success 27

Slotted ALOHA Pros Single active node can continuously transmit at full rate of channel Highly decentralized: only slots in nodes need to be in sync Simple Cons Collisions, wasting slots Idle slots Nodes may be able to detect collision in less than time to transmit packet Clock synchronization 28

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

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

CSMA/CD (Collision Detection) CSMA/CD: carrier sensing, deferral as in CSMA – Collisions detected within short time – Colliding transmissions aborted, reducing wastage Collision detection – Easy in wired LANs: measure signal strengths, compare transmitted, received signals – Difficult in wireless LANs: receiver shut off while transmitting Human analogy: the polite conversationalist 31

Three Ways to Share the Media Channel partitioning 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 active 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 utilize channel – High load: collision overhead 32