Computer Networks Framing

Similar documents
Sebastián Bravo López

Channel Assignment Strategies for Cellular Phone Systems

Static Fairness Criteria in Telecommunications

arxiv:astro-ph/ v2 10 Jun 2003 Theory Group, MS 50A-5101 Lawrence Berkeley National Laboratory One Cyclotron Road Berkeley, CA USA

Computer Networks UDP and TCP

Chapter 1 Microeconomics of Consumer Theory

5.2 The Master Theorem

Hierarchical Clustering and Sampling Techniques for Network Monitoring

Computer Networks Network architecture

Decimal numbers. Chapter

IEEE TRANSACTIONS ON DEPENDABLE AND SECURE COMPUTING, VOL. 9, NO. 3, MAY/JUNE

Weighting Methods in Survey Sampling

Performance Analysis of IEEE in Multi-hop Wireless Networks

1.3 Complex Numbers; Quadratic Equations in the Complex Number System*

Classical Electromagnetic Doppler Effect Redefined. Copyright 2014 Joseph A. Rybczyk


Capacity at Unsignalized Two-Stage Priority Intersections

Dispersion in Optical Fibres

Operating Systems and Computer Networks / Datenverarbeitung 2 / Data Processing 2

A Comparison of Default and Reduced Bandwidth MR Imaging of the Spine at 1.5 T

Programming Basics - FORTRAN 77

A Comparison of Service Quality between Private and Public Hospitals in Thailand

FOOD FOR THOUGHT Topical Insights from our Subject Matter Experts

How To Fator

A Keyword Filters Method for Spam via Maximum Independent Sets

CIS570 Lecture 4 Introduction to Data-flow Analysis 3

UNIVERSITY AND WORK-STUDY EMPLOYERS WEB SITE USER S GUIDE

ECE 358: Computer Networks. Homework #3. Chapter 5 and 6 Review Questions 1

Data Link Layer(1) Principal service: Transferring data from the network layer of the source machine to the one of the destination machine

DSP-I DSP-I DSP-I DSP-I

Findings and Recommendations

Open and Extensible Business Process Simulator

10.1 The Lorentz force law

USA Mathematical Talent Search. PROBLEMS / SOLUTIONS / COMMENTS Round 3 - Year 12 - Academic Year

AngelCast: Cloud-based Peer-Assisted Live Streaming Using Optimized Multi-Tree Construction

Asymmetric Error Correction and Flash-Memory Rewriting using Polar Codes

Impedance Method for Leak Detection in Zigzag Pipelines

Deadline-based Escalation in Process-Aware Information Systems

THE PERFORMANCE OF TRANSIT TIME FLOWMETERS IN HEATED GAS MIXTURES

Trade Information, Not Spectrum: A Novel TV White Space Information Market Model

Dataflow Features in Computer Networks

Big Data Analysis and Reporting with Decision Tree Induction

) ( )( ) ( ) ( )( ) ( ) ( ) (1)

Applied Data Communication Lecture 14

Suggested Answers, Problem Set 5 Health Economics

Data Link Protocols. 5.4 Framing

WAN Data Link Protocols

Improved SOM-Based High-Dimensional Data Visualization Algorithm

cos t sin t sin t cos t

Fixed-income Securities Lecture 2: Basic Terminology and Concepts. Present value (fixed interest rate) Present value (fixed interest rate): the arb

OpenScape 4000 CSTA V7 Connectivity Adapter - CSTA III, Part 2, Version 4.1. Developer s Guide A31003-G9310-I D1

Supply chain coordination; A Game Theory approach

i_~f e 1 then e 2 else e 3

SOFTWARE ENGINEERING I

Petri nets for the verification of Ubiquitous Systems with Transient Secure Association

Optimal Sales Force Compensation

WORKFLOW CONTROL-FLOW PATTERNS A Revised View

Recovering Articulated Motion with a Hierarchical Factorization Method

Intuitive Guide to Principles of Communications By Charan Langton

4.15 USING METEOSAT SECOND GENERATION HIGH RESOLUTION VISIBLE DATA FOR THE IMPOVEMENT OF THE RAPID DEVELOPPING THUNDERSTORM PRODUCT

Understanding SAE J1939. by Simma Software, Inc.

Computer Network. Interconnected collection of autonomous computers that are able to exchange information

3 Game Theory: Basic Concepts

Retirement Option Election Form with Partial Lump Sum Payment

User s Guide VISFIT: a computer tool for the measurement of intrinsic viscosities

Computer Networks. Data Link Layer

INCOME TAX WITHHOLDING GUIDE FOR EMPLOYERS

A Holistic Method for Selecting Web Services in Design of Composite Applications

An Enhanced Critical Path Method for Multiple Resource Constraints

Solving the Game of Awari using Parallel Retrograde Analysis

High-Level Data Link Control

Electrician'sMathand BasicElectricalFormulas

Price-based versus quantity-based approaches for stimulating the development of renewable electricity: new insights in an old debate

Ethernet. Ethernet Frame Structure. Ethernet Frame Structure (more) Ethernet: uses CSMA/CD

Availability, Reliability, Maintainability, and Capability

Working with the IFS in RPG IV. Scott Klement

Soft-Edge Flip-flops for Improved Timing Yield: Design and Optimization

RESEARCH SEMINAR IN INTERNATIONAL ECONOMICS. Discussion Paper No The Evolution and Utilization of the GATT/WTO Dispute Settlement Mechanism

Chapter 5 Single Phase Systems

AUDITING COST OVERRUN CLAIMS *

DATA COMMUNICATION (Basics of data communication, OSI layers.)

INCOME TAX WITHHOLDING GUIDE FOR EMPLOYERS

VOLTAGE CONTROL WITH SHUNT CAPACITANCE ON RADIAL DISTRIBUTION LINE WITH HIGH R/X FACTOR. A Thesis by. Hong-Tuan Nguyen Vu

Bayes Bluff: Opponent Modelling in Poker

A Three-Hybrid Treatment Method of the Compressor's Characteristic Line in Performance Prediction of Power Systems

To the Graduate Council:

Signalling Control System Serial Train Information Interface

In order to be able to design beams, we need both moments and shears. 1. Moment a) From direct design method or equivalent frame method

Optimal Online Buffer Scheduling for Block Devices *

Local Area Networks transmission system private speedy and secure kilometres shared transmission medium hardware & software

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

Pattern Recognition Techniques in Microarray Data Analysis

FIRE DETECTION USING AUTONOMOUS AERIAL VEHICLES WITH INFRARED AND VISUAL CAMERAS. J. Ramiro Martínez-de Dios, Luis Merino and Aníbal Ollero

Transport Layer Protocols

Transcription:

Computer Networks Framing Saad Mneimneh Computer Siene Hunter College of CUNY New York Introdution Who framed Roger rabbit? A detetive, a woman, and a rabbit in a network of trouble We will skip the physial layer and the detail of how ommuniation signals are sent and reeived. In doing so, we are simply going to assume (a orret assumption) that we are apable of sending bits over a single link. Using this abstration, the DLC layer beomes responsible for reliable transmission of pakets over a single link. Reliable transmission of pakets means that every paket is delivered one, only one, without errors, and in order. To ahieve this goal, the DLC layer performs three operations: Framing: determines start and end of pakets (all we see is a string of bits) and their order by inserting paket headers Error detetion: determines when errors exist using paket trailers Error orretion: retransmits pakets ontaining errors 2 Framing The main problem is to deide where suessive pakets start and end. Therefore, the DLC enapsulates the paket into a frame by adding its own header and trailer. header paket trailer frame Figure : From paket to frame Moreover, if there is a period of idle fills between suessive frames (a synhronous bit pipe keeps on sending even if there is no data), it beomes also neessary to separate

idle fills from frames. Even when idle fills are replaed by dead periods (intermittent bit pipe), the problem is not simplified, beause often there are no dead periods. For instane, where is the data in the following string of bits:... 0000000000000... 2. Charater based framing Charater based odes, suh as ASCII (7 bits and parity bit), provide binary representation for keyboard haraters and terminal ontrol haraters. The idea in harater based framing is that suh odes an also provide representation for various ommuniation haraters: SYN: a string of SYN haraters provide idle fill between frames when a sending DLC has no data to send (but a synhronous modem requires bits) STX: start of text ETX: end of text frame SYN SYN STX header paket ETX CRC SYN SYN trailer added by DLC for error detetion (later) Figure 2: Charater based frame One disadvantage of harater based framing is that the frame must ontain an integer number of haraters; otherwise, the haraters annot be read orretly. This also raises a question: how do we send binary data? For instane, a paket is a binary string of arbitrary length. Even more important is that a paket may possibly ontain, say the ETX harater, whih ould be wrongly interpreted as end of frame. To solve these problems, a speial ontrol harater DLE (Data Link Esape) is inserted before any intentional use of the ommuniation ontrol haraters. The DLE harater is not inserted before the possible appearane of these haraters as part of the binary data. Of ourse this raises another question: what if DLE itself appears in the data? Well, then we an insert a DLE before eah appearane of DLE in the data. For example DLE ETX (but not DLE DLE ETX) is end of frame, and DLE DLE ETX (but not DLE DLE DLE ETX) is DLE ETX in the data. frame SYN SYN DLE STX header paket DLE ETX CRC SYN SYN Figure 3: The DLE esape harater Charater based framing adds too muh overhead; for instane, at least 6 haraters/paket need to be added for synhronous bit pipes: SYN SYN DLE STX... DLE ETX. This was the primary framing method from 960 to 975, e.g. ARPANET.

2.2 Length field The basi problem as seen so far is to inform the reeiving DLC where eah idle fill ends and where eah frame ends. In priniple, an idle fill is easy to identify beause it is represented by a fixed string. The end of a frame, however, is harder to indiate beause the frame onsists of arbitrary and unknown bit string. Therefore, one solution is to inlude a length field of ertain number of bits in the header (e.g. DECNET). length Idle fill paket CRC Idle fill header paket CRC header Figure 4: Length field in header As it an be seen from the above figure, one synhronized, DLC an always tell where the next frame starts. However, one drawbak of this tehnique is the diffiulty to reover from errors in the length field; for instane, a resynhronization is needed after suh an error. Another drawbak of this tehnique is that the length field restrits the paket size; the length field must ontain at least log 2 MaxF ramesize + bits (that s the overhead). Therefore, if L is the size of the length field in bits, then L > log 2 MaxF ramesize and MaxF ramesize < 2 L bits. 2.3 Fixed length pakets/frames In networks with fixed length pakets, the length field is impliit (not needed) beause all pakets (and hene frames) have the same size. An example of suh networks is ATM, where all pakets are 53 bytes long. This framing tehnique requires synhronization upon initialization. Another drawbak is that message length often not a multiple of paket size. In this ase, the last paket of the message will ontain idle fills (what happens to the overhead?) 2.4 Bit oriented framing In harater based framing, DLE ETX indiates the end of the frame, and it is avoided within the frame itself by doubling eah DLE harater in the data. In bit oriented framing, a speial binary flag indiates the end of the frame, and it is avoided within the frame itself by using a tehnique alled bit stuffing. Therefore, the onept is the same, but the main differene is that a flag, unlike DLE ETX, an be of any length (later we see how to set that length to minimize the overhead). Standard protools use 00 as the binary flat, we denote it by 0 6 0. The same flag an be used to indiate the start of the frame. 00.................. 00 Standard DLCs have also an abort apability in whih a frame an be aborted by sending seven or more onseutive s (5 onseutive s mean the link is idle). Therefore, 0, i.e. 0 6 is the atual bit string that must be avoided in the data by bit stuffing.

Bit stuffing was invented by IBM in 970, and works as follows: The sender DLC inserts (stuffs) a 0 after eah appearane of five onseutive s, and appends the flag 0 6 0 (without stuffing) at the end of the frame. The reeiver DLC deletes the first 0 after eah string of five onseutive s. If six onseutive s are seen, this is interpreted as the end of the frame. stuffed bits 0 0 0 0 0 0 0 Figure 5: Bit stuffing Something to think about: whih ones of the above stuffed bits an be avoided (provided the reeiver s rule for deleting stuffed bits is hanged aordingly)? Assume that the flag has the pattern 0 j 0. How long should the flag be. Let us onsider the overhead. On one hand, if j inreases, we have less stuffing but a longer flag. On the other hand, if j dereases, we have more stuffing but a shorter flag. For the sake of our analysis, let us assume a random string of bits with p(0) = p() = /2. Therefore, insertion after the i th bit ours with probability (/2) j. 0. {{.. j Also another type of insertion after the i th bit ours with probability (/2) 2j 0. {{... {{.. j j Sine (/2) 2j << (/2) j, we an ignore suh event and events of insertion due to yet longer strings of s. The probability of stuffing after the i th bit is approximately 2 j, whih is also E[# stuffed bits @ i], the expeted number of insertions after the i th bit. By the linearity of expetation, E[# stuffed bits K] K2 j (be areful at boundary), where K is the length of the frame. Therefore, E[# stuffed bits] = E[K]2 j E[overhead] = E[K]2 j + j + 2 {{ {{ stuffed flag

Minimizing with respet to j, we need smallest j suh that E[K]2 j + j + 2 < E[K]2 (j+) + (j + ) + 2 j j + Figure 6: Minimizing overhead E[k]2 (j+) < The smallest j that satisfies the above inequality is j = log 2 E[k]. We an show that (homework?): log 2 E[K] + 2.94 E[overhead] log 2 E[K] + 3 2.5 What is the best overhead? Length field based framing and bit oriented framing are omparable in their overhead, log 2 K where K is the length of the frame. Can we do better? Information theory tells us NO. Essentially, we are enoding information about the length of the frame at the sending DLC and transmitting it to the reeiving DLC. At least we need a number of bits equal to the entropy H = K max k= p(k) log 2 p(k) When distribution is uniform, i.e. p =, H = log 2. 2.6 Maximum paket size Reall that the transport layer is the one responsible for breaking messages into pakets. So how should the transport layer hoose the maximum paket size? Pratially speaking, this is not a big deal sine IP fragments pakets further if neessary. Usually paket size is about 500 bytes (from Ethernet). But theoretially speaking, for a given overhead of V bits, what is the best maximum paket size? Let M be the message length. Then we have M + M V

bits to send V V V Rest V M The overhead per message is V. If inreases, we have a small overhead per message; therefore, less bits to transmit. But sine the message might need to traverse many links, a larger paket size may result in a slower delivery time, beause eah intermediate node must wait until it ompletely reeives a paket before relaying it. reeiver 2 3 4 j sender Figure 7: Traversing links This additional total waiting time an be omputed as: ( + V )(j ) where is the apaity of a link in bps (bandwidth). Therefore, small overhead per message, larger wait bigger overhead, but smaller wait Whih value of ahieves the best tradeoff? Let us minimize the time to deliver the message. The time needed for the message to traverse j links is: (Kmax + V )(j ) T = + M + M V + P + Q where P and Q are the propagation delay and the queuing delay respetively. Therefore, the expeted value of T is approximately given by: (Kmax + V )(j ) E[T ] = + and we need to minimize E[M] + E[M] V + P + Q (j ) + E[M] V By taking the first derivative with respet to and setting it to zero, we get E[M]V = j Referenes Dimitri Bertsekas and Robert Gallager, Data Networks Larry Peterson and Brue Davie, Computer Networks: A Systems Approah