The Exploit HQ

Networking for Beginners · lesson 3 · 2026-11-05

Networking for Beginners (2026): IP Address vs MAC Address (and DHCP)

Before you start

Every device has two addresses: a MAC address (a name tag sewn on at the factory) and an IP address (a room key that changes when you move). Learn why every device needs both, watch a real DHCP front desk hand out an address, and find both on your own computer.

Syn rolls onto a brand new street. Fresh off the factory line, one name tag sewn onto his chest.

He walks up to the front desk to check in, and the clerk slides him a second tag. A room key. Number thirty.

So why does every device on a network need two addresses? One sewn on, and one handed out at a desk?

By the end of this, you’ll know what each one does, why you need both, and who runs that front desk. And you’ll find both addresses on your own computer, in about ten seconds.

Start with the tag that was already there. That’s the MAC address.

It’s put on the device’s network card when it’s built, like a name tag sewn into a jacket. It travels with the device wherever it goes, and normally it never changes.

Your laptop has one. Your phone has one. Your smart fridge has one. If it talks on a network, it has a MAC address.

It looks like this. Twelve characters, written in six pairs. Each character is a number from zero to nine, or one of the first six letters of the alphabet.

The ones in our lab start with zero two. That marks them as made up, for our practice lab. A real one usually starts with a code for the company that built the card.

Here’s the real thing. We asked the laptop in our lab for its network card, and there’s the tag, right after the word ether.

Remember the switch from last episode? That’s the tag it reads. The mailroom knows every MAC address on the street, and which door it lives behind.

Now the second tag. The room key. That’s the IP address.

If the MAC address is who you are, the IP address is where you are right now.

Our laptop’s IP address is one ninety-two dot one sixty-eight dot fifty dot thirty.

Read it like a street address. The first three parts, one ninety-two dot one sixty-eight dot fifty, are the street. Everyone on this network shares them. The last part is the house number. Our laptop lives at number thirty.

Now take that laptop to a coffee shop. New street, so a new IP address. But the name tag on the network card? Same one. You didn’t become a different laptop. You just moved.

Exactly. Name tag stays. Room key changes.

Here it is in the lab. The word i net, then the street, then the house number, dot thirty.

That slash twenty-four on the end says the first three parts are the street. Don’t worry about the math. Just read it as “street, then house”.

So an IP address is a location. It belongs to the network you’re on, not to the device.

So why not just use one? Because each tag has a different job.

The IP address gets Syn across the city. The router reads it, and picks the road. But once Syn reaches the right street, the switch doesn’t read IP addresses. It reads name tags. So the MAC address gets him to the right door.

So your computer keeps a little list that pairs them up. This IP address on my street wears this name tag.

Here’s that list on the laptop. We just said hello to the router at dot two fifty-four. And there’s the router’s name tag, right next to it.

So the IP address is for finding the street. The MAC address is for finding the door. Every trip needs both.

The front desk. Its real name is D H C P, and on your home network it usually lives inside the router.

Nobody types in an IP address by hand anymore. When a device joins a network, it asks the front desk for one. Four short messages.

One. Discover. Syn shouts to the whole street.

Two. Offer. The front desk answers. I’ve got room thirty.

Three. Request. Syn says, I’ll take room thirty. Out loud, so any other desk on the street knows he’s taken.

Four. Acknowledge. The desk says, it’s yours.

But the key isn’t forever. It’s a lease. In our lab, one hour. About halfway through, your computer quietly asks to keep it, and the desk says yes. Leave for good, and the key goes back on the rack for someone else.

The desk has a whole rack of keys for this street, thirty to ninety-nine. Our laptop always gets thirty, because the desk saved that room for its name tag.

And this is real. We wiped the laptop’s IP address in the lab and asked the front desk for a new one.

There’s the discover. There’s the select, that’s the request. And there’s the lease. Room thirty, from the desk at dot two fifty-four, for one hour.

So D H C P is the front desk. Discover, offer, request, acknowledge. And the key is only borrowed.

Your turn. This is completely safe. It only reads your own settings, and changes nothing.

On Windows, open PowerShell. Click Start, type PowerShell, and press Enter. Then type i p config, space, slash all. Press Enter.

ipconfig /all

Here it is on a real Windows computer, on our practice network.

Find Physical Address. That’s your MAC address, the tag that was sewn on. Windows writes it with dashes instead of colons. Same thing.

Now find I P v four Address. That’s your room key. Just below, D H C P Enabled says yes, and D H C P Server shows which desk handed it out. Lease Obtained and Lease Expires show when your key was handed out, and when it runs out. Our practice computer has no way out, so its Default Gateway is empty. Yours will show your router.

On an Apple Mac, open Terminal and type i f config, space, e n zero. On Linux, type i p, space, a d d r. Look for ether, that’s the name tag, and i net, that’s the room key.

ifconfig en0
ip addr

Now, here’s why hackers care about all of this.

Some routers can lock the door to a list of name tags. Only these MAC addresses allowed in. It sounds safe, but it’s a weak lock. A device can change its MAC address in software, in seconds. Many phones already make up a new one for each Wi-Fi network, for privacy.

And the front desk trusts whoever answers first. On a public Wi-Fi network, anyone could set up a fake desk that hands out keys with a bad set of directions, sending your traffic through their machine first.

So, three things. Protect your home Wi-Fi with a strong password, using W P A two or W P A three. Be careful on public Wi-Fi. And look for the lock in your browser. That’s H T T P S, and it gets its own episode.

So, let’s recap. The MAC address is your name tag, sewn on, and the switch reads it. The IP address is your room key, it changes when you move, and the router reads it. And the front desk, D H C P, hands out the keys. Discover, offer, request, acknowledge.

But before Syn leaves, he gets sent to the packing station. And they don’t just put him in an envelope.

They put the envelope in another envelope. And that one in another one. Next time, the layers.

See you there.