outline
play

Outline Encoding Bits to digital signal 15-441/641: Datalink - PowerPoint PPT Presentation

11/13/2019 Outline Encoding Bits to digital signal 15-441/641: Datalink Framing Bit stream to packets 15-441 Fall 2019 Packet loss & corruption Profs Peter Steenkiste & Justine Sherry Error detection and recovery


  1. 11/13/2019 Outline • Encoding • Bits to digital signal 15-441/641: Datalink • Framing • Bit stream to packets 15-441 Fall 2019 • Packet loss & corruption Profs Peter Steenkiste & Justine Sherry • Error detection and recovery • Flow control • Loss recovery Fall 2019 https://computer-networks.github.io/fa19/ Error Detection Error Coding • EDC= Error Detection and Correction bits (redundancy) • Transmission may introduce errors into a message. • D = Data protected by error checking, may include header fields • Error detection not 100% reliable! Received “digital signal” is different from that transmitted • • Protocol may miss some errors, but this is rare (more on this later) Single bit errors versus burst errors • • Larger EDC field yields better detection and correction • Detection: Requires a convention that some messages are invalid • Hence requires extra bits • An (n,k) code has codewords of n bits with k data bits and r = (n-k) redundant • check bits • Correction Forward error correction: many related code words map to the same data word • Detect errors and retry transmission • 1

  2. 11/13/2019 Internet Checksum Parity Checking • Goal: detect “errors” (e.g., flipped bits) in transmitted segment • Must be easy to computer in software Sender Receiver Single Bit Parity: Compute checksum of • Treat segment contents as Detect single bit errors • received segment sequence of 16-bit integers Check if computed checksum • equals checksum field value: • Checksum: addition (1’s complement sum) of NO - error detected • segment contents YES - no error detected. • • Sender puts checksum But maybe errors nonethless? value into checksum field in header 6 Basic Concept: Hamming Distance Cyclic Redundancy Codes (CRC) • Widely used codes that have good error detection properties. • Hamming distance of two bit strings = 1 0 1 1 0 HD=2 1 1 0 1 0 number of bit positions in which they • Can catch many error combinations with a small number of redundant bits differ. HD=3 • Based on division of polynomials. • If the valid words of a code have • Errors can be viewed as adding terms to the polynomial minimum Hamming distance D, then D- 1 bit errors can be detected. • Should be unlikely that the division will still work • Can be implemented very efficiently in hardware • If the valid words of a code have minimum Hamming distance D, then • Examples: [(D-1)/2] bit errors can be corrected. • CRC-32: Ethernet • CRC-8, CRC-10, CRC-32: ATM 2

  3. 11/13/2019 Error Correcting Codes Take-away: Encoding and Modulation • More aggressive coding can allow the receiver to (locally) recover Encoding and modulation work together • from errors – Forward Error Correction (FEC) Must generate a signal that works well for the receiver – has good electrical • • Details outside of scope properties Must be efficient with respect to spectrum use • Informally: if a received code is close to one “red” dot, and far away • from all other “red” dots, it is very likely the nearby red dot Can shift some of the burden between the two layers • Tradeoff is figured out by electrical engineers • With very high probability • Maintaining good electrical properties • • FEC is very widely used in wireless networks Spectrum efficient modulation requires more encoding • • Bit errors are much more common For example: 4B/5B encoding • • Example: Hybrid ARQ (HARQ) combines ARQ and FEC used in LTE Error recovery • • ARQ – automatic repeat request Aggressive modulation needs stronger coding • What is Used in Practice? Outline • No flow or error control. • E.g. regular Ethernet, just uses CRC for error detection • Datalink architectures • Flow control only • Ethernet • E.g. Gigabit Ethernet • Wireless networking • Flow and error control. • Wireless Ethernet • E.g. X.25 (older connection-based service at 64 Kbs that guarantees reliable in order delivery of data) • Aloha • 802.11 family • Flow and error control solutions also used in higher layer protocols • Cellular • E.g., TCP for end-to-end flow and error control 14 3

  4. 11/13/2019 Datalink MAC Architectures Datalink Classification • Media Access control (MAC): who gets to send packet next? Datalink • Switches connected by point-to-point links -- store-and-forward. Used in WAN, LAN, and for home connections Switch-based Multiple Access • Conceptually similar to “routing” • But at the datalink instead of network layer • Virtual Packet Scheduled Random • Multiple access networks. Circuits Switching Access Access ATM, Switched Cellular, Ethernet, Multiple hosts are sharing the same • transmission medium framerelay LANs FDDI, 802.11 802.11, Aloha Used in LANs and wireless • Access control is distributed and much more • complex Scheduled Access MACs Random Access Protocols Central • Reservation systems Controller • When node has packet to send • Central controller • Transmit at full channel data rate R • No a priori coordination among nodes • Distributed algorithm, e.g. using reservation bits in frame • Two or more transmitting nodes  “collision” • Random access MAC protocol specifies: • Polling: controller polls each nodes • How to detect collisions • Token ring: token travels around ring 1 • How to recover from collisions (e.g., via delayed retransmissions) 1 and allows nodes to send one packet • Examples of random access MAC protocols: • Distributer version of polling 4 2 • CSMA and CSMA/CD 4 2 • FDDI, … • Wireless protocols 3 2 18 19 4

  5. 11/13/2019 Problem: Sharing a Wire Ethernet MAC Features – CSMA/CD • Carrier Sense: listen before you talk yak yak… A B C D E • Cheap way avoiding collision with active transmission • Assumes all nodes can hear each other • Collision Detection during transmission • Just send a packet when you are ready • Listen while transmitting • Does not work well: many collisions! More on this later • If you notice interference  assume collision • Natural scheme – listen before you talk … • Abort transmission immediately – saves time, reduces penalty • Works well in practice of a collision • A cheap form of coordination • Means a sender can identify competing transmissions while transmitting • But sometimes this breaks down • Why? How do we fix/prevent this? 20 21 Collision Detection: Ethernet MAC – CSMA/CD Depends on Packet Length • Carrier Sense Multiple Access/Collision Detection • Packets must be long enough to guarantee all nodes observe Packet? collision No • In this example: Sense Detect Send Carrier Collision • A can decode packets Yes • C observes collision Discard Jam channel Packet • B and D cannot sense collision b=CalcBackoff(); attempts < 16 wait(b); • Rule: Min packet length > 2x max attempts++; prop delay attempts == 16 22 25 5

  6. 11/13/2019 Collision Detection: Scaling Ethernet Depends on the Wire Length What about scaling? 10Mbps, 100Mbps, 1Gbps, ... • • Wires must be short enough to Oops: packets get shorter (in time – msec) • Use a combination of reducing network diameter and increasing minimum minimum guarantee all nodes observe • packet size collision Reality check: 40 Gbps is 4000 times 10 Mbps • • In this example 10 Mbps: 2.5 km and 64 bytes -> silly • Solution: switched Ethernet – see early lecture • B and C will see collision • What about a maximum packet size? • • A and D cannot see collision Needed to prevent node from hogging the network • • Min packet length > 2x max prop 1500 bytes in Ethernet = 1.2 msec on original Ethernet • delay For 40 Gps -> 0.3 microsec -> silly and inefficient • 26 28 Things to Remember Outline • Trends from CSMA networks to switched networks • Need for more capacity • Ethernet • Low cost and higher line rate • Emphasis on low configuration and management complexity and cost • Wireless networking intro • Fully distributed path selection • Trends are towards “Software Defined Networks” • Spectrum discussion • Network is managed by a centralized controller • Wireless Ethernet • Allows for the implementation of richer policies • Aloha • Easier to manage centrally • Already common in data centers 29 30 6

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend