CSE331: Introduction to Networks and Security Lecture 3 Fall 2002.

Slides:



Advertisements
Similar presentations
5-1 Data Link Layer l Objective: to achieve reliable and efficient communication between 2 adjacent machines l Data link layer design issues n services.
Advertisements

Lecture 12 Layer 2 – Data Link Layer Protocols
CSE 461: Error Detection and Correction. Next Topic  Error detection and correction  Focus: How do we detect and correct messages that are garbled during.
Reliability & Channel Coding
Spring 2002CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
CSCI 4550/8556 Computer Networks Comer, Chapter 7: Packets, Frames, And Error Detection.
Fundamentals of Computer Networks ECE 478/578 Lecture #3: Encoding and Framing Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
PART III DATA LINK LAYER. Position of the Data-Link Layer.
1 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
The OSI Reference Model
Chapter 2 : Direct Link Networks (Continued). So far... Modulation and Encoding Link layer protocols Error Detection -- Parity Check.
Spring 2003CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
CS 164: Slide Set 3: Chapter 2 Direct Link Networks.
Adapted from Tanenbaum's Slides for Computer Networking, 4e The Data Link Layer Chapter 3.
Data link layer: services
CS 640: Introduction to Computer Networks Aditya Akella Lecture 5 - Encoding and Data Link Basics.
EE 122: Encoding And Framing Ion Stoica September 9, 2002.
COM342 Networks and Data Communications
1 Data Link Layer Lecture 20 Imran Ahmed University of Management & Technology.
PART III DATA LINK LAYER. Position of the Data-Link Layer.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
Error Coding Transmission process may introduce errors into a message.  Single bit errors versus burst errors Detection:  Requires a convention that.
Part 2: Packet Transmission Packets, frames Local area networks (LANs) Wide area networks (LANs) Hardware addresses Bridges and switches Routing and protocols.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
CHAPTER 2 HARDWARE BUILDING BLOCK ENCODING FRAMING ERROR DETECTION.
Advanced Computer Networks Chapter 2: Direct Link Networks.
Lecture 6: Framing and Error Detection-Data Link Layer Functions
27-Oct-15Computer Networks1 Outline Chapter 2: Direct Link Networks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
Data and Computer Communications by William Stallings Eighth Edition Digital Data Communications Techniques Digital Data Communications Techniques Click.
Layer Two Data Link Layer Collects bits from layer 1 and organizes into frames Passes bits that make up frames to layer 1 for transmission Concerned with.
Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
10/27/ Data Link Layer - Lin 1 CPET/ECET Data Link Layer Data Communications and Networking Fall 2004 Professor Paul I-Hai Lin Electrical.
1 CHAPTER 2 HARDWARE BUILDING BLOCK ENCODING FRAMING ERROR DETECTION.
Link Layer Dr. Mozafar Bag-Mohammadi Ilam University.
Computer Science Division
Computer Networks Lecture 2: Data Link Based on slides from D. Choffnes Northeastern U. and P. Gill from StonyBrook University Revised Autumn 2015 by S.
Computer Communication & Networks Lecture 9 Datalink Layer: Error Detection Waleed Ejaz
CSCI 465 D ata Communications and Networks Lecture 9 Martin van Bommel CSCI 465 Data Communications & Networks 1.
Error Detection and Correction
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 PART III: DATA LINK LAYER ERROR DETECTION AND CORRECTION 7.1 Chapter 10.
Error Correction and Flow Control Martin Weiss. Slide 2 Objectives of this Meeting u Describe different flow control techniques u Describe the major error.
1 Chapter 2: Direct Link Networks (Part One) Dr. Rocky K. C. Chang 30 January 2004.
Network Layer4-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction m sharing.
Data Link Layer. Link Layer The data unit to be transmited at the link layer is called a frame. Why link layer? How can it know where a frame begins and.
Chi-Cheng Lin, Winona State University CS412 Introduction to Computer Networking & Telecommunication Error Correction/Detection.
CS4470 Computer Networking Protocols
Simple Parity Check The simplest form of error detection is the parity check used with ASCII codes, originally on asynchronous modem links Each 7 bit ASCII.
Getting Connected (Chapter 2 Part 1)
The University of Adelaide, School of Computer Science
Data Link Networks Hardware Building Blocks Nodes & Links CS380
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
Data Link Layer.
Communication Networks: Technology & Protocols
Advanced Computer Networks
CIS 321 Data Communications & Networking
Part III Datalink Layer 10.
Introduction to Information Technologies
Ion Stoica September 6, 2001 EE 122: Lecture 4 Ion Stoica September 6, 2001.
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
Error Detection Neil Tang 9/26/2008
Data Link Layer Objective: to achieve reliable and efficient communication between 2 adjacent machines Data link layer design issues services provided.
COMPUTER NETWORKS CS610 Lecture-5 Hammad Khalid Khan.
Fundamentals of Computer Networks
Hardware Building Blocks
CSE 461: Framing, Error Detection and Correction
Dr. Mozafar Bag-Mohammadi Ilam University
EECS 122: EE122: Error Detection and Reliable Transmission
Data Link Layer. Position of the data-link layer.
Presentation transcript:

CSE331: Introduction to Networks and Security Lecture 3 Fall 2002

CSE331 Fall Announcements HW1 is due Friday Aditya’s office hours: –Pender 126 –Monday 2:00pm-3:00pm –Friday 1:00pm-2:00pm

CSE331 Fall Recap Network architectures –Protocol Stack –OSI standard “7 layer” stack Physical encodings –NRZ: Non-return to zero (high = 1, low = 0) –NRZI: Non-return to zero inverted (transition if 1) –Manchester: XOR clock and NRZ –4B/5B: Encode 4 bits using 5, send via NRZI

CSE331 Fall Today Framing at the data-link layer –Point-to-point protocols Error Correction/Detection

CSE331 Fall Framing Need a way to send blocks of data. –How does the network adapter detect when the sequence begins and ends? Frames are link layer unit of data transmission –Byte oriented vs. Bit oriented –Point-to-point (e.g. PPP) vs. Multiple access (Ethernet)

CSE331 Fall Byte-oriented Protocols View each frame as a sequence of bytes BISYNC –Binary Synchronous Communication protocol –Developed by IBM in late 1960’s DDCMP –Digital Data Communication Message Protocol –Used in Digital Equipment Corporation’s DECNET Primary question: which bytes are in the frame?

CSE331 Fall Sentinel Approach SYN – synchronization SOH – start of header STX – start of text ETX – end of text CRC – cyclic redundancy check SYN SOHHEADERSTXBODYETXCRC BISYNC frame format Sentinels

CSE331 Fall Character Stuffing What happens if ETX code occurs in BODY? Use an “escape character” DLE – Data-link-escape Used just as \ in C-style strings “quotes in \”quotes\”” “slash is \\”

CSE331 Fall (PPP) Point-to-Point Protocol Used for dial-up connections (modem) Flag – sentinel Protocol – demux identifies high-level protocol such as IP or LCP Payload size is negotiated –1500 bytes default –Link Control Protocol (LCP) FlagAddrCtrlProtocolPayloadChecksumFlag PPP frame format 16

CSE331 Fall Byte-counting Approach Instead of sentinels, include byte count in frame. What happens if count is corrupted? SYN ClassCountBodyHeaderCRC DDCMP Frame Format

CSE331 Fall Bit-oriented Protocols Frames are just sequences of bits Could be ASCII Could be pixels from an image HDLC (High-level Data Link Control) –Begin and ending = –Uses bit stuffing: prefix five 1’s with a 0 BeginHeaderBodyCRCEnding 8816 HDLC frame format 16

CSE331 Fall Problem: Error Detection & Correction Bit errors may be introduced into frames –Electrical interference –Thermal noise Could flip one bit or a few bits independently Could zero-out or flip a sequence of bits (burst error) How do you detect an error? What do you do once you find one?

CSE331 Fall Error Detection General principal: Introduce redundancy Trivial example: send two copies –High overheads: 2n bits to send n –Won’t detect errors that corrupt same bits in both copies How can we do better? –Minimize overhead –Detect many errors –General subject: error detecting codes

CSE331 Fall Simple Error Detection Schemes Parity –7 bits of data –8 th bit is sum of first seven bits mod 2 –Overhead: 8n bits to send 7n –Detects: any odd number of bit errors Internet Checksum algorithm –Add up the words of the message, transmit sum –16 bit ones-complement addition –Overhead: 16 bits to send n –Does not detect all two bit errors

CSE331 Fall Cyclic Redundancy Check Six standardized versions Used in link-level protocols –CRC-32 used by Ethernet, 802.5, PKzip, … –CRC-CCITT used by HDLC –CRC-8, CRC-10, CRC-32 used by ATM Better than parity or checksum –(e.g. 32 bits to send 12000) Simple to implement

CSE331 Fall Cyclic Redundancy Check (CRC) Consider (n+1)-bit message as a n-degree polynomial –Polynomial arithmetic modulo 2 –Bit values of message are coefficients –Message = –Polynomial M(z) = 1 x z x z x z x z x z x z x z = z 7 + z 4 + z 3 + z 1

CSE331 Fall Cyclic Redundancy Check Sender and receiver agree on a divisor polynomial C(z) of degree k –Example k = 3 –C(z) = z 3 + z –Coefficients are 1101 Error correction bits are remainder of (M(z) x z k ) divided by C(z) This yields a n+k bit transmission polynomial P(z) that is exactly divisible by C(z)

CSE331 Fall Example CRC Calculation Multiplication by z 3 Original message: M(z) Divisor Polynomial: C(z) … 101 Remainder … …

CSE331 Fall Example CRC calculuation Transmitted message Original message: M(z) Remainder Recipient checks that C(z) evenly divides the received message.

CSE331 Fall CRC Error Detection Must choose a good divisor C(z) –There are many standard choices: CRC-8, CRC-10, CRC-12, CRC-16, CRC-32 –CRC-32: 0x04C11DB7 All 1-bit errors as long as z k and z 0 coefficients are 1 All 2-bit errors as long as C(z) has three terms Any odd number of errors if (z+1) divides C(z) Any burst errors of length  k

CSE331 Fall CRC Implementations Easy to implement in hardware –Base 2 subtraction is XOR –Simple k-bit shift register with XOR gates inserted before 1’s in C(z) polynomial –Message is shifted in, registers fill with remainder Example C(z) =  r0r0 r1r1 r2r2 

CSE331 Fall Error Correction Codes Redundant information can be used to correct some errors Typically requires more redundancy Tradeoffs: –Error detection requires retransmission –Error correction sends more bits all the time Forward Error Correction is useful: –When errors are likely (e.g. wireless network) –When latency is too high for retransmission (e.g. satellite link)