COMPUTER NETWORKS CS CS 55201

Similar documents
COMPUTER NETWORKS CS CS 55201

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

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

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

Housekeeping. Fall /5 CptS/EE 555 1

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

Reliable Transmission

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

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

CSCI-1680 Link Layer I Rodrigo Fonseca

Computer and Network Security

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

Links. CS125 - mylinks 1 1/22/14

Direct Link Networks (II)

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

Medium Access Control. IEEE , Token Rings. CSMA/CD in WLANs? Ethernet MAC Algorithm. MACA Solution for Hidden Terminal Problem

Introduction to Computer Networks. 03 Data Link Layer Introduction

ECE 4450:427/527 - Computer Networks Spring 2017

Networking Link Layer

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

IEEE , Token Rings. 10/11/06 CS/ECE UIUC, Fall

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 Layer. Overview. Links. Shivkumar Kalyanaraman

Data Communication & Computer Networks INFO

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

Link Layer (L2) Review

Chapter 2: Getting Connected

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

Copyright 2010, Elsevier Inc. All rights Reserved

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

Lecture 4b. Local Area Networks and Bridges

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

CSCI-1680 Link Layer Reliability John Jannotti

CSCI-1680 Link Layer Reliability Rodrigo Fonseca

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

CSE 461: Framing, Error Detection and Correction

Chapter 8 LAN Topologies

Unit II. Part A (2 Marks)

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

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

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

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

CSE 461: Multiple Access Networks. This Lecture

Data Link Layer: Overview, operations

CSCI-1680 Physical Layer Link Layer I Rodrigo Fonseca

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

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

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

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

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

CSE 123A Computer Networks

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

CS 4453 Computer Networks Winter

Shared Access Networks. Media Access Protocols. Ethernet (802.3) Ethernet cont...

ECE 4450:427/527 - Computer Networks Spring 2017

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

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

Data always flows in one direction around ring Like Ethernet, all nodes see all frames, and protocol is necessary to decide when to send

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

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

CS 640 Lecture 4: 09/11/2014

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

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

Some portions courtesy Robin Kravets and Steve Lumetta

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

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

Computer Networking. Lecture 4 - Coding and Error Control

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

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

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

Data Link Layer, Part 5. Medium Access Control

Inst: Chris Davison

Transmission SIGNALs

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

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

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

Goals. Fundamentals of Network Media. More topics. Topics. Multiple access communication. Multiple access solutions

Outline: Connecting Many Computers

Data Link Layer, Part 3 Medium Access Control. Preface

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

LAN. CS 4/55231 Internet Engineering. Kent State University Dept. of Computer Science

Lecture 6 Datalink Framing, Switching. From Signals to Packets

Data and Computer Communications

Chapter 5 Link Layer and LANs

Reliable Byte-Stream (TCP)

Lecture 6 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Data Link Layer Overview

Part3. Local Area Networks (LAN)

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

Redes de Computadores. Medium Access Control

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

1999, Scott F. Midkiff

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

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.

Module 5. Broadcast Communication Networks. Version 2 CSE IIT, Kharagpur

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Data Link Layer Overview

Lecture 9: Bridging. CSE 123: Computer Networks Alex C. Snoeren

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

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

Transcription:

Contents COMPUTER NETWORKS CS 45201 CS 55201 CHAPTER 2 Data Link Networks Hardware Building Blocks Encoding Coding Design Framing Error Detection Reliable Transmission Ethernet FDDI Network Adaptors P. Farrell / H. Peyravi Department of Computer Science Kent State University Kent, Ohio 44242 farrell@cs.kent.edu http://www.cs.kent.edu/ peyravi Fall 2001 CS 4/55201: Computer Networks Fall 2001 CS 4/55201: Computer Networks Fall 2001

Hardware Building Blocks Hardware Building Blocks Hardware Building Blocks Network Connecting Problems Physical connection (coax, fiber,... ) Encoding/Decoding data bits. Framing, packets, messages. Error detection. Reliable delivery despite errors. Media Access Control (MAC). = These issues are implemented in the network adaptor (board). = We will study the above problems in the context of Point-to-Point links Carrier Sense Multiple Access, CSMA networks (Ethernet) Token Rings, Fiber Distributed Data Interface Network Nodes Assume a general-purpose (programmable) computer; with special-purpose hardware. CPU Cache Memory I/O Bus Network Adapter A device driver manages the adaptor Finite memory (implies limited buffer space) Connects to network via a network adaptor Fast processor, slow memory to network CS 4/55201: Computer Networks Fall 2001 1 of 47 CS 4/55201: Computer Networks Fall 2001 2 of 47

Hardware Building Blocks Hardware Building Blocks Network Links Data vs Signal Links propagate signals Analog: continuous Digital: discrete Binary data are encoded in to Analog signals: modulator (modem) Digital signals: demodulator A digital transmitter transmits binary data over a digital link. Data Data Analog Analog Signal Medium Telephone Modem Signal Analog Digital Data full duplex links Digital CODEC Analog half duplex links Digital Digital Transmitter Digital CS 4/55201: Computer Networks Fall 2001 3 of 47 CS 4/55201: Computer Networks Fall 2001 4 of 47

Hardware Building Blocks Encoding Some Physical Medium Type Speed Distance Category 5 twisted pair 10-100Mbps 100m 50-ohm coax (ThinNet) 10-100Mbps 200m 75-ohm coax (ThickNet) 10-100Mbps 500m Multimode fiber 100Mbps 2km Single-mode fiber 100-2400Mbps 40km Can be leased or owned Standard Links Type Bandwidth Applications ISDN 64 Kbps for digital voice/data T1 1.544 Mbps 24 64Kbps, old technology T3 44.736 Mbps 30 T1 STS-1 51.840 Mbps sync. transfer signal optical STS-3 155.250 Mbps for optical fiber STS-12 622.080 Mbps for optical fiber STS-24 1.244160 Gbps for optical fiber STS-48 2.488320 Gbps for optical fiber The device that encodes analog voice into digital ISDN link is called CODEC (coder/decoder). STS-N links are sometimes called OC-N (optical carrier). STS-N is used for electrical device connected to the link. OC-N is used for optical device connected to the link. Encoding Overview Signals propagate over a physical medium. Digital signals Analog signals Data can be either digital or analog; we re interested in digital data. Problem: Encode the binary data that the source node wants to send to the destination node into the signal that propagates over Node Adapter signalling component signal bits Adapter Node CS 4/55201: Computer Networks Fall 2001 5 of 47 CS 4/55201: Computer Networks Fall 2001 6 of 47

Encoding Encoding Maximum Data Rate of a Channel Nyquist (1924) stated that for a noise-free channel with bandwidth W (Hz), and multilevel signaling M, the capacity (bps) can be computed as C = 2W log 2 M Doubling W doubles the data rate. The presence of noise can corrupt one or more bits. If data rate is increased, the bits become shorter, and more bits are affected by a given noise pattern. At a given noise level, the higher the data rate, the higher the error rate. 5v 0v Bilevel Encoding Shannon s Theorem Shannon (1948) developed a formula to identify the upper bound on the channel capacity. The signal-to-noise ratio (S/N) is the ratio of power in a signal to the power contained in the noise that is present at a particular point in the transmission. S/N = 10 log 10 signal power noise power The maximum channel capacity is computed as C = B log 2 (1 + S N ) where C is the capacity in bits per second and B is the bandwidth in Hz. For example a noiseless 3-kHz channel cannot transmit binary signals at a rate exceeding 6000 bps. A channel of 3000-Hz bandwidth, and a signal to thermal noise of 30 db can never transmit more than 30,000 bps. = 30dB = 10 log 10 (S/N) S/N = 1000 C = 3000 log 2 (1 + 1000) = 3000 9.9673 < 30000bps Multilevel Encoding (M=4) CS 4/55201: Computer Networks Fall 2001 7 of 47 CS 4/55201: Computer Networks Fall 2001 8 of 47

Encoding Encoding Coding Terminology Pulse Bit +5v +5v 0-5v -5v Signal element: Pulse 1 Modulation Rate: =Baud rate Duration of the smallest element Data Rate: Bits per second Data Rate is a function of bandwidth signal/noise ratio encoding technique Twisted Pair Transmission Media Unshielded Twisted Pair (UTP) Voice Grade: Telephone wire Data Grade: Better quality = 100 Mbps over 50 m is possible Shielded Twisted Pair (UTP) Coaxial Cable Optical Fiber Modes: Single mode Multimode index of reflection = Speed in vacuum Speed in medium CS 4/55201: Computer Networks Fall 2001 9 of 47 CS 4/55201: Computer Networks Fall 2001 10 of 47

Coding Design Coding Design Bits NRZ Clock Coding Design 0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 0 +5v 0-5v Manchester: 0 = low to high 1 = high to low Differential Manchester 1 = absence of transition 0 = presence of transition Always a transition in middle of interval = easy to synchronize Manchester NRZI Diff Manchester Non-Return to Zero (NRZ) 1 = high level, 0 = low level Problem: consecutive 1s or 0s = Unable to recover clock Uniform distribution of 1 s and 0 s tune the clocks Non-return to Zero Inverted (NRZI): Make a transition from the current signal to encode a one, and stay at the current signal to encode a zero; solves the problem of consecutive ones. 0 = no transition at beginning of interval (one bit at time) 1 = transition at beginning of interval CS 4/55201: Computer Networks Fall 2001 11 of 47 CS 4/55201: Computer Networks Fall 2001 12 of 47

Framing Framing Framing Overview Problem: Breaking sequence of bits into a frame Must determine first and last bit of the frame Typically implemented by network adaptor Adaptor fetches (deposits) frames out of (into) host memory Byte-Oriented Protocols Sentinel Approach BISYNC(binary sync. comm.) SYN SYN SOH Header IMP-IMP (ARPANET) 8 8 8 8 8 16 STX Body ETX CRC 8 8 8 8 128 8 8 16 SYN SYN DLE STX Header Body DLE ETX CRC Node A Adapter bits frames Adapter Node B Problem: ETX character might appear in the data portion of the frame. Solution: Escape the ETX character with a DLE character in BISYNC; escape the DLE character with a DLE character in IMP-IMP. Byte Counting Approach (DDCMP) 8 8 8 14 42 16 SYN SYN Class Count Header Body CRC Problem: Count field is corrupted (framing error). Solution: Catch when CRC fails. CS 4/55201: Computer Networks Fall 2001 13 of 47 CS 4/55201: Computer Networks Fall 2001 14 of 47

Framing Framing Bit-Oriented Protocols HDLC: High-Level Data Link Control (also SDLC and PPP) Delineate frame with a special bit-sequence: 01111110 Bit Stuffing 8 16 16 8 Beginning Sequence Header Body CRC Ending Sequence Sender: any time five consecutive 1s have been transmitted from the body of the message, insert a 0. Receiver: should five consecutive 1s arrive, look at next bit(s): if next bit is a 0: remove it if next bits are 10: end-of-frame marker if next bits are 11: error Clock-Based Framing SONET: Synchronous Optical Network ITU standard for transmission over fiber STS-1 (51.84 Mbps) Byte-interleaved multiplexing Each frame is 125µs long. STS-1 Framce Structure 90 bytes 3 bytes 1 byte 9 rows Transport overhead Path overhead CS 4/55201: Computer Networks Fall 2001 15 of 47 CS 4/55201: Computer Networks Fall 2001 16 of 47

Framing Section Terminals Terminals Terminating Lightwave Equipment Regenarator Regenarator Equipment Terminating Lightwave Mux SONET Mux SONET Path Line OC-12 """""!!!!! STS-1 STS-1 STS-12 STS-12 STS-3 STS-3 STS-3 T1 T1 T1 T3 T3 converter Electro-optical Scrambler STS-1 CS 4/55201: Computer Networks Fall 2001 17 of 47 Error Detection Error Detection Let Pb be the probability that a bit is in error Let F be the frame size in bits Probability[frame has no error] = (1 Pb) F Probability[one or more bits in error] = 1 (1 Pb) F Example: Let F=1000 bits and Pb = 10 6 Pr[frame is in error] = 1 (1 10 6 ) 1 000 = 10 3 Parity Checks 0 1 2 3 4 5 6 7 1 0 1 1 0 1 1 Codeword Odd parity 1 0 1 1 0 1 1 0 # of 1 s is odd Even parity 1 0 1 1 0 1 1 1 # of 1 s is even Single error can be detected CS 4/55201: Computer Networks Fall 2001 18 of 47

Error Detection Error Detection Check Digit Method Make the number divisible by 9 Example: 823 to be sent 1. Left shift 823 = 8230 2. Divide by 9 and find remainder = 4 3. Subtract remainder from 9 = 9-4=5 4. Add the result of step 4 to step 1:8235 5. Check that the result is divisible by 9 Detects all single-digit errors: 7235, 8335, 8255, 8237 Detects several multiple-digit errors: 8765, 7346 Does not detect some errors: 7335, 8775, Homework: Prove why it detects all single-digit errors Cyclic Redundancy Check Add k bits of redundant data to an n-bit message. Represent n-bit message as an n 1 degree polynomial; e.g., MSG=10011010 corresponds to M(x) = x 7 + x 4 + x 3 + x 1. Let k be the degree of some divisor polynomial C(x); e.g., C(x) = x 3 + x 2 + 1. Transmit polynomial P (x) that is evenly divisible by C(x), and receive polynomial P (x) + E(x); E(x)=0 implies no errors. Recipient divides (P (x) + E(x)) by C(x); the remainder will be zero in only two cases: E(x) was zero (i.e. there was no error), or E(x) is exactly divisible by C(x). Choose C(x) to make second case extremely rare. Sender: multiply M(x) by x k ; for our example, we get x 10 + x 7 + x 6 + x 4 (10011010000); divide result by C(x) (1101); Send 10011010000-101 = 10011010101, since this must be exactly divisible by C(x); Want to ensure that C(x) does not divide evenly into polynomial E(x). CS 4/55201: Computer Networks Fall 2001 19 of 47 CS 4/55201: Computer Networks Fall 2001 20 of 47

Error Detection Error Detection Generator 1101 What can be detected? 11111001 10011010000 1101 1001 1101 1000 1101 1011 1101 1100 1101 1000 1101 101 Message Remainder All single-bit errors, as long as the x k and x 0 terms have non-zero coefficients. All double-bit errors, as long as C(x) has a factor with at least three terms. Any odd number of errors, as long as C(x) contains the factor (x + 1). Any burst error (i.e sequence of consecutive errored bits) for which the length of the burst is less than k bits. Most burst errors of larger than k bits can also be detected. Common polynomials for C(x) CRC C(x) CRC-8 x 8 + x 2 + x 1 + 1 CRC-10 x 10 + x 9 + x 5 + x 4 + x 1 + 1 CRC-12 x 12 + x 11 + x 3 + x 2 + 1 CRC-16 x 16 + x 15 + x 2 + 1 CRC-CCITT x 16 + x 12 + x 5 + 1 CRC-32 x 32 + x 26 + x 23 + x 22 + x 16 + x 12 + x 11 + x 10 + x 8 + x 7 + x 5 + x 4 + x 2 + x + 1 Ethernet and FDDI use CRC-32 Two-Dimensional Parity 0 1 2 3 4 5 6 7 0 1 0 1 0 0 1 1 parity bit 1 1 0 1 0 0 1 0 1 0 1 1 1 1 0 1 0 0 0 1 1 1 0 1 0 1 1 0 1 0 0 1 1 0 1 1 1 1 1 0 Parity byte 1 1 1 1 0 1 1 0 2D parity catches 1, 2, and 3-bit errors, and most 4-bit errors. Homework: Show this is true CS 4/55201: Computer Networks Fall 2001 21 of 47 CS 4/55201: Computer Networks Fall 2001 22 of 47

Error Detection Reliable Transmission Internet Checksum Algorithm Reliable Transmission The third approach View message as a sequence of 16-bit integers. Add these integers together using 16-bit ones complement arithmetic, and then take the ones complement of the result. That 16-bit number is the checksum. Unlike CRC, it doesn t have very strong error detection property The algorithm is easier to implement Recover from corrupt frames Error Correction Codes (ECC); also called Forward Error Correction (FEC) Acknowledgments and Timeouts; also called Automatic Repeat request (ARQ) Delivers frames without errors, in proper order to network layer Error Correction Mechanisms ACK/NAK: provide sender some feed-back about the other end Time-out: for the case when entire packet or ACK is lost Sequence numbers: to distinguish retransmissions Automatic Repeat Request (ARQ) Error detection Acknowledgment Retransmission after timeout Negative acknowledgment CS 4/55201: Computer Networks Fall 2001 23 of 47 CS 4/55201: Computer Networks Fall 2001 24 of 47

Reliable Transmission Sender Data Receiver ACK Data NAK time Sender ARQ Scenarios Receiver Sender Receiver time out Sender Frame ACK Receiver time out Sender ACK Receiver time out ACK time out time out... Reliable Transmission Stop-and-Wait sender receiver Frame 0 ACK 0 time Frame 1 ACK 1 Frame 0 ACK 0 time out Frame X Frame ACK X Problem: Keeping the pipe full. Example: 1.5Mbps link 45ms RTT = 67.5Kb (8KB). Assuming frame size of 1KB, stop-and-wait uses about one-eighth of the link s capacity. Want the sender to be able to transmit up to 8 frames before having to wait for an ACK. Frame time out X Frame Frame ACK Frame ACK CS 4/55201: Computer Networks Fall 2001 25 of 47 CS 4/55201: Computer Networks Fall 2001 26 of 47

...... Reliable Transmission Reliable Transmission Sliding Window Idea: Allow sender to transmit multiple frames before receiving an ACK, thereby keeping the pipe full. There is an upper limit on the number of outstanding (un-acked) frames allowed. sender receiver Sender: Assign sequence number to each frame (SeqNum) Maintain three state variables: send window size (SWS) last acknowledgment received (LAR) last frame sent (LFS) Maintain invariant: LFS - LAR SWS < SWS...... time LAR (Last Acknowledgement Received) LFS (Last Frame Sent) When ACK arrives, advance LAR, thereby opening window Buffer up to SWS frames CS 4/55201: Computer Networks Fall 2001 27 of 47 CS 4/55201: Computer Networks Fall 2001 28 of 47

Reliable Transmission Reliable Transmission Receiver: Maintain three state variables: receive window size (RWS) last frame acceptable (LFA) next frame expected (NFE) or last frame received (LFR = NFE - 1) Maintain invariant: LFA - LFR RWS or equivalently LFA - NFE + 1 RWS < RWS...... NFE (Next Frame Expected) Frame SeqNum arrives: if NFE SeqNum LFA accept LFA (Last Frame Accepted) if SeqNum < NFE or SeqNum > LFA discarded Send cumulative ACK Variations selective acknowledgements negative acknowledgements (NAK) Sequence Number Space SeqNum field is finite; sequence numbers wrap around Sequence number space must be larger than number of outstanding frames SWS MaxSeqNum-1 is not sufficient suppose 3-bit SeqNum field (0..7) SWS=RWS=7 sender transmit frames 0..6 arrive successfully, but ACKs lost sender retransmits 0..6 receiver expecting 7,0..5, but receives second incarnation of 0..5 SWS < (MaxSeqNum+1)/2 is correct rule Intuitively, SeqNum slides between two halves of sequence number space CS 4/55201: Computer Networks Fall 2001 29 of 47 CS 4/55201: Computer Networks Fall 2001 30 of 47

Reliable Transmission Ethernet Concurrent Logical Channels Multiplex several logical channels over a single point-to-point link; run stop-and-wait on each logical channel. Maintain three bits of state for each channel: boolean saying whether the channel is currently busy sequence number for frames sent on this logical channel next sequence number to expect on this logical channel ARPANET supported eight logical channels over each ground link (16 over each satellite link). Header for each frame included a 3-bit channel number and a 1-bit sequence number, for a total of 4 bits; same number of bits as the sliding window protocol requires to support up to eight outstanding frames on the link. Separates reliability from flow control and frame order. History Ethernet Overview Developed by Xerox PARC in mid-1970s Roots in Aloha packet-radio network Standardized by Xerox, DEC, and Intel in 1978 Similar to IEEE 802.3 standard CSMA/CD carrier sense multiple access collision detection Bandwidth: 10Mbps and 100Mbps Problem: Distributed algorithm that provides fair access to a shared medium CS 4/55201: Computer Networks Fall 2001 31 of 47 CS 4/55201: Computer Networks Fall 2001 32 of 47

Ethernet Ethernet Classical Ethernet (thick-net) Physical Properties maximum segment of 500m transceiver taps at least 2.5m apart connect multiple segments with repeaters no more than 2 repeaters between any pair of nodes (1500m total) maximum of 1024 hosts also called 10Base5 Preamble Addresses: Frame Format 64 48 48 16 32 8 Dest Addr Src Addr Type Body CRC Unique, 48-bit unicast address assigned to each adaptor Example: 8:0:2b:e4:b1:2 Broadcast: all 1s Multicast: first bit is 1 Postamble Alternative technologies 10Base2 (thin-net): 200m; daisy-chain configuration 10BaseT (twisted-pair): 100m; star configuration............ Adaptor receives all frames; it accepts (passes to host): Frames addressed to its own unicast address Frames addressed to the broadcast address Frames addressed to any multicast address it has been programmed to accept All frames when in promiscuous mode CS 4/55201: Computer Networks Fall 2001 33 of 47 CS 4/55201: Computer Networks Fall 2001 34 of 47

Ethernet Ethernet Transmitter Algorithm Experiences If line is idle: Observe in Practice Send immediately 10-200 hosts (not 1024) Upper bound message size of 1500 bytes Length shorter than 1500m (RTT closer to 5µ than 51µ) Must wait 51µs between back-to-back frames Packet length is bimodal If line is busy: High-level flow control and host performance limit load Wait until idle and transmit immediately Recommendations Called 1-persistent (special case of p-persistent) Do not overload (30% utilization is about max) If collision: jam for 512 bits, then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes of data) Implement controllers correctly Use large packets Get the rest of the system right (broadcast, retransmission) delay and try again 1st time: uniformly distributed between 0 and 51.2µs 2nd time: uniformly distributed between 0 and 102.4µs 3rd time: uniformly distributed between 0 and 204.8µs give up after several tries (usually 16) exponential backoff CS 4/55201: Computer Networks Fall 2001 35 of 47 CS 4/55201: Computer Networks Fall 2001 36 of 47

FDDI FDDI FDDI Overview Dual Ring Configuration Physical Properties of FDDI Token Ring Networks PRONET: 10Mbps and 80 Mbps rings IBM: 4Mbps token ring 16Mbps IEEE 802.5/token ring 100Mbps Fiber Distributed Data Interface (FDDI) Single and Dual Attachment Stations (a) (b) Upstream Neighbor Downstream Neighbor Concentrator (DAS) Basic Idea frames flow in one direction: upstream to downstream special bit pattern (token) rotates around ring must capture token before transmitting release token after done transmitting immediate release delayed release remove your frame when it comes back around stations get round-robin service Each station imposes a delay (e.g., 50ns) Maximum of 500 stations Upper limit of 100km (200km of fiber) Uses 4B/5B encoding Can be implemented over copper (CDDI) SAS CS 4/55201: Computer Networks Fall 2001 37 of 47 CS 4/55201: Computer Networks Fall 2001 38 of 47

FDDI FDDI Timed Token Algorithm Token Holding Time (THT): upper limit on how long a station can hold the token. Token Rotation Time (TRT): how long it takes the token to traverse the ring. TRT ActiveNodes THT + RingLatency Target Token Rotation Time (TTRT): agreed-upon upper bound on TRT. Algorithm each node measures TRT between successive arrivals of the token if measured TRT > TTRT, then token is late so don t send data if measured TRT < TTRT, then token is early so OK to send data define two classes of traffic synchronous data: can always send asynchronous data: can send only if token is early worse case: 2 TTRT between seeing token not possible to have back-to-back rotations that take 2 TTRT time Lost Token Token Maintenance no token when initializing ring bit error corrupts token pattern node holding token crashes Generating a Token (and agreeing on TTRT) execute when join ring or suspect a failure each node sends a special claim frame that includes the node s bid for the TTRT when receive claim frame, update bid and forward if your claim frame makes it all the way around the ring: your bid was the lowest everyone knows TTRT you insert new token Monitoring for a Valid Token should see valid transmission (frame or token) periodically maximum gap = ring latency + max frame 2.5ms set timer at 2.5ms and send claim frame if it fires CS 4/55201: Computer Networks Fall 2001 39 of 47 CS 4/55201: Computer Networks Fall 2001 40 of 47

Host I/O Bus FDDI Network Adaptors 8 Start of Frame Control Control Field Dest Addr Src Addr Frame Format 8 48 48 32 8 24 Body CRC End of Frame 1st bit: asynchronous (0) versus synchronous (1) data 2nd bit: 16-bit (0) versus 48-bit (1) addresses Status last 6 bits: demux key (includes reserved patterns for token and claim frame) Status Field from receiver back to sender error in frame recognized address accepted frame (flow control) Network Adaptors Overview Typically where data link functionality is implemented Framing Error Detection Media Access Control (MAC) Adaptor bus interface link interface Network Link CS 4/55201: Computer Networks Fall 2001 41 of 47 CS 4/55201: Computer Networks Fall 2001 42 of 47

... Network Adaptors Network Adaptors Host Perspective Control Status Register (CSR) Available at some memory address CPU can read and write CPU instructs Adaptor (e.g., transmit) Adaptor informs CPU (e.g., receive error) Moving Frames Between Host and Adaptor Direct Memory Access (DMA) Memory Buffers 100 1400 1500 1500 Example LE_RINT 0x0400 Received packet Interrupt (RC) LE_TINT 0x0200 Transmitted packet Interrupt (RC) LE_IDON 0x0100 Initialization Done (RC) LE_IENA 0x0040 Interrupt Enable (RW) LE_INIT 0x0001 Initialize (RW1) 1500 Buffer Descriptor List Programmed I/O (PIO) signalling component Node Adapter signal Adapter Node bits CS 4/55201: Computer Networks Fall 2001 43 of 47 CS 4/55201: Computer Networks Fall 2001 44 of 47

Network Adaptors Network Adaptors Interrupt Handler Device Driver interrupt_handler() { disable_interrupts(); /* some error occurred */ if (csr & LE_ERR) { print_and_clear_error(); } /* transmit interrupt */ if (csr & LE_TINT) { csr = LE_TINT LE_INEA; semsignal(xmit_queue); } /* receive interrupt */ if (csr & LE_RINT) { receive_interrupt(); } enable_interrupts(); return(0); } Transmit Routine: transmit(msg *msg) { char *src, *dst; Context c; int len; } semwait(xmit_queue); semwait(mutex); disable_interrupts(); dst = next_xmit_buf(); msgwalkinit(&c, msg); while ((src = msgwalk(&c, &len))!= 0) copy_data_to_lance(src, dst, len); msgwalkdone(&c); enable_interrupts(); semsignal(mutex); return; CS 4/55201: Computer Networks Fall 2001 45 of 47 CS 4/55201: Computer Networks Fall 2001 46 of 47

Network Adaptors Receive Interrupt Routine receive_interrupt() { Msg *msg, *new_msg; char *buf; while (rdl = next_rcv_desc()) { /* create process to handle this message */ msg = rdl->msg; process_create(ethdemux, msg); } /* msg eventually freed in ethdemux */ /* now allocate a replacement */ buf = msgconstructallocate(new_msg, MTU); rdl->msg = new_msg; rdl->buf = buf; install_rcv_desc(rdl); } return; CS 4/55201: Computer Networks Fall 2001 47 of 47