Back to case studies
Blog

Understanding Layer 2 and Layer 3 of the OSI Model

Layer 2 (Data Link) handles local, same-network delivery using MAC addresses and frames. Layer 3 (Network) enables communication between networks using IP addressing and routing.

By IoT Hybrid Solutions * Mar 14, 2024

EnterpriseFacilitiesIT/NetworkingNetwork DesignTroubleshootingSecurity OperationsEthernetIP Networks
At a glance

Overview

Topic
OSI Model (Layer 2 vs Layer 3)
Best for
People troubleshooting switching/routing issues
TL;DR
Layer 2 = local frames/MAC. Layer 3 = IP/routing between networks.
Understanding Layer 2 and Layer 3 of the OSI Model
Overview

Understanding Layer 2 and Layer 3 of the OSI Model

The OSI (Open Systems Interconnection) model is a framework used to describe the functions of a networking system. It consists of seven distinct layers, each with its own role. Two of the most important layers are Layer 2, the data link layer, and Layer 3, the network layer. In this post, I'll explain the key differences between Layer 2 and Layer 3.

Layer 2

The Data Link Layer

The data link layer (Layer 2) is responsible for local, node-to-node delivery on the same link or local area network (LAN). It takes Layer 3 packets and encapsulates them into frames for delivery across a local segment (often Ethernet).

Key functions at Layer 2
  • Framing: Layer 2 takes packets from Layer 3 and adds a header (and usually a trailer) to create frames, defining clear boundaries for delivery on the local medium.
  • Physical addressing: Uses MAC addresses to identify source/destination on a local network segment.
  • Error detection: Often uses a CRC (frame check sequence) to detect corruption on the link.
  • Media access control: Coordinates access to the network medium (for example, Ethernet behaviors).

Layer 2 does not route between networks-it's focused on local delivery within the same broadcast domain/VLAN.

Layer 3

The Network Layer

The network layer (Layer 3) is responsible for source-to-destination delivery across different networks. While Layer 2 oversees local delivery, Layer 3 manages end-to-end delivery by using logical addressing (IP) and routing decisions.

Primary duties at Layer 3
  • Logical addressing: Uses IP addresses to identify hosts and networks.
  • Routing: Determines the path to reach destination networks (routers/L3 switches forward packets between subnets).
  • Inter-network delivery: Moves packets between VLANs/subnets and across WAN links via gateways.
  • Fragmentation (historically relevant): Some Layer 3 behaviors deal with packet size/MTU constraints (varies by protocol and environment).

Note: "Packet sequencing" and end-to-end reliability are typically associated with the transport layer (Layer 4), not Layer 3. Layer 3 is about addressing + routing between networks.

Compare

Key differences in plain language

How to remember it
  • Layer 2: "How do I deliver this to the next hop on my local network?" (MAC + frames)
  • Layer 3: "How do I deliver this to a device on another network?" (IP + routing)

The division between Layer 2 and Layer 3 is important: Layer 2 connectivity deals with local delivery, while Layer 3 provides communication between separate networks.

Practical

Why this matters in real deployments

In physical security environments (video, access control, intercoms, edge appliances), issues often present as "the camera is offline" or "the panel won't talk to the server." Knowing whether it's likely Layer 2 or Layer 3 can speed up troubleshooting:

Quick troubleshooting checklist
  • Layer 2-ish symptoms: link lights down, wrong VLAN, port security, bad cabling, switch loop/STP events, MAC learning weirdness.
  • Layer 3-ish symptoms: wrong gateway, missing route, ACL/firewall rule blocking, NAT issues, subnet mismatch, DHCP scope misconfiguration.
More

Explore other deployments and program builds

This area can later be powered by CMS tags (industry, solutions, platforms) to suggest related case studies.

Browse all case studies

View the full list of migrations, deployments, and evaluations.

Case studies index

Talk to us

Quick scoping call or a deeper evaluation plan-either way, we'll map your environment to a buildable path.

Start a conversation