Layer 2 framing
6.1.5 This page will explain how frames are created at Layer 2 of the OSI model.
Encoded bit streams, or data, on physical media represent a tremendous technological accomplishment, but they, alone, are not enough to make communication happen. Framing provides essential information that could not be obtained from coded bit streams alone. This information includes the following:
• Which computers are in communication with each other
• When communication between individual computers begins and when it ends
• Which errors occurred while the computers communicated
• Which computer will communicate next
Framing is the Layer 2 encapsulation process. A frame is the Layer 2 protocol data unit.
A voltage versus time graph could be used to visualize bits. However, it may be too difficult to graph address and control information for larger units of data. Another type of diagram that could be used is the frame format diagram, which is based on voltage versus time graphs. Frame format diagrams are read from left to right, just like an oscilloscope graph. The frame format diagram shows different groupings of bits, or fields, that perform other functions.
There are many different types of frames described by various standards.A single generic frame has sections called fields. Each field is composed of bytes. The names of the fields are as follows:
• Start Frame field
• Address field
• Length/Type field
• Data field
• Frame Check Sequence (FCS) field
When computers are connected to a physical medium, there must be a way to inform other computers when they are about to transmit a frame. Various technologies do this in different ways. Regardless of the technology, all frames begin with a sequence of bytes to signal the data transmission.
All frames contain naming information, such as the name of the source node, or source MAC address, and the name of the destination node, or destination MAC address.
Most frames have some specialized fields. In some technologies, a Length field specifies the exact length of a frame in bytes. Some frames have a Type field, which specifies the Layer 3 protocol used by the device that wants to send data.
Frames are used to send upper-layer data and ultimately the user application data from a source to a destination. The data package includes the message to be sent, or user application data. Extra bytes may be added so frames have a minimum length for timing purposes. LLC bytes are also included with the Data field in the IEEE standard frames. The LLC sublayer takes the network protocol data, which is an IP packet, and adds control information to help deliver the packet to the destination node. Layer 2 communicates with the upper layers through LLC.
All frames and the bits, bytes, and fields contained within them, are susceptible to errors from a variety of sources. The FCS field contains a number that is calculated by the source node based on the data in the frame. This number is added to the end of a frame that is sent. When the destination node receives the frame the FCS number is recalculated and compared with the FCS number included in the frame. If the two numbers are different, an error is assumed, the frame is discarded.
Because the source cannot detect that the frame has been discarded, retransmission has to be initiated by higher layer connection-oriented protocols providing data flow control. Because these protocols, such as TCP, expect frame acknowledgment, ACK, to be sent by the peer station within a certain time, retransmission usually occurs.
There are three primary ways to calculate the FCS number:
• Cyclic redundancy check (CRC) – performs calculations on the data.
• Two-dimensional parity – places individual bytes in a two-dimensional array and performs redundancy checks vertically and horizontally on the array, creating an extra byte resulting in an even or odd number of binary 1s.
• Internet checksum – adds the values of all of the data bits to arrive at a sum.
The node that transmits data must get the attention of other devices to start and end a frame. The Length field indicates where the frame ends. The frame ends after the FCS. Sometimes there is a formal byte sequence referred to as an end-frame delimiter.
The next page will discuss the frame structure of an Ethernet network.
Saturday, January 16, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment