Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
The Data Link Layer Frame and Frame Fields
A frame is a unit of communication in the data link layer. The data link layer takes packets from the network layer and encapsulates them into frames. If the frame size becomes too large, then the packet may be divided into smaller sized frames. At the receiver's end, the data link layer picks up signals from hardware and assembles them into frames.
Fields of a Data Link Layer Frame
A data link layer frame has the following parts:
-
Frame Header − Contains the source and destination addresses of the frame and control bytes.
-
Payload field − Contains the message to be delivered from the network layer.
-
Trailer − Contains error detection and correction bits, also called a Frame Check Sequence (FCS).
-
Flag − Two flags at both ends mark the beginning and end of the frame.
Frame Header Fields
A frame header contains the destination address, source address, and three control fields (kind, seq, and ack) serving the following purposes:
-
kind − States whether the frame is a data frame or used for control functions like error and flow control or link management.
-
seq − Contains the sequence number of the frame for rearrangement of out-of-sequence frames and sending acknowledgments by the receiver.
-
ack − Contains the acknowledgment number of some frame, particularly when piggybacking is used.
Specific Data Link Layer Protocols
The structure of the data link layer frame may be specialized according to the type of protocol used. Let us examine the frame structures used in Point-to-Point Protocol (PPP) and High-level Data Link Control (HDLC).
Point-to-Point Protocol (PPP)
PPP is a communication protocol of the data link layer used to transmit multiprotocol data between two directly connected computers. The fields of a PPP frame are:
-
Flag − 1 byte with bit pattern
01111110. -
Address − 1 byte set to
11111111for broadcast. -
Control − 1 byte set to constant value
11000000. -
Protocol − 1 or 2 bytes defining the type of data in the payload field.
-
Payload − Carries data from the network layer. Maximum length is 1500 bytes.
-
FCS − 2 or 4 bytes frame check sequence for error detection using CRC (Cyclic Redundancy Check).
High-level Data Link Control (HDLC)
HDLC is a group of communication protocols of the data link layer for transmitting data between network points or nodes. The fields of an HDLC frame are:
-
Flag − 8-bit sequence with bit pattern
01111110. -
Address − Contains the address of the receiver. May be from 1 byte to several bytes.
-
Control − 1 or 2 bytes containing flow and error control information.
-
Payload − Carries data from the network layer. Length varies from one network to another.
-
FCS − 2 or 4 bytes frame check sequence for error detection using CRC.
Comparison of PPP and HDLC
| Feature | PPP | HDLC |
|---|---|---|
| Flag Pattern | 01111110 | 01111110 |
| Address Field | Fixed (11111111) | Variable length |
| Control Field | Fixed (11000000) | 1-2 bytes variable |
| Protocol Field | 1-2 bytes | Not present |
| Usage | Point-to-point links | Multi-point networks |
Conclusion
Data link layer frames provide a structured format for transmitting data between adjacent network nodes. The frame structure includes flags for delimiting, headers for addressing and control, payload for actual data, and trailers for error detection, with specific implementations varying by protocol like PPP and HDLC.
