Professional Documents
Culture Documents
Framing
This structure must be recovered (recognized) by the receiver out of a sequence of raw bits, which requires identifying the frame boundaries Frame synchronization or delineation (or simply framing) is the process of defining and locating frame boundaries (start and end of the frame) on a bit sequence When channel multiplexing at the physical layer is based on a physical frame structure, frame synchronization is also required (it is different and can coexist with data framing performed on each channel)
Examples are the plesiochronous (PDH) and the synchronous (SONET/SDH) multiplexing digital hierarchies based on STDM
Framing methods
The problem of framing is solved in different ways depending on the frames having a fixed (known) length or a variable length For frames of fixed length (e.g., a physical layer SONET/SDH frame or an ATM cell), it is only necessary to identify the start of the frame and add the frame size to locate the end of the frame framing methods can thus exploit the occurrence of either periodic patterns or known correlations that occur periodically in bit sequences (the latter is exploited in ATM) For frames of variable size, special synchronization characters or bit patterns are used to identify the start of a frame, while different explicit or implicit methods can be used for identifying the end of a frame (e.g., special characters or bit patterns, a length field or some event that may be associated with the end of the frame)
Stuffing techniques
Earlier data link layer protocols were character oriented the code used to represent sequences of printable characters (e.g., ASCII) was also used to support other protocol functions, such as frame synchronization, by means of special (non printable) characters
This method, in its basic form, is not transparent, since a frame cannot carry any arbitrary sequence of bits as data To achieve transparency it is necessary to use special character sequences based on an escape character (character stuffing)
Bit oriented protocols were developed to overcome the limitations of character oriented protocols and, in particular, to allow independence of codes (transparency)
In point-to-point links, frames are usually delimited with a special bit sequence (flag) and transparency is achieved by means of bit stuffing
Frames delimited with flags may also be organized as a collection of bytes (byte oriented protocols)
Transparency in this case is achieved by means of byte stuffing, which is different from character stuffing used in character oriented protocols
With this basic method it is only possible to carry data coded with the same code used by the protocol (the original objective in text-based applications) Transparency is achieved by using an escape character DLE (Data Link Escape) in ASCII and delimiting the transparent data field with DLE STX and DLE ETX (or DLE ETB)
If the DLE character appears in the data field it must be replaced by the sequence DLE DLE (character stuffing)
Bisync (Binary Synchronous) was one popular example of a character oriented protocol
Bit stuffing
Frame format
Flag Address Control Data FCS Flag
00111111011111111111000111110100
Stuffing
001111101011111011111010001111100100
Destuffing
00111111011111111111000111110100
To achieve transparency, it is also necessary to prevent any byte within a frame to coincide with the flag pattern For this purpose, a special escape byte (ESC) is inserted before the byte with the flag pattern this is called byte stuffing The use of the escape byte to achieve transparency means that the occurrence of a byte with the ESC pattern must also be stuffed
The receiver performs the reverse operation when ESC is found in the byte stream, it is removed, and the following byte is replaced by performing an exclusive OR with 0x20 (thus obtaining 0x7E or 0x7D and recovering the Flag or ESC, respectively)
This method was used in DECNETs DDCMP (Digital Data Communications Message Protocol) A length field can be used together with end of frame delimiters, thus providing an extra verification mechanism
A frame will be accepted only if the end delimiter appears in the position determined by the length field and the error checking mechanism does not detect an error
The protocol used in the original Ethernet is based on listening to the activity on a shared medium (carrier sense)
A station detects that there is no transmission in course when no carrier is present (no transitions detected)
When a station acquires the medium it starts to transmit a frame and at the end of the frame it simply ceases to transmit coded bits At a receiving station the start of a frame is identified by a known pattern that consists in
A Preamble that is made up of seven bytes with the pattern 10101010 and is used for bit synchronization A Start of Frame Delimiter (SFD) with the pattern10101011 that precedes the remaining fields of the frame
At a receiving station, the end of a frame is detected by the absence of transitions in the coded signal (no carrier present)
The start and the end of a frame are identified by a Start of Frame Delimiter (SFD) and an End of Frame Delimiter (EFD), respectively Two symbols (called J and K) with a duration of one bit interval are used in SFD and EFD as code violations of the differential Manchester code
J and K are represented as line signals without any transition at the middle of a bit interval K is coded such that the line signal has a transition at the start of the bit interval (like binary 0), while J is coded without such a transition (like binary 1)
The first six bits of SFD and EFD are coded as JK0JK0 and JK1JK1, respectively (the other two bits are used for other purposes)
K
NONE BINARY NRZ
DIFFERENTIAL MANCHESTER
0 1 J K
YES NO NO YES
The End Delimiter is represented by a single T symbol and is followed by three frame status control symbols The FDDI physical interface (and 4B5B coding) was also adopted by the ATM Forum in the specification of an ATM private interface at 100 Mbit/s
Transmission of cells in not necessarily contiguous and, in the absence of cells to transmit, pairs of JK symbols are inserted (11000 1001) Each cell is preceded by a TT pair (01101 01101)
bit by bit
Correct HEC
hunt presynch
Incorrect HEC consecutive incorrect HEC consecutive correct HEC
cell by cell
sync
= 7 = 6 (SDH-based Physical Layer) 8 (cell-based Physical Layer)
cell by cell