Physical Layer Framing
At the Physical Layer, frames tend to occur on common carrier or MSO services or technologies. Examples of this include T-carrier and SONET networks and services. The framing structure is create largely to make it possible for the line and end equipment to synchronize on the bit stream and find particular elements within it.
For example, the T-1 frame is a 193-bit pattern that repeats 8,000 times per second. This repetition cycle is dictated by the initial purpose of the T-1, to carry digitized voice. The digitizing process used in North America is called PAM/PCM and creates an 8-bit code every 125 microseconds (1/8000th of a second).
The first bit of this frame is called the framing bit and is given a specific repeating pattern that end and line equipment can identify and "lock on" to the frame. Once the equipment has synchronized on the frame, it can then locate the individual channels (each frame contains 24 samples from 24 different voice conversations) as well as other control information (e.g., signaling, management, and line status information) that can exist in the bit stream.
Physical Layer frames tend to be sent synchronously. That is to say, the frames are generated one behind the other without interruption in a continuous flow.
Data Link Layer Framing
At the Data Link Layer, a frame is the basic unit of transmission. It comprises a series of bits organized into three basic elements: a header, a payload, and a trailer. Most Data Link Layer protocols have all three elements, but a few omit either the header or the trailer. In general, the header tends to contain addressing and control information. The payload contains the information being transmitted (e.g., usually provided by the Network Layer), and the trailer contains the error checking code, also known as a frame check sequence (FCS), which is typically a cyclic redundancy check (CRC).
Because the payload field of most Data Link Layer protocols can vary in length, the entire frame typically is permitted to vary in length, although most protocols place an upper and/or lower bound on the size of the frame. Frames tend to be transmitted asynchronously. That is to say, a frame is only generated when there is information to be transmitted. Between frames the Data Link Layer protocol could provide a filler bit pattern or simply allow the line to go silent. Which is done depends on the nature of the underlying Physical Layer.
Examples of protocols that define a Data Link Layer frame include the Point-to-Point Protocol (PPP), Ethernet, frame relay, and Wi-Fi. Although ATM is also considered a Data Link Layer protocol, the transmission unit in ATM is called a cell because it is fixed in length and small.