80 likes | 406 Views
Framing Neil Tang 9/19/2008. Outline. Framing Byte-Oriented Framing Bit-Oriented Framing Clock-Based Framing. Framing. The main problem is to identify the beginning and the end of each frame. Byte-Oriented Framing. Sentinel Approach (BISYNC and PPP)
E N D
FramingNeil Tang9/19/2008 CS440 Computer Networks
Outline • Framing • Byte-Oriented Framing • Bit-Oriented Framing • Clock-Based Framing CS440 Computer Networks
Framing • The main problem is to identify the beginning and the end of each frame. CS440 Computer Networks
Byte-Oriented Framing Sentinel Approach (BISYNC and PPP) • A frame is composed of several fields whose lengths are multiples of 8 bits (byte) • Character-Stuffing (escaping): precedes the control character with the escaping character (e.g., DLE) if it appears in the body/payload. CS440 Computer Networks
Byte-Oriented Framing Byte-Counting Approach (DDCMP) • COUNT Field: specifies how many bytes are contained in the frame’s body. • Farming Error: COUNT field is corrupted. CS440 Computer Networks
Bit-Oriented Framing (HDLC) • HDLC denotes both the beginning and the end of a frame with 01111110. • Bit-Stuffing: In the sender, insert a 0 after every five consecutive 1s. In the receiver, after five consecutive 1s, if 0, stuffed; if 1, look at the next bit. If 0, end-of-a-frame marker; otherwise error. • The receiver will discard the frame if error happens and it will start to receive again until next 01111110. CS440 Computer Networks
Clock-Based Framing (SONET) • The first 2 bytes contain a special bit pattern are used to determine where the frame starts. • Each frame has the fixed length of 9 90 = 810 bytes, no bit/byte stuffing is used. • The receiver looks for the special bit pattern consistently hoping to see it appearing every 810 bytes. CS440 Computer Networks
Clock-Based Framing (SONET) • Multiplexing • Sub-frames are interleaved. CS440 Computer Networks