1 Chapter 2: Direct Link Networks (Part One) Dr. Rocky K. C. Chang 30 January 2004.

Slides:



Advertisements
Similar presentations
Lecture 3, 1Spring 2003, COM1337/3501CCN: Direct Link Networks Direct Link Networks Textbook: Computer Networks: A Systems Approach, L. Peterson, B. Davie,
Advertisements

Reliability & Channel Coding
1 Link Layer: Motivation 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”
Spring 2002CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
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.
The Data Link Layer Chapter 3. Position of the data-link layer.
EE 122: Error detection and reliable transmission Ion Stoica September 16, 2002.
1 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
The OSI Reference Model
1 Hardware Building Blocks Five Issues –Encoding –Framing –Error Detection –Reliable delivery –Access Mediation Direct Link Networks.
Chapter 5 Link Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 20.
Spring 2004 EE4272 Direct Link Networks (I) Hardware Building Blocks (nodes & links) 5 Issues before Exchanging Packets  Encoding  Framing  Error Detection.
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.
Error Detection and Reliable Transmission EECS 122: Lecture 24 Department of Electrical Engineering and Computer Sciences University of California Berkeley.
CompSci 356: Computer Network Architectures Lecture 4: Link layer: Encoding, Framing, and Error Detection Xiaowei Yang
Introduction 1 Lecture 23 Link Layer (Error Detection/Correction) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Part 1: Overview of the Data Link layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose,
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.
CSCI-1680 Physical Layer Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
CSE331: Introduction to Networks and Security Lecture 3 Fall 2002.
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.
Error Coding Transmission process may introduce errors into a message.  Single bit errors versus burst errors Detection:  Requires a convention that.
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.
Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
Chapter 5 Link Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Link Layer introduction,
1 CHAPTER 2 HARDWARE BUILDING BLOCK ENCODING FRAMING ERROR DETECTION.
Link Layer Dr. Mozafar Bag-Mohammadi Ilam University.
CSCI-1680 Physical Layer Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
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.
Spring 2001CS 5851 Outline Building Blocks Shannon’s Theorem Encoding 11. Physical Layer.
Computer Communication & Networks Lecture 9 Datalink Layer: Error Detection Waleed Ejaz
9-Jan-164/598N: Computer Networks Overview Performance metrics - Section 1.5 Direct link networks –Hardware building blocks - Section 2.1 –Encoding - Section.
LAYER TWO AND BELOW 1 Rocky K. C. Chang 13 September 2010.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Lecture 6: Datalink layer problems Slides used.
1 Hardware Building Blocks Five Issues –Encoding –Framing –Error Detection –Reliable delivery –Access Media Direct Link Networks.
1 Point-to-Point Links: Encoding Encoding: Section 2.2 (Section 2.1 read on your own)
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.
CS 457 – Lecture 3 Link Layer Protocols Fall 2011.
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.
Advanced Computer Networks
Part III Datalink Layer 10.
2. Getting connected (part 1)
Point-to-Point Links Outline Encoding Framing Error Detection
Ion Stoica September 6, 2001 EE 122: Lecture 4 Ion Stoica September 6, 2001.
Error Detection Neil Tang 9/26/2008
Fundamentals of Computer Networks
Hardware Building Blocks
Dr. Mozafar Bag-Mohammadi Ilam University
Home work project #1 Develop and fully debug your program on the Cushing 208 lab. Machines - planet lab machines may not have good development environment.
Data Link Layer: Overview; Error Detection
Error detection: Outline
EECS 122: EE122: Error Detection and Reliable Transmission
Data Link Layer. Position of the data-link layer.
Presentation transcript:

1 Chapter 2: Direct Link Networks (Part One) Dr. Rocky K. C. Chang 30 January 2004

2 0. Summary of the last lecture Classification of computer networks Four basic requirements for designing a computer network Network architectures Network programming

3 1. Overview of this chapter The lowest two layers: Physical layer Datalink layer Provide a virtual (unreliable) bit pipe to above Provide a virtual link for (unreliable) packets to above

4 1. Overview of this lecture Direct link networks: point-to-point links or shared media Five problems: –Bit synchronization –Frame synchronization –Error detection –Reliable link service –Multiple access control problem (for shared media only)

5 2. Some networking hardware Network nodes –Switches and routers (highly specialized hardware) –Hosts (general-purpose computers): CPU Cache Memory I/O bus Network adaptor (To network)

6 2.1 Network hosts Network adaptors and device drivers –All the networking functionality described in this chapter, except ARQ schemes, is implemented in the network adaptor. –The device driver interfaces between the network adaptor and the OS. Unparalleled performance improvement of memory latency and processor speed –A network host runs at memory speeds, not processor speeds. Take a look at a posted message titled “Solving the Memory Wall Workshop” in the discussion forum.

7 2.2 Network links A network link is a physical medium carrying signals in the form of electromagnetic waves. Cabling: –Local links (office, lab, campus): Twisted pairs, coaxial cables, and optical fibers –Leased links from carriers: T1, T3; and OC-N, where N = 1, 3, 9, 12, 18, 24, …. –Links to residential home: POTS, ISDN, xDSL, CATV, ATM, etc. –Wireless: radio, microwave, infrared, light; small area, cellular network, satellite network.

8 2.2 Network links Generally, a packet may go through different types of network link. –The slowest link determines the end-to-end throughput. Bandwidth –Narrowband vs. broadband (ISDN vs. B-ISDN) –Increase bandwidth either by operating in a higher frequency band or increase the signal-to-noise ratio –Upper bound on the link’s data rate: B  log 2 (1+S/N)

9 2.2 Network links Bluetooth is based on a global radio-frequency (RF) standard, operating on the 2.4 GHz ISM band. 3G mobile phone: 2,500MHz-2,690MHz band

Network links Sending binary bits onto a physical link (bit- serial transmission): –Encoding the bits before transmission for the purpose of bit synchronization to be discussed later) –Modulation: a process by which a property or a parameter (frequency, amplitude, phase) of a signal is varied in proportion to a second signal. For encoding binary data onto electromagnetic signals –Signals are carried in the form of electromagnetic waves.

11 3. The five problems Assume modulation schemes given. Five problems: –Bit synchronization (need additional encoding data, such as from Manchester encoding, to delineate bits) –Frame synchronization (need additional protocols to delineate frames) –Error detection (need additional algorithms to detect errors, if occurred) –Reliable link service (need additional schemes to recover from errors) –Multiple access control problem (for shared media only; need additional protocols to share the medium)

An Ethernet network adaptor LAN controllerManchester codecTransceiver System bus interface MAC TX FIFO RX FIFO TX RX Data out Data in Control in Physical signalling Medium attach- ment unit HOST BUSHOST BUS NETWORKNETWORK

13 4. Problem 1: Bit synchronization (BS) Problem: How does a receiver synchronize with a sender, so that bits can be decoded correctly from the signals? Signalling component Signal Bits Node Adaptor

BS: four encoding methods Assume that two discrete signals: high and low are used to encode 0s and 1s. Solutions: NRZ, NRZI, Manchester, and 4B/5B: Bits NRZ Clock Manchester NRZI

BS: NRZ and NRZI Non-return to zero (NRZ) –0: a low signal; 1: a high signal –Problem: A consecutive of 0s or 1s causes baseline wander, as well as not providing enough signal transitions for bit synchronization. Non-return to zero inverted (NRZI) –1: making a transition from the current signal; 0: staying at the current signal. –Problem: The problem of having consecutive 0s remains.

BS: Manchester encoding Manchester encoding –0: low-to-high transition; 1: high-to-low transition (the result of exclusive-OR of the NRZ-encoded data with the clock) –Advantage: provide enough signal transitions for bit synchronization. –Disadvantage: double the rate of signal transitions. –Baud rate is the rate at which the signal changes. In this case, baud rate is double of data rate.

BS: 4B/5B encoding 4B/5B encoding –Insert a bit to every four bits of data, such that consecutive 0s or 1s will be broken up. –(breaking up consecutive 0s) Each code must have no more than one leading 0 and no more than two trailing 0s. E.g., and are not used. As a result, the encoded data would not contain more than 3 consecutive 0s. See Table 2.5 in the text for the encoding. –(breaking up consecutive 1s) The resulting 5-bits are transmitted using the NRZI encoding.

BS: 4B/5B encoding Data 5-bit codes

19 5. Problem 2: Frame synchronization (FS) Problem: Given that a receiver can synchronize bits sent by a sender, how does the receiver recognize bits belonging to the same frame? Frames Signalling component Signal Bits Node Adaptor

FS: IP over Ethernet For example, when an IP datagram is handed down to an Ethernet network adaptor, the IP datagram is sent out in an Ethernet frame. CRC Dest address Src address TypeData Type 0800 IP datagram

Several solutions Byte-oriented protocols (e.g. PPP) –Data unit in terms of bytes (ASCII, EBCDIC) –Sentinel approach vs. byte counting approach Bit-oriented protocols (e.g. HDLC, Ethernet) –Sentinel approach Clock-based framing (SONET) –It addresses both the framing and encoding problems.

Byte-oriented protocols Sentinel approach to framing –A special character (0x7e) serves as a start-of-text character (flag field) –Character stuffing: escape this special character in the data by prepending it with an escape character 0x7d. 0x7e escaped to 0x7d, 0x5e 0x7d escaped to 0x7d, 0x5d

Byte-oriented protocols PPP’s frame structure: CRC Flag 7E Addr FF Control 03 Information IP datagram Protocol Flag 7E Protocol 0021

Byte-oriented protocols Byte-counting approach to framing, e.g. DECNET’s DDCMP –SYN character serves as a synchronization character. –The COUNT field specifies how many bytes are contained in the frame.

Bit-oriented protocols For example, High-Level Data Link Control (HDLC) protocol. –A special bit sequence is transmitted when the link is idle. –When this sequence appears in the data, it is escaped using bit stuffing. HeaderBody CRC Beginning sequence Ending sequence

Bit-oriented protocols: bit stuffing On sending side: –Except for transmitting the special sequence, 0 is inserted after 5 consecutive 1s. On receiving side: –If five consecutive 1s arrive, if the next bit is 0, it must be a stuffed bit. It is therefore removed. If the next bit is 1, –If the next bit is 0, then the sequence indicates the end of the frame. –If the next bit is 1, there must be an error, and the whole frame is discarded.

Bit-oriented protocols: bit stuffing For example, –Original bit stream: –After bit stuffing by source: –After bit de-stuffing by receiver: What happens if transmission errors –occurred to the stuffed bits? –occurred to the nonstuffed bits?

28 6. Problem 3: Error detection (ED) Transmission errors do occur, with different probabilities in different media. Two general approaches: –Error correction code (forward error correction) –Error detection code + an error correction mechanism when errors are detected. –Insert redundancy for error correction or detection. Common error detection methods: –Cyclic redundancy check (CRC) –Checksum

ED: error detection codes Error detection codes are usually inserted in more than one layer, e.g. –HTTP –TCP (16-bit checksum for the TCP header and data) –IPv4 (16-bit checksum for the IP header) –PPP/Ethernet (CRC-16, CRC-32 for the whole frame) Why don’t we just have CRCs on the datalink layer?

ED: two-dimensional parity The 2-dim parity catches all 1-, 2-, and 3-bit errors, and most 4-bit errors Parity bits Parity byte Data

ED: Checksum Add up all the words that are transmitted and then transmit the result of that sum. –If any transmitted data, including the checksum itself, is corrupted, then the results will not match. Internet checksum: –A sender add 16-bit words using ones complement arithmetic, and then take ones complement of the result. The result is stored in the checksum field. –A receiver performs 16-bit checksum. If no error, the checksum should give all 1s.

ED: Checksum Ones complement arithmetic: –A negative integer -x is represented as the complement of x. –A carryout from the most significant bit needs to be added to the result. For example: 4-bit word checksum –Data: , and its checksum: –Data sent: –Receiver adds all the data sent in 4-bit word in ones complement, which gives 1111.

ED: Checksum Advantages: –Use a relatively small number of bits. –Easy to implement in software. Disadvantages: –Not a strong error detection algorithm, as compared with CRC

ED: cyclic redundancy check (CRC) Think of an (n+1)-bit message, M(x), as a polynomial of degree n, e.g. – as –1  x  x  x  x  x  x  x  x 0. Given a divisor polynomial of order k, C(x), find a code word of k bits, such that M(x) concatenated with the code word is divisible by C(x). –P(x) is a concatenation of M(x) and the code word.

ED: cyclic redundancy check For example, C(x) = 1  x  x  x  x 0. –The computed code word is 101. –P(x) is given by concatenated with 101, or 1  x  x  x  x  x  x  x  x  x  x  x 0. –One may verify that P(x) is divisible by C(x), i.e. 0 remainder. –Errors can be detected when the remainder is not zero when a receiver divides P(x) by C(x).

ED: cyclic redundancy check To obtain the code word, –Divide 1  x  x  x  x  x  x  x  x  x  x  x 0 by 1  x  x  x  x 0. –Subtraction is performed by an exclusive-OR operation (XOR). –The result is a 3-bit remainder, one bit less than the divisor polynomial. –It can be implemented efficiently in hardware.

ED: cyclic redundancy check Generator Message Remainder

ED: cyclic redundancy check Choice of the divisor polynomial: –Express a corrupted message received by a receiver as P(x) + E(x), where E(x) is an error polynomial. –Errors go undetected if E(x) is divisible by C(x). For example, the CRC can catch –all single-bit errors if the x k and x 0 terms in C(x) have nonzero coefficients, and –any odd number of errors if C(x) contains the factor (x+1). Refer to p.102 of the text for common C(x)s. –CRC-8/10/12/16/32