Unformatted text preview:

CS519Homework 1 (due 2/8/04)In class, I described how the packet header always contains two fields, the "length" field and the "where" field. The length field is used to determine where the next packet begins. (1.1.1) Can you think of another way of delimiting the boundaries of variable length "chunks of data" that does not require a length field per se. (1.1.2) If so, what are the pros and cons of this way compared to the packet length field?CS519Framing| A frame is like a packet in that it can be a variable length “chunk of data”| Use a well-defined bit pattern to indicate “start of frame”z Delimiter defines frame boundaryz Text book calls this delimiter a “sentinel”| For instance, HDLC and PPP use “01111110” as the delimiterz Also sent when there is no data, so that clocks on either end may stay synchronizedCS519What if the delimiter is in the data???| If the actual upper layer packet contains 01111110 it will look like a frame boundary to the receiver| The sender must “bit stuff” (or “byte stuff”, if using a byte-oriented approach| Similar to escape characters in stringsz i.e. printf(“He said \”I love 519\”.”);z produces: He said “I love 519”.CS519Link framing components:CS519HDLC bit stuffing| Sender:z If see “011111”, stuff in a 0z If end of frame, stuff in “01111110”| Receiver:z If see “0111110…”, remove the 0z If see “01111110”, this is end of framez If see “01111111”, this is an errorCS519Disadvantage of framing| The sender and receiver must examine and possibly modify every byte (or bit)!z Framing normally done in hardware, along with error detection| With length field, receiver simply counts bytes and starts examining bytes at the next headerCS519Advantage of framing| Allows sender and receiver to stay in sync| With headers, what happens if an error causes the receiver to lose track of where header boundaries are?z The receiver can never recover!| With framing, the receiver just looks for the next


View Full Document

CORNELL CS 5190 - Homework 1

Download Homework 1
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Homework 1 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Homework 1 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?