keepcalculator

06 Numbers and Powers

Data Link Protocol: How Layer 2 Frames Data

Card No. 06·37568 · Updated · Standard formula, shown below

Framing efficiency 98.80 %
Effective throughput
988.00 Mbit/s
Result
Overhead percentage
1.20 %
Result
Frame size
1500 bytes
You entered
You enter
Frame size, Header + trailer, Link bit rate
You get
Framing efficiency, Effective throughput, Overhead percentage
Rounding
2 dp

Data link protocols (Layer 2 of the OSI model) package raw bits from the physical layer into structured frames, add addressing and error checks, and manage access to the shared medium so that devices on the same network segment can exchange data reliably. You enter the frame size, header overhead, and bit rate; the calculator returns the effective throughput and framing efficiency. This article explains the framing process, the common protocols, and the trade-offs involved.

Formula

Framing efficiency (η) is the ratio of payload data to the total frame size:

η = (Frame size – Overhead) / Frame size × 100%

Effective throughput (G) is the link bit rate multiplied by that efficiency:

G = Bit rate × (Frame size – Overhead) / Frame size

Where:

  • Frame size – total number of bytes in the frame, including header, payload, and trailer (e.g., 1500 bytes for standard Ethernet).
  • Overhead – bytes used for addressing, control, and error detection that are not user data (e.g., 18 bytes for an Ethernet header and FCS without VLAN tag).
  • Bit rate – nominal data rate of the link in megabits per second (Mbit/s).

Worked Example

Using the default values from the calculator:

  • Frame size = 1500 bytes
  • Overhead = 18 bytes
  • Bit rate = 1000 Mbit/s

Step 1: Payload bytes = 1500 – 18 = 1482 bytes

Step 2: Efficiency = 1482 / 1500 × 100% = 98.80%

Step 3: Effective throughput = 1000 × 1482 / 1500 = 988.00 Mbit/s

The calculator shows 98.80% efficiency and 988.00 Mbit/s throughput, matching the manual calculation.

What Is a Data Link Protocol?

A data link protocol is a set of rules that governs how two directly connected devices exchange data. It sits between the physical layer (which sends raw bits) and the network layer (which routes packets across multiple hops). The protocol’s job is to take the stream of bits from the physical medium and organize it into discrete units called frames. Each frame carries a header, a payload (the actual data from the network layer), and a trailer. The header contains the destination and source MAC addresses, while the trailer typically contains a frame check sequence (FCS) used for error detection.

Without a data link protocol, a receiver would have no way to know where one packet ends and another begins, nor would it be able to detect corruption caused by electrical noise or interference. The protocol provides the necessary structure for reliable communication on a single link.

How Layer 2 Frames Data: Step by Step

The framing process follows a consistent sequence, though the exact fields vary by protocol:

  1. Receive a packet from Layer 3 – The network layer hands down an IP packet (or other protocol data unit) to the data link layer.
  2. Add the header – The protocol prepends a header containing the destination MAC address, source MAC address, and often a type/length field (e.g., EtherType in Ethernet).
  3. Append the trailer – A frame check sequence (FCS) is computed over the header and payload using a cyclic redundancy check (CRC) algorithm, then appended at the end.
  4. Add preamble and start delimiter (for Ethernet) – A 7-byte preamble and a 1-byte start frame delimiter are added to synchronize the receiver’s clock.
  5. Transmit the frame bit-by-bit – The physical layer encodes the bits onto the medium (e.g., electrical signals on copper, light pulses on fiber).
  6. Receiver checks the FCS – The receiving device recalculates the CRC; if it matches, the frame is accepted, and the payload is passed up to Layer 3. If not, the frame is discarded (no automatic retransmission at this layer for Ethernet).

For point-to-point links like PPP, the process is similar but includes a flag byte at the start and end of the frame, plus byte stuffing to avoid confusion with the flag pattern in the data.

Common Data Link Protocols and Their Differences

Several data link protocols exist, each designed for different media and topologies:

  • Ethernet (IEEE 802.3) – The dominant protocol for wired LANs. It uses MAC addresses, supports full-duplex point-to-point links, and has a maximum frame size of 1518 bytes (or 1522 with a VLAN tag). Modern Ethernet runs at speeds from 10 Mbit/s to 400 Gbit/s.
  • Wi-Fi (IEEE 802.11) – A wireless data link protocol that uses CSMA/CA (carrier sense multiple access with collision avoidance) because wireless medium is shared and half-duplex. Frames include additional fields for power management and QoS.
  • PPP (Point-to-Point Protocol) – Used on serial links (e.g., DSL, dial-up, T1). It provides authentication (PAP/CHAP), compression, and error detection. PPP frames use a flag byte (0x7E) and byte stuffing.
  • HDLC (High-Level Data Link Control) – A bit-oriented protocol used in older WAN links. It supports both point-to-point and multipoint configurations.
  • Frame Relay and ATM – Older WAN protocols that use virtual circuits and fixed-size cells (ATM uses 53-byte cells). They are largely replaced by Ethernet and MPLS in modern networks.

Each protocol has its own framing overhead, which directly affects efficiency. For example, ATM’s 5-byte header per 48-byte payload yields only about 90% efficiency, while Ethernet’s 18-byte overhead on a 1500-byte frame gives over 98% efficiency.

Why Framing Efficiency Matters

Framing overhead is not just a theoretical concept – it reduces the actual throughput you can achieve on a link. A 1 Gbit/s Ethernet link with 1500-byte frames and 18 bytes of overhead delivers at most 988 Mbit/s of user data. If you use smaller frames (e.g., 64 bytes minimum), the efficiency drops to about 72%, meaning you lose nearly 280 Mbit/s of throughput. This is why network engineers prefer larger frames for bulk transfers but must balance against latency and error recovery needs.

Jumbo frames (up to 9000 bytes) are supported on many Gigabit and 10G Ethernet switches. With a 9000-byte frame and the same 18-byte overhead, efficiency rises to 99.8%, which can be significant for storage networks and data centers. However, jumbo frames require all devices on the path to support them; otherwise, frames get fragmented or dropped.

Common Problems and Misconceptions

One common misconception is that the data link layer performs retransmission. In Ethernet, that is false – if a frame fails the FCS check, it is simply dropped. Upper-layer protocols like TCP handle retransmission. Only some data link protocols (e.g., HDLC in certain modes, or Wi-Fi with its acknowledgment mechanism) provide link-layer retransmission.

Another issue is the difference between “frame size” and “MTU” (Maximum Transmission Unit). MTU refers to the maximum payload size, not the total frame size. For Ethernet, the MTU is 1500 bytes, but the total frame is 1518 bytes (including 14-byte header and 4-byte FCS). Confusing these can lead to incorrect calculations of overhead.

Collision detection (CSMA/CD) was a major concern in legacy half-duplex Ethernet. Modern Ethernet runs full-duplex, where collisions are impossible because each device has a dedicated transmit and receive pair. However, Wi-Fi still uses collision avoidance because wireless is inherently shared and half-duplex.

How to Choose a Data Link Protocol

Choosing the right protocol depends on the physical medium, distance, and required reliability:

  • Wired LAN – Ethernet is the default choice due to its speed, low cost, and ubiquity.
  • Wireless LAN – Wi-Fi (802.11) is the only practical option for unlicensed spectrum.
  • Long-distance serial links – PPP is common for DSL and legacy T1 lines, though many have migrated to Ethernet over fiber.
  • Data center storage – Fiber Channel uses its own framing, but Ethernet with jumbo frames is increasingly used for iSCSI.
  • Industrial networks – Protocols like PROFIBUS or CAN use specialized framing for real-time control.

In practice, the choice is often dictated by the hardware available. Ethernet dominates because it is standardized, cheap, and scalable. The framing overhead is a minor consideration compared to compatibility and cost.

Frequently Asked Questions

What is the difference between a frame and a packet?

A frame is a Layer 2 unit that includes MAC addresses and error detection, designed for a single link. A packet is a Layer 3 unit that includes IP addresses and is routed across multiple links. When a packet travels through a router, it is encapsulated into a new frame for each hop.

Why does Ethernet have a minimum frame size of 64 bytes?

The 64-byte minimum ensures that a transmitting station still occupies the medium long enough to detect a collision in half-duplex mode. With a 10 Mbit/s link and a maximum cable length of 2500 meters, a frame shorter than 64 bytes could finish transmitting before the sender hears the collision. Modern full-duplex Ethernet doesn’t need this, but the minimum is kept for compatibility.

Does a larger frame size always improve performance?

Generally yes, because overhead is amortized over more payload. However, larger frames increase latency (a single frame takes longer to transmit) and can cause head-of-line blocking on congested links. Also, if any device on the path doesn’t support jumbo frames, they will be dropped or fragmented, hurting performance.

What happens if a frame is corrupted?

The receiver recalculates the FCS and detects the mismatch. It then discards the frame silently. The sender is unaware unless an upper-layer protocol (like TCP) times out and retransmits. Some protocols like Wi-Fi have an acknowledgment mechanism that triggers a link-layer retransmission.

Can I calculate the overhead of VLAN tags?

Yes. An 802.1Q VLAN tag adds 4 bytes to the Ethernet header. So the overhead becomes 22 bytes instead of 18. You can adjust the overhead field in the calculator to reflect this and see the efficiency drop slightly.

Why is ATM still mentioned if it’s obsolete?

ATM was widely used in the 1990s for both WAN and LAN backbones. Its fixed 53-byte cell size made it predictable for voice and video, but it had high overhead and complexity. It has been largely replaced by Ethernet and MPLS, but some legacy carrier networks still use ATM in certain regions.

Related

Formula used
in frame_size | Frame size | bytes | 1500 | 64 | 9000
in overhead | Header + trailer | bytes | 18 | 0 | 200
in bit_rate | Link bit rate | Mbit/s | 1000 | 1 | 100000
out efficiency | Framing efficiency | % | (frame_size - overhead) / frame_size * 100 | 2
out goodput | Effective throughput | Mbit/s | bit_rate * (frame_size - overhead) / frame_size | 2
out overhead_pct | Overhead percentage | % | overhead / frame_size * 100 | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →