05 — MAC ADDRESSES vs IP
Two addresses per device. Why?
Estimated 7 minutes.
Every device has two addresses.
You already know about IP addresses. But every network device also has a MAC address — burned into the hardware at the factory and never changes. Both addresses identify the device, but they do different jobs.
Side by side.
MAC is the hardware. IP is the software-assigned label.
What a MAC looks like.
MAC addresses are 12 hex characters, usually written like 00:1B:44:11:3A:B7. The first half identifies the manufacturer (Siemens, Allen-Bradley, Beckhoff…). The second half is a serial number.
MAC works on the cable.
When data travels between devices on the same network, switches use MAC addresses to deliver it. The switch doesn't know or care about IP — it just looks at the MAC and sends the frame to the right port.
IP works between networks.
When data has to leave the local network, IP takes over. Routers use IP addresses to decide which network to send the packet to next. Inside each network, MAC takes the final hop.
Move the laptop.
Three switches, three subnets. Click any switch to move the laptop there. Watch what changes — and what doesn't.
Which delivers the last meter?
A packet has crossed three routers and arrived at your factory switch. The switch needs to deliver it to PLC #5. Which address does the switch use?
- IP
- MAC
- Both
But wait — how does it know the MAC?
The sender knows the destination IP, but not the MAC. So it shouts on the network: "Who has 192.168.1.20? Tell me your MAC." The owner replies. This shout-and-reply is called ARP — Address Resolution Protocol.
ARP in action.
ARP maps IP addresses to MAC addresses on the local network.
Devices remember.
Every device keeps a small cache of recent IP-to-MAC mappings, called the ARP table. So it doesn't have to ask every time. Run "arp -a" on your computer right now and you'll see one.
Two MACs, one IP — what happens?
You accidentally set the same IP on two PLCs. Both reply to ARP requests. What does the network see?
- Nothing — IPs are independent of MACs
- The IP flips between two MACs in the ARP table
- Both PLCs reboot
Real-world troubleshooting.
"My PLC isn't responding" usually means one of three things: bad cable (no MAC visible at all), wrong IP/mask (MAC is there, IP doesn't match), or ARP conflict (two MACs claim the same IP). The ARP table tells you which one.
Two addresses, two jobs.
- MAC = hardware address, permanent, used inside one network.
- IP = assigned address, changeable, used between networks.
- ARP maps IP to MAC on the local segment.
- Conflicts show up as flapping ARP entries.
Lesson 05 complete.
- You know what a MAC is and how it differs from IP.
- You understand ARP at a working level.
- You can use the ARP table to diagnose IP conflicts.