Link Layer
100%

Network Basics · Lesson 8

Link Layer

Learn how Ethernet frames, neighbor discovery, switches, and routers deliver packets on a local link.

The link layer carries network-layer packets across one local medium or virtual link. Ethernet and Wi-Fi use different framing details, but both provide local delivery beneath IP.

Ethernet Frames

An Ethernet frame contains destination and source MAC addresses, an EtherType or length field, payload, and a frame check sequence trailer. Physical transmission also uses a preamble and start delimiter. The frame check sequence detects corruption on the link; it does not repair a damaged frame or protect it cryptographically.

What is the Ethernet frame check sequence used for?

Switches and Local Delivery

An Ethernet switch learns which source MAC addresses appear on its ports and forwards known unicast frames toward the learned destination port. Broadcast and some unknown-destination traffic is flooded within the broadcast domain. VLANs can divide one switching system into separate logical link domains.

What information does an Ethernet switch normally learn from frames?

Resolving the Next-Hop Address

For IPv4 on Ethernet, Address Resolution Protocol maps an on-link IPv4 next-hop address to a MAC address. The host first checks its neighbor cache. If needed, it broadcasts an ARP request, and the owner or an authorized proxy replies.

For an off-link IP destination, the host resolves the default or selected gateway's MAC address—not the remote destination's MAC. IPv6 uses Neighbor Discovery over ICMPv6 rather than ARP.

Which MAC address does a host use for an off-link IPv4 destination?

Inspecting Neighbor State

View IPv4 ARP and IPv6 Neighbor Discovery entries with:

$ ip neighbor show

States such as REACHABLE, STALE, DELAY, PROBE, and FAILED describe the neighbor-unreachability process. STALE does not mean broken; it means the cached reachability confirmation is no longer recent and can be tested on use.

What does a STALE neighbor entry indicate?

Encapsulation Across a Router

The sender places an IP packet inside a frame addressed to its next hop. The router validates and removes the incoming frame, processes the IP header, selects an outgoing route, and builds a new frame for that link. The receiver reverses encapsulation and delivers the transport payload to the appropriate socket.

What remains the same in ordinary forwarding while Ethernet framing changes at a router?

Lesson complete

You finished Link Layer

You can now follow an IP packet through one local-link delivery step.

  • Identify the main Ethernet frame fields and integrity trailer.

  • Explain how a switch learns local forwarding locations.

  • Resolve an IPv4 next hop with ARP and IPv6 neighbors with NDP.

  • Interpret neighbor-cache state without overclaiming failure.

  • Recognize that routers rebuild frames for each outgoing link.

Keep your learning progress

Create a free account to save this lesson and continue learning on any device.

Create a free account
Next Lesson
Back to Network Basics