ECE 4450:427/527 - Computer Networks Spring 2015

Slides:



Advertisements
Similar presentations
CSCI-1680 Physical Layer Link Layer I Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
Advertisements

Synchronous Links/Networks Modems are asynchronous - penalized by start bits and stop bits on each character (and dead time) Synchronous Networks recover.
1 Chapter 2 Agenda Announcements / updates Gayle Laakman McDowell, 10/11, 4:30pm, UW2-005 GUIs / IDEs for remotely accessing uw1-320-lab Other references.
Lecture 3, 1Spring 2003, COM1337/3501CCN: Direct Link Networks Direct Link Networks Textbook: Computer Networks: A Systems Approach, L. Peterson, B. Davie,
Chapter 2 Fundamentals of Data and Signals
Chapter 7 Data Link Layer
CSCD 218 : DATA COMMUNICATIONS AND NETWORKING 1
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.
1 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
The OSI Reference Model
Spring 2004 EE4272 Direct Link Networks (I) Hardware Building Blocks (nodes & links) 5 Issues before Exchanging Packets  Encoding  Framing  Error Detection.
Network Data Organizational Communications and Technologies Prithvi N. Rao Carnegie Mellon University Web:
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.
Framing and Encoding EECS 122: Lecture 26 Department of Electrical Engineering and Computer Sciences University of California Berkeley.
Reliability and Channel Coding
Katz, Stoica F04 EE122: Encoding & Framing November 17, 2003.
Introduction 1 Lecture 23 Link Layer (Error Detection/Correction) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
Review: The application layer. –Network Applications see the network as the abstract provided by the transport layer: Logical full mesh among network end-points.
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.
Introduction to Networks CS587x Lecture 1 Department of Computer Science Iowa State University.
Network Technologies Chapter 2. Approaches to Network Communication Connection-Oriented –Circuit-switched –A dedicated connection (circuit) is formed.
ECE 4450:427/527 - Computer Networks Spring 2015 Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 2: Overview of Computer Network.
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.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 13.
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.
Hardware Building Blocks and Encoding COM211 Communications and Networks CDA College Theodoros Christophides
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.
9-Jan-164/598N: Computer Networks Overview Performance metrics - Section 1.5 Direct link networks –Hardware building blocks - Section 2.1 –Encoding - Section.
Physical Layer Issues and Methods Outline Physical Layer Overview Non-Return to Zero Manchester 4B/5B.
Wireless and Mobile Networks (ELEC6219) Session 3: Theories of Data Communications. Data Link Layer. Adriana Wilde and Jeff Reeve 22 January 2015.
Point-to-Point Links: Framing
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Lecture 6: Datalink layer problems Slides used.
Physical Layer Issues and Methods Outline Physical Layer Ethernet Technology Physical Layer Encoding Final Exam Review - ??
1 Chapter 2: Direct Link Networks (Part One) Dr. Rocky K. C. Chang 30 January 2004.
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.
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.
CSE331: Introduction to Networks and Security Lecture 2 Fall 2002.
Lect-10-2: Physical Layer Computer Networks : An Introduction to Computer Networks Handout #12: Physical Layer Signaling, Coding and Clocking.
CS 457 – Lecture 3 Link Layer Protocols Fall 2011.
Getting Connected (Chapter 2 Part 1)
The University of Adelaide, School of Computer Science
Data Link Networks Hardware Building Blocks Nodes & Links CS380
Advanced Computer Networks
CSCI-1680 Physical Layer Link Layer I
Ken Gunnells, Ph.D. - Networking Paul Crigler - Programming
Data Link Issues Relates to Lab 2.
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.
Fundamentals of Computer Networks
Hardware Building Blocks
CSCI-1680 Physical Layer Link Layer I
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
EECS 122: EE122: Error Detection and Reliable Transmission
Presentation transcript:

ECE 4450:427/527 - Computer Networks Spring 2015 Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 5.1: Link Layer Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Some Discussions Previously, we saw a network consisting of LINKS interconnecting NODES Simplest network: A link connects two nodes Even though it looks trivial, link is a fundamental aspect of network: one of the first fundamental problems we face Next few lectures focus on LINK LAYER Recall: Our approach is bottom up. How about Physical Layer? Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Link Layer: Five Common Problems Basic problem: you can’t just send datagrams over the link! We first consider how to encode bits into the signal at the source and recover bits at the receiving node Once it is possible to transmit bits, we need to figure out how to package these bits into FRAME Assume each node is able to recognize the collections of bits making up a frame, the third problem is to determine if those bits are in error: Error Detection and Correction If frames arriving at destination contain errors, how to recover from such losses: ARQ Final problem related to multiple-access link: how mediate access to a shared link so that all nodes have a chance to transmit: We focus on Ethernet Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Link Layer: Outline Physical Medium and FIVE additional functions/services in Link Layer: How to 1) encoding bits onto medium so that they can be understood by receiving node With packed-switch, need to consider block of data: 2) Framing Transmission of Frames: corrupted errors: 3) Error detection/correction Reliable delivery: 4) Automatic Repeat reQuest (ARQ). A link shared by multiple nodes: Media access control problem Introduction of Carrier Sense Multiple Access (CSMA) network, e.g., Ethernet Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Link Layer Examples of Link Layer Protocols: Ethernet, WiFi, token ring, LTE, 3G etc Where is Link Layer Implemented? In each node Most parts in a Network Adaptor or a Network Interface Card (NIC): Ethernet card, PCMCI card, 802.11 card Combination of hardware, software, firmware Note: NIC also implements Physical Layer Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Link Layer sending side: receiving side encapsulates datagram in frame controller controller sending host receiving host datagram frame sending side: encapsulates datagram in frame adds error checking bits, flow control, etc. receiving side looks for errors, flow control, etc extracts datagram, passes to upper layer at receiving side Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

What is Communications? Two nodes connected by a link and the ultimate objective is to send information from one to the other “The fundamental problem of communication is that of reproducing at one point either exactly or approximately a message selected at another point.” (Claude Shannon 1948) Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Communications System Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Physical Medium & Link Capacity Signals travel through the medium/channel carrying binary bits Maximum bits carried reliably – Link capacity? Shannon theorem: the upper bound to the capacity of a link in terms of bits per second (bps) as a function of signal-to-noise ratio (S/N) of the link measured in decibels (dB): C = W log2(1+S/N) W: Available bandwidth of link (Hz) Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Link Capacity: Example C = W log2(1+S/N) What is W for telephone line? What is typical S/N Can signal be weaker than noise? How to get higher C? Higher W, higher C? Higher S/N, higher C? Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Link Capacity as Function of W Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Link All practical links rely on some sort of electromagnetic radiation propagating through a medium or, in some cases, through free space One way to characterize links, then, is by the medium they use Typically copper wire in some form (as in Digital Subscriber Line (DSL) and coaxial cable), Optical fiber (as in both commercial fiber-to-the home services and many long-distance links in the Internet’s backbone), or Air/free space (for wireless links) Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Link Another important link characteristic is the frequency Measured in hertz, with which the electromagnetic waves oscillate Distance between the adjacent pair of maxima or minima of a wave measured in meters is called wavelength Speed of light divided by frequency gives the wavelength. Frequency on a copper cable range from 300Hz to 3300Hz; Wavelength for 300Hz wave through copper is speed of light on a copper / frequency 2/3 x 3 x 108 /300 = 667 x 103 meters. Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Link Electromagnetic spectrum Dr. Nghi Tran (ECE-University of Akron)

Links Common services available to connect your home Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

1) Encoding Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Encoding Now we start with the first service: Encoding – How to convert binary bits to signal Not focus on the entire modulation. Instead, we assume the simplest situation: working with two discrete signals: high and low In practice, it corresponds to two different voltages or two different power levels What is an obvious way to convert? Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Encoding NRZ (Non-Return to Zero) encoding of a bit stream: Signals travel between signaling components; bits flow between adaptors NRZ (Non-Return to Zero) encoding of a bit stream: Low signal represents a 0, high signal represents a 1 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

NRZ: Problems Problem: Long periods of silence (0s) or high signals (1s) are possible Baseline wander Clock recovery Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

NRZ Problem: Baseline Wander The receiver keeps an average of the signals it has seen so far Uses the average to distinguish between low and high signal When a signal is significantly low than the average, it is 0, else it is 1 Too many consecutive 0’s and 1’s cause this average to change, making it difficult to detect Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

NRZ Problem: Clock Recovery Frequent transition from high to low or vice versa are necessary to enable clock recovery Both the sending and decoding process is driven by a clock Every clock cycle, the sender transmits a bit and the receiver recovers a bit The sender and receiver have to be precisely synchronized Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Other Coding Scheme: NRZI Non Return to Zero Inverted Sender makes a transition from the current signal to encode 1 and stay at the current signal to encode 0: transition at a clock boundary Solves for consecutive 1’s: Used in USB with bit stuffing Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Other Coding Scheme: Manchester Merging the clock with signal by transmitting Ex-OR of the NRZ encoded data and the clock In Manchester encoding (used widely in 802.3) 0: low high transition 1: high low transition Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Issues with Manchester Doubles the rate at which the signal transitions are made on the link Which means the receiver has half of the time to detect each pulse of the signal The rate at which the signal changes is called the link’s baud rate In Manchester the bit rate is half the baud rate Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

4B/5B Encoding Encode 4-bit symbols into 5-bit codes 24 symbols must be mapped to 24 codewords out of the possible 25 Each codeword has no more than one starting zero, and no more than two trailing zeros Already solve consecutive 0s problem? Then use NRZI to solve the consecutive 1s problem 80% efficiency (1 bit is overhead) Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

4B/5B Encoding 16 left 11111 – when the line is idle 4-bit data symbol 5-bit code 0000 11110 1000 10010 0001 01001 1001 10011 0010 10100 1010 10110 0011 10101 1011 10111 0100 01010 1100 11010 0101 01011 1101 11011 0110 01110 1110 11100 0111 01111 1111 11101 16 left 11111 – when the line is idle 00000 – when the line is dead .. 00100 – to mean halt 13 left : 7 invalid, 6 for various control signals Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

4B/5B Encoding 4-bit data symbol 5-bit code 0000 11110 1000 10010 0001 01001 1001 10011 0010 10100 1010 10110 0011 10101 1011 10111 0100 01010 1100 11010 0101 01011 1101 11011 0110 01110 1110 11100 0111 01111 1111 11101 4B/5B: popularized by Fiber Distributed Data Interface (FDDI); also adopted by 802.3, Multichannel Audio Digital Interface Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Other Schemes RZ, RZ-L Bi – Phase, Bi-Phase-L Miller Code, Miller L etc. Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Example Show 4B/5B encoding and the resulting NRZI signal for the following bit sequences 1101 1110 1010 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

2) Framing Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Why Framing? We are focusing on packet-switched networks, which means that blocks of data (called frames at this level), not bit streams, are exchanged between nodes. It is the network adaptor that enables the nodes to exchange frames. Bits flow between adaptors, frames between hosts Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Why Framing? When node A wishes to transmit a frame to node B, it tells its adaptor to transmit a frame from the node’s memory. This results in a sequence of bits being sent over the link. The adaptor on node B then collects together the sequence of bits arriving on the link and deposits the corresponding frame in B’s memory. Recognizing exactly what set of bits constitute a frame—that is, determining where the frame begins and ends—is the central challenge faced by the adaptor Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Framing Byte-Oriented Protocols To view each frame as a collection of bytes (characters) rather than bits BISYNC (Binary Synchronous Communication) Protocol – Developed by IBM (around 60s) DDCMP (Digital Data Communication Protocol) – Used in DECnet (Digital Equipment Corporation) Widely used PPP (Point-to-Point Protocol) over Internet Bit-Oriented Protocols HDLC (High-Level Data Link Control) Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Frame/Packet Format Frame/packet: Sequence of labeled fields Above each field: A number indicating the length of that field in bits Frame/packet: transmition beginning with the leftmost field Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

BISYNC BISYNC: Binary synchronous communication Frame is a collection of bytes Need to indicate the beginning and end of a frame Sentinel characters are used SYN: Synchronization character SOH: Start of header STX, ETX: Start of text, End of text CRC: Cyclic redundancy check Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Problem with BISYNC ETX may occur in the payload Precede it with a DLE (data-link-escape) character Problem propagates, precede DLE with another DLE (extra overhead). Cost is overhead This approach is called character stuffing: extra characters are inserted in data portion Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

DDCMP: Byte-Counting Framing Include the # of bytes in the frame as a field in the header Digital Data Communications Protocol (DDCMP) Count: Specifies # of bytes in the body What happen if Count corrupted? Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

PPP Framing Recent PPP which is commonly run over Internet links uses sentinel approach Special start of text character denoted as Flag 0 1 1 1 1 1 1 0 Address, control : default numbers Protocol for demux : IP / IPX Payload : negotiated (1500 bytes) Checksum : for error detection 2-4 bytes Overhead: 8/1508 =0.5% Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

HDLC –Bit-oriented Framing Bit-oriented Protocol HDLC : High Level Data Link Control Beginning and Ending Sequences 0 1 1 1 1 1 1 0 HDLC Frame Format Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

HDLC –Bit-oriented Framing HDLC Protocol On the sending side, any time five consecutive 1’s have been transmitted from the body of the message (i.e. excluding when the sender is trying to send the distinguished 01111110 sequence) The sender inserts 0 before transmitting the next bit: Bit stuffing Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

HDLC –Bit-oriented Framing HDLC Protocol On the receiving side 5 consecutive 1’s Next bit 0 : Stuffed, so discard it 1 : Either End of the frame marker Or Error has been introduced in the bitstream Look at the next bit If 0 ( 01111110 )  End of the frame marker If 1 ( 01111111 )  Error, discard the whole frame The receiver needs to wait for next 01111110 before it can start receiving again Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Example of Bit-stuffing Sender 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 Receiver 1 1 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 1 1 0 0 Length of frame Variable, depends on the data We can calculate and optimize the overhead of bit stuffing x x x x Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Increase frame length as much as possible Frame Size Example Let each frame contain V overhead bits Let a message of M bits be broken into frames of size Kmax # of packets : The total # of bits for all frames: If Kmax ↓, # of frames ↑, and overhead also ↑ If # of frames ↑, then each frame must be processed then more processing delay at each host Increase frame length as much as possible Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Example Frame Size Why just make Kmax = M? Pipelining delay: frame must be received before forwarding Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527

Example Framing What we have discussed so far Sentinel framing uses special “sentinel” characters (STX, ETX) to indicate the start and end of each frame. Length-based framing specifies the length of the frame in the beginning of the header, so the receiver knows exactly how much data to read Frames usually not same size Clock-based framing (SONET): all frames are the same size - Sender and receiver must have synchronized clocks. All frames fit into a specific time interval. Refer to 2.3.3 textbook. Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527