Computer Network & Network Security System — Data Link Layer, NEC licence examination syllabus (Nepal Engineering Council).
Every network card in the world has a unique serial number burned in at the factory — and almost nothing you write ever uses it directly.
A machine has two addresses at once, and they exist for different reasons. Understanding why there are two, rather than memorising both, is what the exam actually tests.
An IP address describes where you are. It is assigned by whoever runs the network, it changes when you move to a different network, and it is structured so routers can narrow down a destination without knowing every machine on earth — the network portion tells a router which direction to send a packet.
A MAC address describes which card you are. It is 48 bits, burned in at manufacture, and it never changes no matter where the machine is plugged in. It is flat: there is no structure a router could use to narrow anything down.
That flatness is the whole reason both exist. If the world used only MAC addresses, every router would need an entry for every device ever made, because there would be no way to summarise them. If it used only IP addresses, a network card would have no fixed identity and could not be addressed on the wire before it had been configured.What it doesGiven an IP address on the local network, finds the matching MAC address.
HowBroadcasts a request — "who has this IP?" — to every device on the LAN. Only the device holding that IP replies, and it replies directly rather than by broadcast.
CachingThe answer is stored in an ARP cache for a short time, so the broadcast does not repeat for every packet.
The asymmetry is worth noticing: the request is broadcast because the sender does not yet know who to ask, and the reply is unicast because by then it does. A protocol that broadcast both directions would double the noise for no benefit.
ARP and DNS. DNS turns a name into an IP address. ARP turns an IP address into a MAC address. They sit at different layers and neither can do the other's job.
RARP and ARP. RARP runs the other way — a device that knows its own MAC but not its IP asks the network for one. It has been superseded by DHCP, which answers the same question and much more besides.
The broadcast MAC and a broadcast IP. FF:FF:FF:FF:FF:FF reaches every device on the local segment and is stopped by any router. A broadcast IP address is a layer-3 idea and is handled differently.
IP says where you are; MAC says which card you are. One is hierarchical and routable, the other flat and permanent.
ARP request broadcasts, ARP reply unicasts.
Off-network destination → ARP for the router, not for the destination.
The cache exists so the broadcast does not repeat for every packet.
Create a free account to tick topics off, take notes as you read, watch the video lessons and get a day-by-day study plan built around your exam date.
Loading…