Skip to content

Logical Addressing & IP Addressing

At Layer 3 (Network), devices need a way to identify each other across different networks. Logical addressing assigns a software-based address (an IP address) to each device.

Logical vs Physical Addressing

Logical AddressPhysical Address
LayerLayer 3 (Network)Layer 2 (Data Link)
ExampleIP AddressMAC Address
Assigned byNetwork admin / DHCPManufacturer (burned in)
ScopeGlobal (across networks)Local (within a network)
Changes?Yes — can changeNo — fixed to hardware

MAC address = your permanent name (doesn't change) IP address = your current mailing address (can change based on where you are)

It is called logical because it is NOT tied to the hardware. It's assigned logically by software/configuration and can change — unlike a MAC address which is burned into the NIC.

IP Address — The Core of Logical Addressing

  • IPv4 → 32-bit, written as 4 octets (each 0–255). Gives ~4.3 billion unique addresses.
  • IPv6 → 128-bit, written in hex. Designed to solve IPv4 exhaustion.
IPv4: 192.168.1.10
IPv6: 2001:0db8:85a3:0000:0000:8a2e:0370:7334

Two Parts of an IP Address

IP: 192.168.1.10
    |______||__|
    Network  Host
    Part     Part

With subnet mask:

IP:   192.168.1.10
Mask: 255.255.255.0 (/24)

Network: 192.168.1  (first 24 bits)
Host:    .10        (last 8 bits)

How Logical Addressing Enables Routing

Your Laptop (192.168.1.10)

Home Router → looks at destination IP

ISP Router → checks routing table, forwards packet

   ... more routers ...

Destination Server (142.250.80.46)

Every router along the way reads the destination IP address and decides where to forward the packet next. MAC addresses alone can't route across networks because they have no concept of location.

Key Insight

  • MAC addresses answer "Who are you?"
  • IP addresses answer "Where are you?"
  • Routers use IP (logical addresses) to move packets between networks.
  • Switches use MAC (physical addresses) to deliver frames within a network.