- ${item}

Frame
In networking, a frame is the fundamental unit of data transmission at the Data Link Layer (Layer 2) of the OSI model. It is used to encapsulate data for communication between devices on the same local area network (LAN). Frames are critical for switches, as they operate at Layer 2 and use frames to forward data between devices.
Role of Frames in a Switch
- Data Encapsulation:
- Frames encapsulate data from the upper layers (e.g., IP packets) with additional information, such as source and destination MAC addresses, error detection, and control information.
- Addressing:
- Frames include MAC addresses to identify the source and destination devices. Switches use these addresses to forward frames to the correct port.
- Error Detection:
- Frames include a Frame Check Sequence (FCS) field to detect errors during transmission.
- Flow Control:
- Frames can include control information to manage data flow between devices.
Frame Structure
A typical Ethernet frame consists of the following fields:
Field |
Size |
Description |
Preamble |
7 bytes |
Synchronizes the receiver’s clock. |
Start Frame Delimiter (SFD) |
1 byte |
Marks the beginning of the frame (10101011). |
Destination MAC Address |
6 bytes |
The MAC address of the intended recipient. |
Source MAC Address |
6 bytes |
The MAC address of the sender. |
EtherType/Length |
2 bytes |
Indicates the protocol type (e.g., IPv4, IPv6) or the length of the payload. |
Payload |
46–1500 bytes |
The actual data being transmitted (e.g., an IP packet). |
Frame Check Sequence (FCS) |
4 bytes |
A CRC value used to detect errors in the frame. |