Loading content...
At the very bottom of the TCP/IP stack lies the Network Interface Layer—also called the Link Layer or Network Access Layer. This is where the abstract world of protocols meets the physical reality of copper cables, fiber optics, and radio waves. Every packet that traverses the Internet, every message that reaches its destination, every bit of data that flows through networked systems—all of it depends on this foundational layer working correctly.
The Network Interface Layer is where your computer stops thinking in terms of logical addresses and remote hosts and starts thinking in terms of electrical signals and immediate neighbors. It's where the Ethernet frames that carry your IP packets are born, where MAC addresses govern local delivery, and where the physical constraints of transmission media directly influence what's possible.
By the end of this page, you will understand the Network Interface Layer's responsibilities, master Ethernet frame structure and MAC addressing, comprehend how different link-layer technologies provide a common abstraction to the Internet layer, and appreciate the critical role this layer plays in enabling reliable local communication.
The Network Interface Layer encompasses everything that happens between the Internet layer (IP) above and the physical transmission medium below. In the five-layer model, this corresponds to both the Data Link layer and the Physical layer. The TCP/IP designers combined these because, from the Internet layer's perspective, they provide a single unified service: the ability to send frames to an immediately adjacent node on the same network segment.
The Critical Abstraction
The Network Interface Layer provides a crucial abstraction to the layers above: the ability to send data to any host on the same local network using a hardware address, regardless of the underlying physical technology. Whether you're using:
...the Internet layer above sees the same interface: 'send this IP packet to this MAC address.' The Network Interface Layer translates that request into whatever physical transmission is required. This abstraction is why the same IP packet can traverse Ethernet in a data center, Wi-Fi in an office, and cellular networks on a smartphone—all seamlessly connected by the Internet layer above.
The Network Interface Layer is unique in that it spans both hardware and software. The Network Interface Card (NIC) handles physical transmission and much of the frame processing, while device drivers in the operating system manage the NIC and provide the interface to higher layers. This hardware/software combination makes the layer more complex but also more efficient.
While the Network Interface Layer encompasses many technologies, Ethernet dominates modern networking. Originally invented at Xerox PARC by Bob Metcalfe in 1973, Ethernet has evolved from its original 2.94 Mbps coaxial cable implementation to today's 400 Gbps fiber systems—a speed increase of over 100,000x while maintaining backward-compatible frame formats.
Ethernet's success stems from several factors:
1. Evolutionary Compatibility: Despite massive speed increases, modern Ethernet retains the same frame format as the original. A 400 Gbps Ethernet switch still processes frames with the same header structure as 10 Mbps Ethernet from 1983.
2. Economic Scale: Billions of Ethernet devices have been manufactured, driving costs down and creating a self-reinforcing adoption cycle.
3. Performance at Every Scale: Ethernet works for everything from home networks (1 Gbps) to data center fabrics (100-400 Gbps) to carrier networks.
4. Layer 1 Flexibility: The Ethernet frame format works over twisted pair, fiber, or wireless media, adapting to diverse physical requirements.
| Standard | Speed | Year | Typical Media |
|---|---|---|---|
| 10BASE5 (Thicknet) | 10 Mbps | 1983 | Coaxial cable |
| 10BASE-T | 10 Mbps | 1990 | Cat3 twisted pair |
| 100BASE-TX (Fast Ethernet) | 100 Mbps | 1995 | Cat5 twisted pair |
| 1000BASE-T (Gigabit) | 1 Gbps | 1999 | Cat5e/Cat6 twisted pair |
| 10GBASE-T | 10 Gbps | 2006 | Cat6a/Cat7 twisted pair |
| 25GBASE-SR | 25 Gbps | 2016 | Multi-mode fiber |
| 100GBASE-SR4 | 100 Gbps | 2014 | Multi-mode fiber (4 lanes) |
| 400GBASE-SR8 | 400 Gbps | 2017 | Multi-mode fiber (8 lanes) |
Ethernet standard names follow a pattern: [Speed][Signaling Type]-[Media Type]. For example, 100BASE-TX means 100 Mbps, baseband signaling, over twisted pair (TX). The 'BASE' indicates baseband transmission (the entire cable bandwidth is used for a single signal channel).
The Ethernet frame is the fundamental unit of data transmission on Ethernet networks. Understanding its structure is essential for network troubleshooting, protocol analysis, and performance optimization. The standard Ethernet II frame (DIX Ethernet, the most common type) consists of several fields:
Frame Field Details
Preamble (7 bytes): A pattern of alternating 1s and 0s (10101010...) that allows receivers to synchronize their clocks with the incoming signal. This is crucial for accurate bit sampling.
Start Frame Delimiter (SFD, 1 byte): The sequence 10101011 signals that the actual frame data is about to begin. The two consecutive 1s at the end distinguish it from the preamble.
Destination MAC Address (6 bytes): The hardware address of the intended recipient. This can be:
Source MAC Address (6 bytes): The hardware address of the sending device. This is always a unicast address.
Type/Length Field (2 bytes): In Ethernet II, this indicates the protocol type of the payload (e.g., 0x0800 for IPv4, 0x86DD for IPv6, 0x0806 for ARP). Values ≤1500 indicate length (IEEE 802.3 format).
Payload (46-1500 bytes): The actual data being transmitted, typically an IP packet. Minimum 46 bytes (padded if necessary) to ensure reliable collision detection in original CSMA/CD Ethernet.
Frame Check Sequence (FCS, 4 bytes): A 32-bit CRC (Cyclic Redundancy Check) computed over the entire frame. Receivers recompute the CRC and discard frames where it doesn't match.
| EtherType (Hex) | Protocol | Description |
|---|---|---|
| 0x0800 | IPv4 | Internet Protocol version 4 |
| 0x0806 | ARP | Address Resolution Protocol |
| 0x86DD | IPv6 | Internet Protocol version 6 |
| 0x8100 | 802.1Q | VLAN-tagged frame |
| 0x8847 | MPLS | Multi-Protocol Label Switching (unicast) |
| 0x88CC | LLDP | Link Layer Discovery Protocol |
| 0x88E5 | MACSec | MAC Security (802.1AE) |
The standard Ethernet Maximum Transmission Unit (MTU) is 1500 bytes—the maximum payload size. IP packets larger than this must be fragmented. Jumbo frames (up to 9000 bytes) are supported by most modern equipment but aren't universally standardized. When troubleshooting, MTU mismatches can cause mysterious failures where small packets work but large ones don't.
The Media Access Control (MAC) address is the fundamental identifier for network interfaces at the Link layer. Unlike IP addresses, which are logical and can change, MAC addresses are (traditionally) burned into the network interface hardware, providing a persistent physical identity.
MAC Address Structure
A MAC address consists of 48 bits (6 bytes), typically displayed as six pairs of hexadecimal digits separated by colons or hyphens:
00:1A:2B:3C:4D:5E (colon notation)
00-1A-2B-3C-4D-5E (hyphen notation)
001A.2B3C.4D5E (Cisco notation)
The address is divided into two main parts:
Organizationally Unique Identifier (OUI) — First 3 bytes
00:1A:2B might belong to CiscoNetwork Interface Controller (NIC) Specific — Last 3 bytes
| Bit | Position | Value = 0 | Value = 1 |
|---|---|---|---|
| I/G (Individual/Group) | LSB of 1st byte | Unicast | Multicast/Broadcast |
| U/L (Universal/Local) | 2nd LSB of 1st byte | Globally unique (OUI) | Locally administered |
Address Types
Unicast Addresses: Identify a single network interface. The I/G bit is 0. These are the 'normal' MAC addresses assigned to devices.
Broadcast Address: FF:FF:FF:FF:FF:FF — delivered to all devices on the local network segment. Used by protocols like ARP and DHCP.
Multicast Addresses: Identify a group of interested receivers. The I/G bit is 1. IPv6 uses multicast heavily; for example, 33:33:00:00:00:01 for all IPv6 hosts.
Locally Administered Addresses (LAA): Have the U/L bit set to 1, indicating they were set by the local administrator rather than by the manufacturer. Virtual machines and containers often use LAAs to avoid conflicts.
Despite being 'burned in,' MAC addresses can be changed in software on most operating systems. This is legitimate for privacy, VM networking, and certain administrative tasks—but also enables attacks like MAC flooding and ARP spoofing. Network security cannot rely solely on MAC addresses for authentication.
When a host wants to send an IP packet to a destination on the same local network, it faces a fundamental problem: IP addresses are logical, but Ethernet requires MAC addresses for frame delivery. The Address Resolution Protocol (ARP) bridges this gap by mapping IP addresses to MAC addresses.
How ARP Works
Imagine Host A (IP: 192.168.1.10) wants to send a packet to Host B (IP: 192.168.1.20) on the same subnet. Host A doesn't know Host B's MAC address. Here's what happens:
Step 1: ARP Request (Broadcast)
Host A sends an ARP request as an Ethernet broadcast:
FF:FF:FF:FF:FF:FF (broadcast)Every device on the local network receives this frame.
Step 2: ARP Reply (Unicast)
Host B receives the request, recognizes its own IP, and responds:
Step 3: Cache and Communicate
Host A stores this mapping in its ARP cache and can now send frames directly to Host B. The cache has a timeout (typically 2-20 minutes) to handle address changes.
ARP Cache Management
Operating systems maintain an ARP cache to avoid repeated broadcasts. You can view and manage it:
# View ARP cache (Linux/macOS)
arp -a
# View ARP cache (Windows)
arp -a
# Clear ARP cache (Linux, requires root)
ip neigh flush all
# Add static ARP entry
arp -s 192.168.1.20 AA:BB:CC:DD:EE:FF
Gratuitous ARP
A host can broadcast an ARP request for its own IP address. This serves several purposes:
ARP has no authentication mechanism. Any host can claim any IP-to-MAC mapping. ARP spoofing attacks exploit this to intercept traffic (man-in-the-middle) or cause denial of service. Defenses include static ARP entries, Dynamic ARP Inspection (DAI) on switches, and encrypted protocols that detect MITM attacks.
Modern Ethernet networks are built around switches—devices that forward frames based on MAC addresses. Unlike hubs (which broadcast to all ports) or routers (which operate at the IP layer), switches make intelligent forwarding decisions at Layer 2, creating efficient, collision-free communication paths.
Switching Methods
Store-and-Forward Switching: The switch receives the entire frame, verifies the CRC, then forwards. This catches errors but adds latency proportional to frame size.
Cut-Through Switching: The switch starts forwarding as soon as it reads the destination MAC address (first 6 bytes after preamble). Lower latency but forwards corrupted frames.
Fragment-Free Switching: A compromise—the switch waits for the first 64 bytes (the minimum frame size that indicates no collision occurred) before forwarding.
| Method | Latency | Error Checking | Best For |
|---|---|---|---|
| Store-and-Forward | Higher (frame-dependent) | Full CRC check | General purpose, reliable links |
| Cut-Through | Lowest (~2-4μs) | None | Low-latency applications (HFT, HPC) |
| Fragment-Free | Medium (~64 bytes) | Collision check only | Balance of speed and safety |
VLANs: Virtual LANs
Switches can partition their ports into Virtual LANs (VLANs), creating logically separate broadcast domains on a single physical switch. VLAN traffic is isolated—devices on different VLANs cannot communicate without a router (Layer 3).
VLANs are identified by a VLAN ID (1-4094) and can span multiple switches using trunk links that carry tagged frames (802.1Q). This allows network administrators to organize devices by function (e.g., HR VLAN, Engineering VLAN, Guest VLAN) regardless of physical location.
A broadcast domain is the set of devices that receive each other's broadcast frames. Switches extend broadcast domains (all ports receive broadcasts), while routers limit them (broadcasts don't cross routers). VLANs create multiple broadcast domains on a single switch. Proper broadcast domain design is critical for network scalability—too many devices in one domain creates broadcast storms.
While Ethernet dominates wired networking, other link-layer technologies serve important roles. The beauty of the TCP/IP model is that the Internet layer operates identically regardless of the underlying link technology—demonstrating the power of layered abstraction.
Wireless Networking Differences
Wi-Fi uses the same MAC address format as Ethernet but operates differently due to wireless constraints:
1. Half-Duplex Communication: Unlike switched Ethernet, wireless is inherently shared medium. Devices cannot transmit and receive simultaneously.
2. CSMA/CA (Collision Avoidance): Unlike Ethernet's CSMA/CD (Collision Detection), wireless cannot detect collisions during transmission. Instead, it tries to avoid them with listen-before-transmit and virtual carrier sensing.
3. AP-Mediated Communication: In infrastructure mode, all traffic flows through the Access Point, even between wireless clients on the same network.
4. Additional Headers: 802.11 frames have three or four address fields (versus Ethernet's two) to handle AP-mediated communication and wireless distribution systems.
5. Acknowledgments: Every frame must be acknowledged; unacknowledged frames are retransmitted.
The Internet layer's greatest achievement is technology independence. An IP packet's path might include Ethernet in the office, Wi-Fi on a laptop, cellular on a phone, fiber in the backbone, and satellite for remote areas—all completely transparent to the application layer above.
We've explored the Network Interface Layer in depth. Let's consolidate the key insights:
What's Next
With the Network Interface Layer understood, we ascend to the Internet Layer—where logical addressing, routing across network boundaries, and true internetworking become possible. You'll learn how IP addresses create a universal addressing scheme, how routers make forwarding decisions, and how the Internet layer enables global connectivity spanning billions of devices.
You now understand the Network Interface Layer's role as the foundation of network communication, including Ethernet frame structure, MAC addressing, ARP operation, and switch behavior. This knowledge is essential for troubleshooting local network issues and understanding how higher layers depend on reliable link-layer services.