1.1 OSI Reference Model and Encapsulation

Key Takeaways

  • The OSI reference model standardizes enterprise network communication into seven functional layers, enabling modular protocol engineering and multi-vendor interoperability.

  • Each OSI layer wraps upper-layer data into a distinct Protocol Data Unit (PDU): Data (Layers 7-5), Segment (Layer 4), Packet (Layer 3), Frame (Layer 2), and Bits (Layer 1).

  • Encapsulation prepends protocol headers as data moves down the stack; Layer 2 uniquely appends both a header containing MAC addresses and a trailer containing the Frame Check Sequence (FCS).

  • Layer 2 access switches forward frames based on MAC address tables without modifying IP headers, whereas Layer 3 routers decrement the IPv4 Time-to-Live (TTL) and rewrite Layer 2 MAC addresses at each routing hop.

  • The standard Ethernet Maximum Transmission Unit (MTU) of 1500 bytes dictates a default TCP Maximum Segment Size (MSS) of 1460 bytes after accounting for 20-byte IP and 20-byte TCP headers.

Last updated: October 2026

OSI Reference Model and Encapsulation

Quick Summary: The Open Systems Interconnection (OSI) reference model establishes a seven-layer conceptual framework for network communications. As application data travels down the stack, each layer prepends a protocol header—and at Layer 2, appends an error-checking trailer—in a process known as encapsulation. When frames arrive at their destination, the receiving device performs decapsulation, stripping headers layer by layer. Understanding how intermediate devices like Aruba CX Layer 2 switches and Layer 3 core routers interact with these layers is critical for campus network design and troubleshooting.


The Purpose of Layered Architecture

In modern enterprise campus networking, devices manufactured by different vendors must exchange data reliably. Standardized by the International Organization for Standardization (ISO) under standard ISO/IEC 7498-1, the OSI Reference Model divides network communication into seven modular layers.

Layering delivers three primary engineering advantages:

  • Interoperability: Hardware and software developers can implement protocols at a specific layer without redesigning the entire protocol stack.
  • Abstraction: Lower physical media details (fiber vs. copper signaling) remain completely transparent to upper-tier software applications.
  • Structured Troubleshooting: Network administrators can isolate faults systematically, verifying physical link status before diagnosing Layer 3 routing or Layer 7 authentication issues.

The Seven Layers of the OSI Model

The OSI model organizes network functions from high-level user services down to physical transmission media:

Layer NumberLayer NamePrimary FunctionCommon Protocols & StandardsCampus Role
Layer 7ApplicationUser-facing network interfaces and servicesHTTP, HTTPS, DNS, DHCP, SSH, NTPUser applications and Aruba Central management
Layer 6PresentationData formatting, character encoding, encryptionTLS/SSL, ASCII, JSON, XMLSecure CLI sessions and web portal encryption
Layer 5SessionDialogue control, session setup, sync, teardownRPC, NetBIOS, SQL sessionsClient session persistence to authentication servers
Layer 4TransportEnd-to-end transport, port multiplexing, reliabilityTCP, UDPDifferentiating web (443), SSH (22), and RADIUS (1812)
Layer 3NetworkLogical addressing, path selection, packet routingIPv4, IPv6, ICMP, OSPFCore and aggregation routing across campus subnets
Layer 2Data LinkPhysical addressing, media access, framing, error checkEthernet (802.3), Wi-Fi (802.11), 802.1QSwitch MAC address forwarding and VLAN segmentation
Layer 1PhysicalBit transmission, electrical voltages, optical signals1000BASE-T, 10GBASE-SR, SFP+, RJ-45Physical cables, transceivers, and switch ports

Layer 2 Sublayers

In IEEE 802 LAN standards, Layer 2 is divided into two distinct sublayers:

  1. Logical Link Control (LLC - IEEE 802.2): Communicates with the Network Layer above, multiplexes network protocols using EtherType values, and manages flow control.
  2. Media Access Control (MAC - IEEE 802.3 / 802.11): Controls physical media access and appends source and destination physical MAC addresses.

Protocol Data Units (PDUs) and Encapsulation Mechanics

As data passes down the protocol stack on a sending host, each layer wraps the payload inside its own protocol control information. This packaged unit is called a Protocol Data Unit (PDU):

  • Layers 7, 6, 5: Data (Application payload, formatted data, session tokens)
  • Layer 4: Segment (TCP) or Datagram (UDP)
  • Layer 3: Packet (IP header containing logical source and destination IP addresses)
  • Layer 2: Frame (MAC header, payload, and Frame Check Sequence trailer)
  • Layer 1: Bits (Binary physical signaling across copper, fiber, or RF)

Header and Trailer Specifics

While Layers 4 and 3 prepend protocol headers, Layer 2 uniquely adds both a header and a trailer:

  • Layer 2 Header: Contains the 6-byte Destination MAC address, 6-byte Source MAC address, and a 2-byte EtherType field (identifying the encapsulated Layer 3 protocol, such as 0x0800 for IPv4).
  • Layer 2 Trailer: Contains the 4-byte Frame Check Sequence (FCS). The sending host runs a Cyclic Redundancy Check (CRC-32) across the frame contents and writes the resulting checksum into the FCS field. When the receiving device reads the frame, it recalculates the CRC. If the values mismatch, the frame was corrupted in transit and is dropped immediately.

MTU and MSS Relationships

  • Maximum Transmission Unit (MTU): Defines the largest Layer 3 packet that can be transmitted over a Layer 2 frame without fragmentation. Standard Ethernet specifies an MTU of 1500 bytes (excluding the 14-byte Ethernet header and 4-byte FCS trailer).
  • Maximum Segment Size (MSS): Defines the maximum application payload a host places inside a single TCP segment. In an IPv4 network with standard 1500-byte MTU: MSS=MTU (1500 bytes)−IPv4 Header (20 bytes)−TCP Header (20 bytes)=1460 bytes\text{MSS} = \text{MTU (1500 bytes)} - \text{IPv4 Header (20 bytes)} - \text{TCP Header (20 bytes)} = 1460\text{ bytes}

Device Processing Across OSI Layers

Campus network devices operate at different tiers of the OSI model:

Layer 2 Switching (e.g., Aruba CX 6000, 6100, or 6200 ports operating at Layer 2)

  1. Receive bits from the physical medium and reconstruct the Layer 2 frame.
  2. Verify the FCS trailer in hardware; corrupted frames are discarded immediately.
  3. Read the Source MAC address to update the local MAC address table (CAM table).
  4. Inspect the Destination MAC address and VLAN ID to forward the frame out the appropriate switch port.
  5. Key Principle: A Layer 2 switch does not alter the Layer 3 IP header, does not decrement the TTL, and does not modify the Layer 4 transport payload.

Layer 3 Switches and Routers (e.g., Aruba CX 6300, 6400, 8325)

When forwarding packets across different IP subnets (inter-VLAN routing):

  1. De-encapsulate the incoming Layer 2 frame by stripping the Layer 2 header and FCS trailer.
  2. Inspect the Layer 3 IPv4 header destination IP address against the routing table.
  3. Decrement the IPv4 Time-to-Live (TTL) field by 1. If TTL reaches 0, the packet is discarded and an ICMP Time Exceeded message is returned.
  4. Recalculate the Layer 3 IPv4 header checksum (since TTL changed).
  5. Encapsulate the packet inside an entirely new Layer 2 frame:
    • Source MAC: Becomes the MAC address of the router's egress interface.
    • Destination MAC: Becomes the MAC address of the next-hop router or destination host.
  6. Compute a new CRC-32 checksum, write it into the new FCS trailer, and transmit the frame.

Structured Layered Troubleshooting Methodology

When troubleshooting connectivity issues on Aruba CX campus networks, engineers apply structured models:

Troubleshooting ApproachStarting PointTypical Action on Aruba CX Switches
Bottom-UpLayer 1Check cable seating, verify SFP link lights, run show interface brief, check optical transceiver power (show interface transceiver).
Top-DownLayer 7Check application services, test DNS name resolution, verify HTTP/HTTPS server daemon responsiveness.
Divide-and-ConquerLayer 3Issue a ping from the client to its default gateway IP. If ping succeeds, Layers 1-3 function properly; focus on Layer 4 ports or Layer 7 services. If ping fails, isolate down to Layer 2 VLAN tagging or Layer 1 cabling.

Common Exam Traps

  • PDU Terminology Confusions: The exam tests whether you recognize that "Packets" exist strictly at Layer 3 (Network) and "Frames" exist strictly at Layer 2 (Data Link). Never refer to an IP PDU as a frame.
  • MAC Preservation Misconception: Believing that Layer 2 MAC addresses remain unchanged as a packet traverses multiple routed hops. Source and destination IP addresses remain constant end-to-end (unless NAT is applied), but MAC addresses are rewritten at every Layer 3 boundary.
  • L2 Switch Header Manipulation: Assuming that a standard Layer 2 access switch decrements the IPv4 TTL. Standard Layer 2 switching operates strictly at the Data Link layer and leaves the IP TTL field unchanged.
Loading diagram...
OSI 7-Layer Encapsulation and PDU Hierarchy
Test Your Knowledge

At which layer of the OSI reference model is a Protocol Data Unit (PDU) referred to as a 'Segment', and what primary protocol information is appended during this encapsulation stage?

A

Layer 2 (Data Link), where source and destination MAC addresses are added

B

Layer 4 (Transport), where source and destination port numbers are added

C

Layer 5 (Session), where session coordination tokens are added

D

Layer 3 (Network), where source and destination IP addresses are added

Test Your Knowledge

A network administrator observes an Aruba CX switch forwarding traffic between two host computers located in different IP subnets through an internal Layer 3 routed interface. How are the packet and frame headers modified during this routing transit?

A

The switch recalculates the FCS trailer without changing the MAC addresses, IP addresses, or TTL

B

The switch encapsulates the original Ethernet frame inside a new 802.1Q tag while keeping the original TTL

C

The switch decrements the IPv4 TTL by 1, recalculates the IP checksum, and replaces the Layer 2 source and destination MAC addresses

D

The switch rewrites the source and destination IP addresses, but preserves the original Layer 2 MAC headers unchanged

Test Your Knowledge

If an enterprise campus network standardizes on an Ethernet MTU of 1500 bytes, what is the typical Maximum Segment Size (MSS) for standard IPv4 TCP connections that do not use optional header fields?

A

1500 bytes

B

1518 bytes

C

1460 bytes

D

1480 bytes

Sections you finish are checked off in the contents.