0Pricing
Network+ Academy · Lesson

The Physical and Data Link Layers

Learn how raw signals and local addressing get bits onto the wire.

The Physical and Data Link Layers is a free Network+ Academy lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Network+ Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

The Bottom Two Layers

The OSI model starts at the bottom with the parts closest to the hardware. Layer 1 is the physical layer and Layer 2 is the data link layer. Together they get raw bits onto a medium and deliver them reliably to the next device on the same local network. These two layers are the foundation everything else rests on, turning electrical or light signals into usable frames.

Layer 1: Physical

The physical layer deals with the actual transmission of bits as signals. It covers cables, connectors, voltage levels, light pulses, and radio waves. Its only concern is moving raw 1s and 0s across a medium; it does not understand addresses or meaning. Anything you can physically touch, like a cable or a port, lives at the physical layer.

Bits as Signals

At Layer 1, data is just a stream of bits encoded as physical signals. On copper, bits are voltage changes; on fiber, they are pulses of light; on Wi-Fi, they are radio waves. The physical layer defines how a 1 and a 0 are represented so both ends agree. Get this wrong and no higher layer can function, because the bits never arrive correctly.

Layer 2: Data Link

The data link layer takes raw bits and organizes them into structured units called frames, adding local addressing and error checking. Its job is reliable delivery between two devices on the same local network segment. While Layer 1 just sends signals, Layer 2 gives those signals structure and a destination, making local communication dependable.

Frames

A frame is the data link layer unit. It wraps the data with a header and trailer that include source and destination hardware addresses and an error-check value. The header tells the next device who should receive the frame; the trailer lets the receiver verify the frame arrived intact. Framing is how Layer 2 packages bits for local delivery.

MAC Addresses

Layer 2 uses MAC addresses (Media Access Control) to identify devices on a local network. A MAC address is a unique hardware address burned into a network adapter, written as six pairs of hexadecimal digits. Unlike IP addresses, MAC addresses are local and tied to the physical device. Switches use them to deliver frames to the correct port on a LAN.

Example MAC address:
00:1A:2B:3C:4D:5E

Error Detection

The data link layer checks each frame for errors using a value in the trailer called a frame check sequence. The receiver recalculates it and compares; if they differ, the frame was corrupted and is discarded. This catches damage from electrical noise or interference. Error detection at Layer 2 keeps corrupted data from quietly poisoning higher layers.

Two Sublayers

The data link layer splits into two parts: the MAC sublayer, which controls access to the medium and handles hardware addressing, and the LLC (Logical Link Control) sublayer, which manages communication with the layer above. This split lets one upper interface work over many different physical technologies. The MAC sublayer is where hardware addressing and media access live.

Devices at These Layers

Certain devices operate mainly at these layers. Hubs and basic cables work at Layer 1, simply moving signals. Switches work at Layer 2, reading MAC addresses to forward frames to the right port. Knowing which layer a device works at tells you what it can and cannot do, which is vital when designing or fixing a network.

Why Local Only

Layers 1 and 2 handle communication only within a single local network. They cannot move data between separate networks, because MAC addresses are not designed for global routing. To cross from one network to another, you need Layer 3 and IP addresses. This boundary is exactly why higher layers exist and why a router, not a switch, connects different networks.

Bringing It Together

The physical layer sends raw bits as signals over a medium, and the data link layer packages those bits into frames with MAC addresses and error checking for reliable local delivery. Hubs sit at Layer 1, switches at Layer 2. Together these bottom layers turn electrical or light signals into trustworthy communication between neighboring devices on the same network.

Quick Check

What does the data link layer add to raw bits from the physical layer?

Recap

The physical layer (Layer 1) transmits raw bits as signals over cables, fiber, or radio. The data link layer (Layer 2) packages bits into frames with MAC addresses and a frame check sequence for error detection, giving reliable local delivery. Layer 2 has MAC and LLC sublayers. Hubs work at Layer 1, switches at Layer 2. These layers handle only local communication; crossing networks needs Layer 3.

Frequently asked questions

Is the “The Physical and Data Link Layers” lesson free?

Yes — the full text of “The Physical and Data Link Layers” is free to read here on the web, and the Network+ Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Network+ Academy course, upgrade to CoddyKit PRO.

What will I learn in “The Physical and Data Link Layers”?

Learn how raw signals and local addressing get bits onto the wire. You practise Network+ Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Network+ Academy?

No prior experience is required. Network+ Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “The Physical and Data Link Layers” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Network+ Academy lesson?

Yes. Every Network+ Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Why a Layered Model Helps
  2. The Physical and Data Link Layers
  3. The Network and Transport Layers
  4. Session, Presentation, and Application Layers
← Back to Network+ Academy