JTB 2025. 8. 6. 01:07

 

Addressing in OSI Layer 2 and Layer 3

 

 

In the OSI 7-layer model, only Layer 2 (Data Link Layer) and Layer 3 (Network Layer) use addressing schemes:

  • Layer 2 uses a physical address, known as the MAC address
  • Layer 3 uses a logical address, known as the IP address

MAC Address (Layer 2)

A MAC address is split into two 24-bit parts:

  • OUI (Organizationally Unique Identifier): Assigned by IEEE to identify the manufacturer
  • UAA (Universally Administered Address): Assigned by the manufacturer to uniquely identify a specific device

MAC addresses are fixed-length (48 bits) and follow a standard structure.


IP Address (Layer 3)

IP addresses are also divided into two components:

  1. Network Address
    •    Identifies the overall network
    •    Hosts with the same network address are considered part of the same local network
  2. Host Address
    •    Identifies an individual device within that network

 

Unlike MAC addresses, the boundary between the network and host portions of an IP address is not fixed.

It is defined using subnet masks or class-based rules.

 


IP Address Classes (IPv4)

The traditional classful addressing system divided IP addresses into classes based on the required number of hosts:

  • Class A
    • First octet: Network part
    • Supports ~16 million hosts
    • Range: 1.0.0.0 to 126.255.255.255
  • Class B
    • First two octets: Network part
    • Supports ~65,000 hosts
    • Range: 128.0.0.0 to 191.255.255.255
  • Class C
    • First three octets: Network part
    • Supports ~250 hosts
    • Range: 192.0.0.0 to 223.255.255.255

 

Key Distinction

  • MAC addresses have a fixed structure (24 bits OUI + 24 bits UAA)
  • IP addresses have a flexible structure, allowing subnetting and variable-length network/host division

This flexibility is what makes IP addressing more scalable for diverse network sizes.