While it is commonly assumed that communication between computers happens through IP addresses, the actual transmission at the data link layer relies on MAC addresses.
In reality, IP addresses are used to find corresponding MAC addresses using ARP, and communication is performed based on those MAC addresses.
What is ARP?
ARP (Address Resolution Protocol) is a network protocol used to map an IP address to a MAC address—essentially acting as a "bridge" between Layer 3 (network layer) and Layer 2 (data link layer).
- ARP translates a virtual/logical IP address into a physical MAC address.
- The reverse process can be done using RARP (Reverse ARP), which maps a MAC address to an IP address.
ARP in Action
- IP-to-MAC Address Resolution
- A host(any devices connected to network) may know the IP address of a target, but the actual transmission requires the MAC address at the data link layer.
- The host sends an ARP request to resolve the MAC address associated with the known IP address.
- ARP Cache
- Once the mapping is resolved, the host stores it in the ARP cache (a local table).
- Future communications to the same IP can retrieve the MAC address directly from the cache without sending another request.
- ARP Request/Reply Process
- If the MAC address is not in the cache, the host sends an ARP request as a broadcast to all devices on the network.
- The device with the matching IP responds with an ARP reply, containing its MAC address.
- ARP Packet Structure
- The ARP header includes:
- Hardware type
- Protocol type
- Hardware address length (MAC length)
- Protocol address length (IP length)
- Operation type (request/reply)
- Sender/target MAC and IP addresses
- The ARP header includes:
Broadcast vs. Unicast
- Broadcast: A data transmission sent to all hosts on a local network.
- → Used by ARP requests when the target MAC is unknown.
- Unicast: A 1:1 transmission directed to a specific device using its unique address.
- → Used for normal communication once the MAC address is known.
Understanding ARP is fundamental to grasping how Layer 2 and Layer 3 interact in real-world networking environments.
'Computer Science > Network' 카테고리의 다른 글
IP Address (0) | 2025.08.06 |
---|---|
MAC address (0) | 2025.08.01 |
Load Balancer (0) | 2025.07.25 |
PDU (0) | 2025.07.25 |
The process of sending and receiving data between layers (1) | 2025.07.21 |