Back to the 2023 paper

Module 3: Network Layer & Routing

20237m

We know that there are 2 types of address scheme (i.e. IP address and MAC address) in computer networks. Explain what is the need of having two types of addresses. What will happen if we use only IP address in computer networks?

Worked SolutionAI Assisted

Need for Two Types of Addresses: IP Address and MAC Address

Definitions

  • MAC (physical / link) address — a 48-bit (6-byte) flat address burned into the NIC by the manufacturer: 3 bytes of OUI (vendor) + 3 bytes of device ID, e.g. 00:1A:2B:3C:4D:5E. It is used by the data-link layer for hop-to-hop delivery on one local network.
  • IP (logical) address — a 32-bit (IPv4) hierarchical address assigned by the administrator or DHCP: a network part that identifies the network and a host part that identifies the host. It is used by the network layer for end-to-end routing through the internetwork.

Why both are needed

  1. Different scopes need different structures. IP must be hierarchical so that routers can aggregate: a core router forwards on the network part alone instead of storing millions of individual hosts. MAC addresses are flat and carry no routing information — a routing table built from them would have to list every NIC in the world.
  2. Different layers do different jobs. The IP address gets the packet to the destination network; the MAC address gets the frame to the next hop and finally to the destination host on that link. Each hop rewrites the frame header (new source MAC of the sender, new destination MAC of the receiver) while the IP header stays unchanged end-to-end.
  3. Technology independence. Ethernet, 802.11, Bluetooth and PPP each have their own frame format but can all carry the same IP packet. MAC is what makes local delivery possible on the specific medium of that hop.
  4. Fixed vs changeable. The MAC is tied to the hardware and is permanent; the IP changes when the host moves to another network. Applications can therefore keep using one IP identity while the host roams.
  5. ARP relies on the pair. A sender knows the destination IP but not the MAC of the next hop; ARP broadcasts a query that is framed with the link-layer broadcast address FF:FF:FF:FF:FF:FF and answered with the target's MAC — a procedure that is impossible without both address types.

What would happen if only IP addresses were used

  • No local delivery mechanism. A switch forwards using MAC addresses in the frame. Without them it would have to decapsulate every frame and consult an IP table — every device would behave like a router, adding huge processing cost and latency even inside one LAN.
  • Routing tables would explode. IP would have to serve both local identification and global routing. Keeping it flat (like MAC) means every router stores every host; keeping it hierarchical means hosts on the same LAN could not be addressed directly without a router in the path.
  • Address resolution breaks. There would be no physical broadcast address, so no way to ask who owns an IP; ARP and DHCP discovery could not be framed.
  • Multi-technology networks break. One address format cannot be written into every kind of frame (Ethernet, Wi-Fi, token ring); two devices on the same wireless LAN could never talk directly.
  • Every NIC would need globally routable configuration, even for a closed LAN, and changing networks would mean re-addressing the hardware.

Conclusion: IP = where the host is in the internetwork (logical, hierarchical, routable); MAC = who the host is on the local wire (physical, flat, hop-to-hop). The two answer complementary questions, so both are required.

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.