ECE 4450:427/527 - Computer Networks Spring 2017

Similar documents
Data Link Networks. Hardware Building Blocks. Nodes & Links. CS565 Data Link Networks 1

CSCI-1680 Physical Layer Link Layer I Rodrigo Fonseca

Direct Link Networks. Lecture - Encoding & Framing 1. Areas for Discussion. Problems

L3: Building Direct Link Networks I. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

Direct Link Networks. Framing. Lecture - Encoding & Framing 1. Problems. Areas for Discussion

CompSci 356: Computer Network Architectures. Lecture 4: Link layer: Encoding, Framing, and Error Detection Ref. Chap 2.2, 2.3,2.4

Overview. Performance metrics - Section 1.5 Direct link networks Hardware building blocks - Section 2.1 Encoding - Section 2.2 Framing - Section 2.

Direct Link Networks. Nodes. Links. Outline Building Blocks Encoding

CSMC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala Set 4. September 09 CMSC417 Set 4 1

Links. CS125 - mylinks 1 1/22/14

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4021: Networks Discussion. Chapter 2.

Computer Network. Direct Link Networks Reliable Transmission. rev /2/2004 1

Introduction to Computer Networks. 03 Data Link Layer Introduction

CSE 123A Computer Networks

Point-to-Point Links. Outline Encoding Framing Error Detection Sliding Window Algorithm. Fall 2004 CS 691 1

Housekeeping. Fall /5 CptS/EE 555 1

Some portions courtesy Robin Kravets and Steve Lumetta

Direct Link Networks: Building Blocks (2.1), Encoding (2.2), Framing (2.3)

Problem Statement. Physical and Data Link Layer Overview. Five Tasks Encoding. Make two computers talk to each other

Data Link Layer Overview

Chapter 8 OSI Physical Layer

Chapter 2: Getting Connected

Data Link Layer Overview

Data Link Layer Overview

CSMC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. Nov 1,

Data Link Layer Overview

CSCI-1680 Link Layer I Rodrigo Fonseca

Data Link Layer. Indian Institute of Technology Madras

Frequency: it refers to the number of periods in 1 s. It is formally expressed in Hertz (Hz)

Framing and Stuffing. Advanced Computer Networks

Links Reading: Chapter 2. Goals of Todayʼs Lecture. Message, Segment, Packet, and Frame

COMPUTER NETWORKS UNIT I. 1. What are the three criteria necessary for an effective and efficient networks?

COMP/ELEC 429/556 Introduction to Computer Networks

ECE 4450:427/527 - Computer Networks Spring 2017

Goals of Today s Lecture. Adaptors Communicating

From Signals to Packets Computer Networking. Link Layer: Implementation. Datalink Functions. Lecture 5 - Coding and Error Control

Message, Segment, Packet, and Frame Link-layer services Encoding, framing, error detection, transmission control Error correction and flow control

ECE 4450:427/527 - Computer Networks Spring 2017

Department of Computer and IT Engineering University of Kurdistan. Data Communication Netwotks (Graduate level) Data Link Layer

CS 640 Lecture 4: 09/11/2014

CS 455/555 Intro to Networks and Communications. Link Layer

Computer Networking. Lecture 4 - Coding and Error Control

CS 4453 Computer Networks Winter

Lecture 3: Modulation & Layering"

UNIT I FUNDAMENTALS & LINK LAYER

Computer and Network Security

From Signals to Packets Computer Networking. Link Layer: Implementation. Network Delay. 06-datalink.ppt, , Fall

CIS 551 / TCOM 401 Computer and Network Security. Spring 2007 Lecture 7

Transmission SIGNALs

Copyright 2010, Elsevier Inc. All rights Reserved

CSCI 466 Midterm Networks Fall 2011

CS/ECE 438: Communication Networks for Computers Spring 2018 Midterm Examination Online

The Link Layer and LANs. Chapter 6: Link layer and LANs

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

CS 457 Networking and the Internet. Link Layer Protocols. Problems 8/31/16. Fall 2016 Indrajit Ray

Data Link Layer: Overview, operations

Lecture 2: Links and Signaling

Chapter 5 Link Layer and LANs

DCN Questions CHAPTER 1:- NETWORKING FUNDAMENTALS

CS455: Introduction to Distributed Systems [Spring 2018] Dept. Of Computer Science, Colorado State University

Lecture / The Data Link Layer: Framing and Error Detection

5th Slide Set Computer Networks

Packet? No. SenseCarrier. Discard packet attempts < 16. attempts == 16

CS 640 Introduction to Computer Networks. Role of data link layer. Today s lecture. Lecture16

Data Link Layer (1) Networked Systems 3 Lecture 6

2.1 CHANNEL ALLOCATION 2.2 MULTIPLE ACCESS PROTOCOLS Collision Free Protocols 2.3 FDDI 2.4 DATA LINK LAYER DESIGN ISSUES 2.5 FRAMING & STUFFING

ECE 4400:427/527 - Computer Networks Spring 2017

Advantages and disadvantages

Inst: Chris Davison

Introduction to Data Communications & Networking

UNIT - IV Ques.4 Ques.5

Topics Today. Lecture 8: Physical and Link Layers. Protocol Layering. Physical layer: chips versus bits. Physical Layer (Layer 1) Protocol Layering

Medium Access Control

Data Communication & Computer Networks INFO

1/29/2008. From Signals to Packets. Lecture 6 Datalink Framing, Switching. Datalink Functions. Datalink Lectures. Character and Bit Stuffing.

Data Link Technology. Suguru Yamaguchi Nara Institute of Science and Technology Department of Information Science

The Data Link Layer Chapter 3

CS422 Computer Networks

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 16

1. Data Link Layer (Layer 2)

Token Ring and. Fiber Distributed Data Interface (FDDI) Networks: Token Ring and FDDI 1

Physical Layer V What does the physical layer provide?

Jaringan Komputer. Broadcast Network. Outline. MAC (Medium Access Control) Channel Allocation Problem. Dynamic Channel Allocation

Outline. A Professional Company in Software-Defined Networking (SDN) Copyright , EstiNet Technologies Inc. All Rights Reserved..

COMPUTER NETWORKS CS CS 55201

Lecture 6 Datalink Framing, Switching. From Signals to Packets

Outline: Connecting Many Computers

Link layer, LANs: outline. Chapter 5-1 Link Layer. Link layer: introduction. Link layer services

Computer Networks. Today. Principles of datalink layer services Multiple access links Adresavimas, ARP LANs Wireless LANs VU MIF CS 1/48 2/48

Chapter 3. The Data Link Layer. Wesam A. Hatamleh

The TCP/IP Architecture Jean Yves Le Boudec 2014

The TCP/IP Architecture Jean Yves Le Boudec 2014

CCNA Exploration1 Chapter 7: OSI Data Link Layer

Introductory to Computer Networks Local Area Networks. Lecture 16 Fall Isfahan University of technology Dr.

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

Link Layer and Ethernet

DATA COMMUNICATION AND NETWORKS

Data Communication. Chapter # 1: Introduction. By: William Stalling

The data link layer has a number of specific functions it can carry out. These functions include. Figure 2-1. Relationship between packets and frames.

Configuration of Synchronous Protocols

Transcription:

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

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 Computer Networks 2

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 Computer Networks 3

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 Computer Networks 4

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 Computer Networks 5

Link Layer datagram datagram controller controller sending host frame datagram receiving host 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 Computer Networks 6

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 Computer Networks 7

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

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 log 2 (1+S/N) (bits/s) W: Available ``bandwidth of link (Hz) Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 9

Link Capacity: Example C = W log 2 (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 Computer Networks 10

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

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 Computer Networks 12

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 10 8 /300 = 667 x 10 3 meters. Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 13

Link Electromagnetic spectrum Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 14

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

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

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 Computer Networks 17

Encoding 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 Computer Networks 18

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 Computer Networks 19

NRZ Problem: Baseline Wander 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 Computer Networks 20

NRZ Problem: Clock Recovery 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 Computer Networks 21

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 Computer Networks 22

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 Computer Networks 23

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 Computer Networks 24

4B/5B Encoding Encode 4-bit symbols into 5-bit codes 2 4 symbols must be mapped to 2 4 codewords out of the possible 2 5 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 Computer Networks 25

4B/5B Encoding 4-bit data symbol 5-bit code 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 Computer Networks 26

4B/5B Encoding 4-bit data symbol 5-bit code 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 Computer Networks 27

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 Computer Networks 28

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 Computer Networks 29

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

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 Computer Networks 31

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 Computer Networks 32

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 Computer Networks 33

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

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 Computer Networks 35

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 Computer Networks 36

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 Computer Networks 37

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 Computer Networks 38

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 Computer Networks 39

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 Computer Networks 40

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 Computer Networks 41

Sender Example Example of Bit-stuffing 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 0 0 0 0 x x x x 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 Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 42

Frame Example Size Let each frame contain V overhead bits Let a message of M bits be broken into frames of size K max # of packets : M / K max The total # of bits for all frames: M + M / Kmax V If K max, # 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 Computer Networks 43

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

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 Computer Networks 45