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

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

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

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

CSCI-1680 Link Layer I Rodrigo Fonseca

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

Chapter 2: Getting Connected

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

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

2.4 Error Detection Bit errors in a frame will occur. How do we detect (and then. (or both) frames contains an error. This is inefficient (and not

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

Error Detection Codes. Error Detection. Two Dimensional Parity. Internet Checksum Algorithm. Cyclic Redundancy Check.

Lecture 5. Homework 2 posted, due September 15. Reminder: Homework 1 due today. Questions? Thursday, September 8 CS 475 Networks - Lecture 5 1

Reliable Transmission

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

Links. CS125 - mylinks 1 1/22/14

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. Framing. Lecture - Encoding & Framing 1. Problems. Areas for Discussion

Housekeeping. Fall /5 CptS/EE 555 1

Solutions for Chapter similar to 1 and 3

ECE 4450:427/527 - Computer Networks Spring 2017

Direct Link Networks (II)

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

Networking Link Layer

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

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

CSCI-1680 Link Layer Reliability Rodrigo Fonseca

CSE 123A Computer Networks

Some portions courtesy Robin Kravets and Steve Lumetta

CSCI-1680 Physical Layer Link Layer I Rodrigo Fonseca

EE 122: Error detection and reliable transmission. Ion Stoica September 16, 2002

CSE 461: Framing, Error Detection and Correction

CSCI-1680 Link Layer Reliability John Jannotti

High Level View. EE 122: Error detection and reliable transmission. Overview. Error Detection

Copyright 2010, Elsevier Inc. All rights Reserved

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?

UNIT I FUNDAMENTALS & LINK LAYER

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

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

Introduction to Computer Networks. 03 Data Link Layer Introduction

Computer and Network Security

COMPUTER NETWORKS CS CS 55201

Data Communication & Computer Networks INFO

COMPUTER NETWORKS CS CS 55201

CS 640 Lecture 4: 09/11/2014

Direct Link Communication I: Basic Techniques. Data Transmission. ignore carrier frequency, coding etc.

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

Data Link Layer. Indian Institute of Technology Madras

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

CSCI 466 Midterm Networks Fall 2011

Data Link Layer: Overview, operations

Direct Link Communication I: Basic Techniques. Data Transmission. ignore carrier frequency, coding etc.

Link Layer (L2) Review

UNIT I FUNDAMENTALS & LINK LAYER

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

CPE 548 Exam #1 (50 pts) February 17, 2016

Goals of Today s Lecture. Adaptors Communicating

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 11, 2018

CPE 448/548 Exam #1 (100 pts) February 14, Name Class: 448

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

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

Inst: Chris Davison

Data Link Layer. Overview. Links. Shivkumar Kalyanaraman

High Level View. EE 122: Ethernet and Random Access protocols. Medium Access Protocols

CSE 123: Computer Networks

Transport Layer Marcos Vieira

EE 122: Ethernet and

CS 4453 Computer Networks Winter

5th Slide Set Computer Networks

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

CSCI 466 Midterm Networks Fall 2011

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.

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

Lecture 5: Data Link Layer Basics

Data Link Layer Overview

DATA LINK LAYER UNIT 7.

The Data Link Layer Chapter 3

COMP/ELEC 429/556 Introduction to Computer Networks

Overview. Data Link Technology. Role of the data-link layer. Role of the data-link layer. Function of the physical layer

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

Computer Network (2012 Spring) Homework Answer. Chapter2

Data Link Layer Overview

Data Link Layer (1) Networked Systems 3 Lecture 6

Data Link Layer Overview

Computer Networking. Lecture 4 - Coding and Error Control

Getting Connected (Chapter 2 Part 4) Networking CS 3470, Section 1 Sarah Diesburg

Data Link Layer Overview

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

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

CSE 123: Computer Networks

Telematics. 5rd Tutorial - LLC vs. MAC, HDLC, Flow Control, E2E-Arguments

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

CompSci 356: Computer Network Architectures Lecture 5: Reliable Transmission and Multi-access links Chapter 2.4, 2.5, 2.6

Lecture 4: CRC & Reliable Transmission. Lecture 4 Overview. Checksum review. CRC toward a better EDC. Reliable Transmission

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

CS422 Computer Networks

Administrivia. FEC vs. ARQ. Reliable Transmission FEC. Last time: Framing Error detection. FEC provides constant throughput and predictable delay

SRI RAMAKRISHNA INSTITUTE OF TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY COMPUTER NETWORKS UNIT - II DATA LINK LAYER

UNIT-II 1. Discuss the issues in the data link layer. Answer:

ECE 4450:427/527 - Computer Networks Spring 2017

Transcription:

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4021: Networks Discussion Chapter 2 Getting Connected Eng. Haneen El-Masry March, 2014

2.2 ENCODING Encoding the binary data that the source node wants to send into the signals that the links are able to carry and then to decode the signal back into the corresponding binary data at the receiving node. Network Adaptor: a piece of hardware that connects a node to a link. The network adaptor contains a signaling component that actually encodes bits into signals at the sending node and decodes signals into bits at the receiving node. ENCODING Techniques 1- NRZ: 1 >> High Signal, 0 >> Low Signal. 2- NRZI: 1 >> Transition, 0 >> No Transition. 3- Manchester: 1 >> High to Low Transition, 0 >> Low To High Transition. Manchester => NRZ XOR Clock. 4-4B/5B: Every 4 bits are encoded into a 5-bit code then the resulting bits encoded using NRZI. Note: the 5 bit code has at most one leading 0 and at most two trailing 0. Exercise 1: 2

Exercise 2: 2.3 FRAMING 2.3.1 Byte-Oriented Protocols (BISYNC, PPP, DDCMP) View each frame as a collection of bytes (characters) rather than a collection of bits. Sentinel-Based Approaches BISYNC and PPP use special characters known as sentinel characters to indicate where frames start and end. 3

Character Stuffing If ETX appears in the body of the frame, precede it with a DLE. Also, if DLE appears in the body of the frame, precede it with an extra DLE. Exercise 8: Exercise 9(a): Byte-Counting Approach DDCMP uses the alternative way to detect the end of a file with a sentinel value is to include the number of items in the file at the beginning of the file. 2.3.2 Bit-Oriented Protocols (HDLC) It simply views the frame as a collection of bits. Beginning and Ending Sequences are: 01111110 4

Bit Stuffing On the sending side, any time five consecutive 1s have been transmitted from the body of the message (i.e., excluding Ending Sequence 01111110 sequence ), the sender inserts a 0 before transmitting the next bit. On the receiving side, should five consecutive 1s arrive, the receiver makes its decision based on the next bit it sees (i.e., the bit following the five 1s). If the next bit is a: - 0, it must have been stuffed, and so the receiver removes it. - 1, looking at the next bit, if it sees a: - 0 then it is the end-of-frame marker. - 1 there must have been an error and the whole frame is discarded. Exercise 5: Exercise 7: Exercise 9(b): 5

2.3.3 Clock-Based Framing (SONET) SONET has been for many years the dominant standard for long-distance transmission of data over optical networks. STS-1: is the lowest speed SONET link, and runs at 51.84 Mbps. An STS-1 frame is arranged as 9 rows of 90 bytes each. Each frame is 9 90 = 810 bytes long. The first 3 bytes of each row are overhead, with the rest being available for data that is being transmitted over the link. The first 2 bytes of the frame contain a special bit pattern, and it is these bytes that enable the receiver to determine where the frame starts. The overhead bytes of a SONET frame are encoded using NRZ. The payload bytes are scrambled: this is done by calculating the exclusive OR (XOR) of the data to be transmitted and by the use of a well-known bit pattern. The bit pattern, which is 127 bits long, has plenty of transitions from 1 to 0, so that XORing it with the transmitted data is likely to yield a signal with enough transitions to enable clock recovery. For more details about SONET, see your text book. 6

2.4 ERROR DETECTION 2.4.1 Two-Dimensional Parity Exercise 11: Exercise 12: Exercise 13: 2.4.2 Internet Checksum Algorithm The transmitter adds up all the words that are transmitted and then transmit the result of that sum. The result is the checksum. The receiver performs the same calculation on the received data and compares the result with the received checksum. If any transmitted data, including the checksum itself, is corrupted, then the results will not match, so the receiver knows that an error occurred. 7

2.4.3 Cyclic Redundancy Check (CRC) Exercise 18: (a) M(x)= x 7 +x 6 +x 5 +x+1 C(x)= x 3 +1 T(x)= M(x) * x 3 = x 10 +x 9 +x 8 +x 4 +x 3 x 7 +x 6 +x 5 +x 3 +x 2 x 3 +1 x 10 +x 9 +x 8 +x 4 +x 3 x 10 +x 7 x 9 +x 8 +x 7 +x 4 +x 3 x 9 +x 6 x 8 +x 7 +x 6 +x 4 +x 3 x 8 +x 5 x 7 +x 6 +x 5 +x 4 +x 3 x 7 +x 4 x 6 +x 5 +x 3 x 6 +x 3 x 5 +x 2 x 2 Finally. P(x)= T(x)+x 2 = x 10 +x 9 +x 8 +x 4 +x 3 +x 2 Then the transmitted message should be : 11100011100 x 5 8

(b) When the LMB is inverted, the received data should be 01100011100. Divide the received message by C(x), the remainder will be: 10, the fact that the remainder is nonzero tells us a bit error occurred. 2.5 RELIABLE TRANSMISSION Frames are sometimes corrupted while in transit, corrupt frames must be discarded. A link layer protocol that wants to deliver frames reliably must recover from discarded (lost) frames. Two fundamental mechanisms for reliable delivery: Acknowledgements (ACKs): The receiver sends back an ACK (a small control frame) when it correctly receives a frame Timeouts: If the sender does not receive an ACK after a reasonable amount of time (the timeout period), it retransmits the original frame. 2.5.1 Stop-and-Wait After transmitting one frame, the sender waits for an acknowledgment before transmitting the next frame. If the acknowledgment does not arrive after a certain period of time, the sender times out and retransmits the original frame. Sequence Number Bit When the receiver correctly received and acknowledged the frame, but the Acknowledgment lost. The sender times out and retransmits the original frame, but the receiver will think that it is the next frame. To address this problem, the header for a stop-and-wait protocol usually includes a 1-bit sequence number, that is, the sequence number can take on the values 0 and 1, and the sequence numbers used for each frame alternate. Thus, when the sender retransmits frame 0, the receiver can determine that it is seeing a second copy of frame 0 and therefore can ignore it. Drawback of Stop and Wait The sender has only one outstanding frame on the link at a time, then the link capacity may not be fully utilized. 9

2.5.2 Sliding Window The sender can send more than one frame before the ACK. The Sender: SWS: The send window size, gives the upper bound on the number of outstanding (unacknowledged) frames that the sender can transmit. LAR: The sequence number of the last acknowledgment received. LFS: The sequence number of the last frame sent. The sender also maintains the following invariant: The Receiver: LFS LAR SWS SWS = Bandwidth X RTT / FrameSize (keeping the pipe full) RWS: The receive window size, gives the upper bound on the number of out of order frames that the receiver is willing to accept. LAF: The sequence number of the largest acceptable frame. LFR: The sequence number of the last frame received. The receiver also maintains the following invariant: Is MaxSeqNum SWS+ 1 sufficient? LAF LFR RWS If RWS=1, then MaxSeqNum SWS+ 1 is sufficient. If RWS=SWS, then MaxSeqNum 2*SWS is sufficient. The sliding window algorithm can be used to serve 3 roles: To reliably deliver frames across an unreliable link. To preserve frame order: the receiver does not pass a frame up to the higher layer until it has already passed up all frames with a smaller sequence number. 10

To support flow control the receiver can throttle the sender by informing the sender of how many frames it has room to receive. Exercise 23: Exercise 24: SWS = BW * RTT / FrameSize = (1*10 6 * 1.25*2) / (8*1*10 3 ) = 312.5 312 frame. When RWS=1 then MaxSeqNum SWS+ 1 MaxSeqNum 313 then the sequence number bits= 9. When RWS=SWS then MaxSeqNum 2*SWS MaxSeqNum 2*312 624 then the sequence number bits= 10. 11

Exercise 31: (a) (b) 12

Exercise 32: (a) (b) The second case reduces the total transaction time by roughly 1 RTT. 13

2.6 Ethernet and IEEE 802.3 The Ethernet is a local area network (LAN) technology. The Ethernet is a multiple access network: a set of nodes send and receive frames over a shared link. An Ethernet segment is implemented on a coaxial cable of up to 500 m. Multiple Ethernet segments can be joined together by repeaters. A repeater: is a device that forwards digital signals, it understands bits, not frames. No more than 4 repeaters may be positioned between any pair of hosts, then an Ethernet has a maximum reach of 2500 m. Types of Ethernet Cabling: coaxial, twisted pair, fiber optic. Speeds: 10Mbps, 100Mbps, 1Gbps, 10Gbps, 40Gbps, 100Gbps. Devices: repeaters, hubs. A hub is a multi-way repeater that forwards the signal on all outgoing segments. Any signal placed on the Ethernet by a host is broadcast over the entire network. Signal is propagated in both directions. A repeater forwards the signal on the outgoing segment. Terminators attached to the end of a segment absorb the signal. Ethernet adaptor receives all frames and accepts: frames addressed to its own address frames addressed to the broadcast address frames addressed to a multicast address, if programmed to listen to that address. all frames, if placed in promiscuous mode. All hosts are in the same collision domain: Data transmitted by any one host on the Ethernet reaches all the other hosts. When two hosts transmit frames at the same time, collision occurs. 14

Transmitter algorithm (CSMA/CD): Carrier Sense Multiple Access with Collision Detection. Why must an Ethernet frame be at least 64 bytes long? A host must transmit for 2*d (d=link delay) to be sure that it detects all possible collisions. The RTT of a maximally configured Ethernet (2500 m long with 3 repeaters) has been determined to be 51.2 s; on 10 Mbps Ethernet this corresponds to 512 bits (64 bytes). Ethernets work best under lightly loaded conditions. Under heavy loads, too much of the network s capacity is wasted by collisions. Why Ethernets have been so successful? Easy to administer and maintain: no switches, no routing tables, easy to add a new host. Inexpensive. 15