Network Layer·Lesson 2 of 11

Logical Addressing

01

Two Kinds of Address

Every device on a network actually has two different addresses, and beginners often mix them up. One is burned into the hardware and never changes — the . The other is assigned by the network and can change — the . This lesson is about that second kind, called a logical address, and why we need it on top of the hardware one.

The one-liner

A logical address (the IP address) is a software-assigned address that identifies a device across networks. Unlike a hardware address, it's structured so routers can figure out which network a device belongs to.

🏷️

Your name vs your mailing address

Your name is like a MAC address — it's uniquely yours and it stays the same wherever you go, but it tells nobody where to find you. Your mailing address is like an IP address — it can change when you move, and it's structured (country, city, street) so the postal system can actually route a letter to you. The network needs the 'address', not just the 'name', to deliver across long distances.

02

Why a Hardware Address Isn't Enough

A MAC address is flat: it's just a unique serial number with no structure that says where the device is. If the internet tried to route using MAC addresses, every router on Earth would need a list of every single device's address — billions of entries — because nothing about a MAC tells you which network it lives on. That simply doesn't scale. Logical addressing fixes this by giving addresses a structure tied to location on the network.

03

Logical vs Physical, Side by Side

The two addresses work as a team on every trip: the IP address identifies the final destination across networks, while the MAC address handles delivery on each individual local link along the way. Here's how they compare:

MAC address (physical)IP address (logical)
Assigned byThe manufacturer (in hardware)The network (in software)
StructureFlat — no location infoHierarchical — network + host parts
Changes?Fixed to the deviceCan change with the network
Works across networks?No — local onlyYes — routable everywhere
Used byThe Data Link layer (Layer 2)The Network layer (Layer 3)
04

The Trick: Network Part + Host Part

The reason logical addressing scales is that an IP address is split into two parts: a network part that identifies which network the device is on, and a host part that identifies the specific device within that network. It's just like a phone number, where the area code says which region and the rest identifies the line. Routers only need to know how to reach each network (the network part), not every individual device — so their routing tables stay manageable even for the whole internet.

🚫

"A device's IP address is permanent, like a fingerprint."

IP addresses are assigned by the network and routinely change — your laptop gets a different one on your home Wi-Fi than at a cafe. The permanent, hardware-bound identifier is the MAC address. The IP address is deliberately changeable so it can reflect where the device currently sits on the network.

Q:Why does the Network layer use logical (IP) addresses instead of just hardware (MAC) addresses?

A: Because MAC addresses are flat and location-independent — routing with them would require every router to track every device on Earth, which can't scale. IP addresses are hierarchical, split into a network part and a host part, so routers only need to know how to reach each network. That structure is what makes internet-scale routing possible.

Quick Revision Cheat Sheet

Logical address: The IP address — assigned by the network in software

Physical address: The MAC address — fixed in hardware

Why logical: MAC is flat; IP is structured for routing

Two parts: Network part (which network) + host part (which device)

Scales because: Routers track networks, not individual devices

Changes?: IP can change; MAC stays fixed