Skip to main content
📚 College Credit Guide ✓ UPI Study 🕐 11 min read

What Is the Data Link Layer in the OSI Model?

This article explains Layer 2 in the OSI model, including framing, MAC addressing, error checks, and media access on local networks.

US
UPI Study Team Member
📅 November 21, 2026
📖 11 min read
3 views
US
About the Author
The UPI Study team works directly with students on credit transfer, degree planning, and course selection. We've helped thousands of students figure out what counts toward their degree and how to finish faster without paying more than they have to. This post is written the way we'd explain it to you directly.
🦉

The data link layer is OSI Layer 2, and it moves data across one local link by turning bits into frames, adding MAC addresses, and checking for errors before the next hop gets involved. That sounds technical, but the job is simple: keep local delivery clean between two devices on the same network segment. You see this layer in Ethernet, Wi-Fi, and switch-based LANs every day. A laptop does not spray raw bits at a router and hope for the best. It sends a frame with a destination MAC address, a source MAC address, and an error check, then the receiving device decides whether the frame belongs there. If the frame fails the check, Layer 2 drops it or asks for another try, depending on the protocol. This is the part of networking that sits between the physical layer, which moves signals, and the network layer, which moves packets across different networks. That middle position matters because local delivery has its own rules. A switch cares about MAC addresses. A wireless access point cares about who can talk on the channel. A bad frame should not keep climbing upward just because the cable or radio link got noisy. Students often mix up Layer 2 and Layer 3 because both touch delivery. They do different jobs. Layer 2 handles one hop at a time. Layer 3 handles the trip across routers and networks.

Introduction to Networking
College credit · ACE & NCCRS reviewed · self-paced
View course
What Is the Data Link Layer in the OSI Model: learner marking a notebook beside a router, cable, phone and coffee

The data link layer is OSI Layer 2, and its main job is to move data across one local link between adjacent devices, not across the whole internet. It takes the raw bit stream from Layer 1, wraps it into frames, and gives local delivery enough structure to work on Ethernet, Wi-Fi, and other LAN links.

The catch: A signal by itself does not tell a receiver where one message starts or ends, so Layer 2 adds framing rules and local addresses. That matters on a 100 Mbps Ethernet link just as much as on a 1 Gbps switch port, because the receiver needs clean boundaries before it can do anything useful.

Think of it as the traffic cop for one hop. The physical layer pushes voltage, light, or radio energy. Layer 2 turns that energy into something a network card can read as a frame with meaning. Without that step, a device would see only noise and timing, not a packet that belongs to a specific neighbor. That is why introduction to networking courses spend real time on Layer 2 before they move to routers.

The practical value shows up fast. A switch uses Layer 2 information to forward frames inside a LAN, while the network layer waits until the packet needs a different network. That split keeps local traffic fast and keeps end-to-end routing from getting tangled up with every single cable or Wi-Fi hop. I like this layer because it does quiet work, and quiet work keeps networks from falling apart.

Layer 2 also adds a simple trust check. If a frame looks broken, the device can drop it before it pollutes higher layers. That small step saves time, cuts bad traffic, and keeps the next layer from dealing with junk.

Framing gives Layer 2 a clear start, a clear end, and a way to check whether the data arrived intact. Ethernet, Wi-Fi, and similar links all use this idea, even though they format frames a little differently.

  1. Data from Layer 3 arrives first, usually as a packet that needs local delivery on the next hop. Layer 2 takes that packet and starts building a frame around it.
  2. The sender adds a header and a trailer, which carry the source and destination MAC addresses plus control fields. Ethernet also uses a Frame Check Sequence, or FCS, to catch damage.
  3. The frame boundaries get marked by the protocol itself, not by guesswork. In Ethernet, the minimum frame size is 64 bytes, and that floor helps the receiver spot valid traffic versus garbage on the wire.
  4. The sender transmits the frame through Layer 1, whether the medium uses copper, fiber, or radio. On a busy 1 Gbps link, timing matters because the frame must stay intact while bits move across the medium.
  5. The receiver reads the frame, checks the FCS with a CRC calculation, and compares the result with what it received. If the numbers do not match, the frame fails the check and the device treats it as bad data.
  6. Some links ask for retransmission at Layer 2, while others leave recovery to higher layers. That split depends on the protocol, and it matters more on wireless links than on clean switched Ethernet.

Reality check: Framing is not fancy, but it prevents a huge mess. A 64-byte Ethernet minimum and a CRC check sound small, yet they decide whether a frame moves on or dies right there.

Students usually miss one detail: framing does not just package data, it also creates discipline. The receiver knows where to start, where to stop, and how to test the frame before passing anything upward.

Introduction To Networking UPI Study Course

Learn Introduction To Networking Online for College Credit

This is one topic inside the full Introduction To Networking course on UPI Study — a self-paced online class for college credit. Credit recommended by NCCRS; your college decides how credits transfer. Courses start at $250 with no deadlines and lifetime access.

Explore on UPI Study →

Which colleges have matched Introduction to Networking? 16 colleges confirm UPI Study's Introduction to Networking (Computer Science 196, 3 credits), according to their equivalency pages on UPI Study. Here are 12 of them, with the course it counts as at each:

CollegeCourse it counts asCreditsHow it counts
Thomas Edison State UniversityITS-1400 Introduction to Networking3Transfers
Southern New Hampshire UniversityIT1ELE – Information Technology Elective3In SNHU's Work & Life Experience database
University of the PeopleCS 2204 Communications & Networking3Transfers
Post UniversityCIS 221 Networking Fundamentals3Transfers
Strayer UniversityIntroduction to Networking (CIS175)3Transfers
Columbia Southern UniversityITC 2302 Introduction to Data Communication3Transfers
Indiana TechCS 1330 Introduction to Networks3Transfers
UA GranthamIS216 (Computer Networks)3Transfers
University of Management and TechnologyCST 210 Data Communications3Transfers
Crestpoint UniversityGeneral Elective (Crestpoint)3Transfers (Elective)
Dunlap-Stone UniversityGeneral Education Technology3Transfers
Maestro UniversityNetwork and Internet Security3Transfers

Also confirmed by Newlane, Nexford, Pathways, Woodmont.

See Introduction to Networking on UPI Study →

ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities. Each college confirms the course when it evaluates your transcript.

Why Is MAC Addressing Needed Here?

MAC addresses let Layer 2 identify network interfaces on the same local network, and they work at the hardware edge where a switch or wireless access point makes forwarding choices. An IP address can point to a host across several routers, but a MAC address points to the next device on a single 1-hop link.

Each frame carries a source MAC address and a destination MAC address, usually 48 bits long in Ethernet. That lets the sender name the exact interface it came from and the exact interface it wants to reach. A switch reads those addresses, builds a table, and forwards frames out the right port instead of blasting them everywhere. That is local delivery, and it runs fast on a 24-port switch or a small home router.

Worth knowing: MAC addresses matter most inside a LAN segment, not across the whole route. Once a packet crosses a router, the Layer 2 header changes at the next hop, but the Layer 3 packet keeps going with its IP address intact.

This is why students should not mix up IP and MAC. IP tells the packet where to go across networks. MAC tells the frame where to go right now on the local link. That split feels awkward at first, but it makes Ethernet and Wi-Fi work without every device knowing the full path in advance.

A switch can also learn MAC addresses over time, which is why a quiet LAN often feels smarter after a few seconds. A static textbook diagram hides that detail, and that is a shame because the learning table is one of the neatest parts of Layer 2.

Which Media Access Methods Does It Use?

Layer 2 also decides who gets to talk on a shared medium, and that matters on networks where 2 or more devices can reach the same channel at once. Ethernet, Wi-Fi, and switched links do this differently, and the differences shape how collisions and delays happen.

A lot of people think media access sounds like a tiny detail, but it decides whether a network feels smooth or chaotic. A switched LAN usually hides the pain, while a shared medium exposes it right away.

Layer 2 supports reliability by spotting damaged frames, dropping bad ones, and sometimes asking for another send on the same link. The CRC check in Ethernet gives the receiver a fast way to test a frame before it reaches Layer 3, and that keeps broken data from polluting the rest of the path.

A local link can fail in small ways that still matter. A loose cable, a noisy radio channel, or a burst of interference can flip a few bits in a 1518-byte Ethernet frame or a shorter Wi-Fi frame. Layer 2 does not fix every problem, but it does stop a lot of junk at the border of the hop. That is a real service, and it saves higher layers from cleaning up a mess they did not create.

Bottom line: Layer 2 protects one hop, not the whole route. The network layer still handles end-to-end delivery across routers, subnets, and different networks, so you should not ask Layer 2 to do a job it never claimed.

Some protocols add retransmission right at this layer, especially on wireless links where loss happens more often than on a clean office switch. That local retry can improve the feel of the connection, but it also adds delay when the channel gets busy. I think that tradeoff is worth remembering because students often expect every layer to act like a magic fix.

If a frame fails CRC, the receiver usually throws it away and moves on. That sounds harsh, but it keeps the network honest, and honesty beats pretending bad data is fine.

Frequently Asked Questions about Data Link Layer

Final Thoughts on Data Link Layer

The data link layer sits in a spot that looks small on paper and matters a lot in practice. It takes raw bits from Layer 1, turns them into frames, adds MAC addresses, checks for errors, and helps devices share a local link without stepping on each other. That is a tight list, but each part pulls real weight. Students often miss how local the job really is. Layer 2 does not carry a packet across three routers or across a city. It handles the next hop, and that scope keeps the network organized. A switch can forward a frame in a fraction of a second, a wireless card can wait its turn, and a CRC can stop damaged data before it spreads upward. The cleanest way to study it is to trace one frame from start to finish. Watch the packet arrive from Layer 3. Watch the header get added. Watch the receiver check the FCS. Then watch the switch or wireless device decide what happens next. That simple loop explains more than a hundred buzzwords. If you want to get better at networking, start with Layer 2 and stay with it until the steps feel plain. Then move to Layer 3 with the same habit: trace the path, name the fields, and check the handoff.

How UPI Study credits actually work

Ready to Earn College Credit?

Credit recommended by NCCRS · Self-paced · Your college decides how credits transfer · $250/course or $99/month (US)

More on Introduction To Networking
© UPI Study. This article and its educational content are solely owned by UPI Study and licensed under CC BY-NC-ND 4.0. It is not free to reuse or modify. Any citation must credit UPI Study with a direct link to this page.

Comments

    No comments yet. Ask a question or share how it went for you.

    Leave a comment

    Comments go live straight away after an automatic check. Keep it kind and on topic, and please don’t post links, phone numbers, emails or other personal details. We remove comments that break these rules; use Report on any comment that does. Your email is only used to reply to you. Privacy policy