Every Ethernet interface has a 48-bit MAC address — flat, local to the link. IP lives at layer 3; to deliver frames on the same subnet hosts need to map IP→MAC. ARP (Address Resolution Protocol) broadcasts a question and caches replies in a table.
Every Ethernet interface has a 48-bit MAC address — flat, local to the link. IP lives at layer 3; to deliver frames on the same subnet hosts need to map IP→MAC. ARP (Address Resolution Protocol) broadcasts a question and caches replies in a table.
| Device | Behavior | Role in switching & routing |
|---|---|---|
| Hub | Repeats electrical signal to every port — shared collision domain | No intelligence; rare today. |
| L2 switch | Builds a MAC→port table; floods unknown unicast and broadcast within a VLAN | Switching — microsegmentation, VLANs; STP prevents bridging loops. |
| L3 router / L3 switch | Looks at IP, decrements TTL, rewrites L2 toward next hop | Routing — connects subnets; host uses gateway MAC for off-net destinations. |