0% found this document useful (0 votes)
0 views

ARP___CN

The document discusses the Address Resolution Protocol (ARP), which resolves the address resolution problem by mapping IP addresses to MAC addresses for communication in networks. It outlines direct mapping techniques, ARP's dynamic binding, ARP cache management, and the encapsulation of ARP messages. Additionally, it covers advanced topics like ARP cache timeout, automatic revalidation, and proxy ARP for network optimization and security.

Uploaded by

poshith2005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

ARP___CN

The document discusses the Address Resolution Protocol (ARP), which resolves the address resolution problem by mapping IP addresses to MAC addresses for communication in networks. It outlines direct mapping techniques, ARP's dynamic binding, ARP cache management, and the encapsulation of ARP messages. Additionally, it covers advanced topics like ARP cache timeout, automatic revalidation, and proxy ARP for network optimization and security.

Uploaded by

poshith2005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Address Resolution Protocol (ARP)

Sangeetha.K.P

April 8, 2025

Sangeetha.K.P Address Resolution Protocol (ARP) April 8, 2025 1 / 15


Address Resolution Problem

Devices have both IP addresses (e.g., IA, IB) and MAC addresses
(e.g., HA, HB).
Communication over the network uses MAC addresses, but software
works with IP addresses.
If A only knows B’s IP (IB), it needs to find B’s MAC address (HB).
This process is called the address resolution problem.
Address resolution is needed at:
Final step – to reach the destination machine.
Intermediate steps – to reach the next router.
TCP/IP uses different techniques for IPv4 and IPv6.

Sangeetha.K.P Address Resolution Protocol (ARP) April 8, 2025 2 / 15


Direct Mapping (IPv4 and IPv6)
What is Direct Mapping?
Hardware address is directly used as the host part of the IP address.
Common in IPv6, and possible in IPv4 if hardware addresses are
small.
Example with IPv4 (Network: 192.5.48.0/24):
Network prefix: 192.5.48 → First 24 bits (fixed).
Host part: Last octet → same as the computer’s hardware address.
Computer A → Hardware Address: 1 → IP: 192.5.48.1
Computer B → Hardware Address: 2 → IP: 192.5.48.2
Computer C → Hardware Address: 3 → IP: 192.5.48.3
Important Notes:
Only works if hardware address fits in one octet (1 to 254).
Ensures easy address assignment by matching MAC and IP last byte.
Sangeetha.K.P Address Resolution Protocol (ARP) April 8, 2025 3 / 15
Direct Mapping...

Figure: An illustration of a direct mapping scheme in which a computer’s


hardware address is embedded in the computer’s IP address.

Sangeetha.K.P Address Resolution Protocol (ARP) April 8, 2025 4 / 15


Resolution in a Direct-Mapped Network

How it Works:
IP address includes the hardware (MAC) address in the host portion.
To get the MAC address, just extract the last part (octet) of the IP.
Example: IP 192.5.48.3 → MAC address = 3
No table or broadcast is needed — it’s a direct calculation.
Simple Mapping Function:
HA = f(IA) → Hardware Address = Function(IP Address)
In our example, f(192.5.48.3) = 3
Advantages:
Extremely fast and efficient (only a few machine steps).
Easy to add new computers without affecting existing ones.
Simple and human-readable logic.

Sangeetha.K.P Address Resolution Protocol (ARP) April 8, 2025 5 / 15


IPv4 Address Resolution Through Dynamic Binding
Why Direct Mapping Fails:
MAC address = 48 bits; IPv4 address = 32 bits.
MAC addresses are fixed and can’t be changed.
Direct mapping is not possible for Ethernet.
Solution: Address Resolution Protocol (ARP)
ARP dynamically finds MAC address from IP address.
No need for centralized configuration or manual tables.
How ARP Works:
Host A broadcasts: “Who has IP B?”
Host B replies with its MAC address.
Host A uses the MAC to send data.
ARP Advantages:
Automatic, efficient, and easy for new devices.
Only used when needed — minimizes overhead.
Sangeetha.K.P Address Resolution Protocol (ARP) April 8, 2025 6 / 15
ARP Cache (Address Resolution Protocol)

Why not broadcast every time?


Broadcasting is costly — all devices must listen and process it.
It’s wasteful to ask for the MAC address every time we send data.
Solution: ARP Cache
Stores recently learned IP-to-MAC address pairs.
Used to avoid repeating ARP requests.
How it works:
First communication: ARP request → reply → save in cache.
Next time: Check cache first before broadcasting.
Benefit:
Saves time and reduces network traffic.
Even a small cache improves performance.

Sangeetha.K.P Address Resolution Protocol (ARP) April 8, 2025 7 / 15


ARP Cache Timeout
Soft State: Temporary info that can become outdated without
warning.
Problem:
If a device crashes, no notification is sent.
Sender still uses old ARP info from cache.
Solution: Timeout Mechanism
Each ARP entry has a timer (e.g., 20 mins).
When timer expires, entry is removed.
After Timeout:
If no data is sent → nothing happens.
If data must be sent → send new ARP request.
If destination responds → cache updated.
If no response → destination unreachable.
Advantages:
Independent cache management.
No need for reliable delivery or central server.
Automatically detects down devices.
Disadvantage: Delay in detecting failures (up to timeout limit).
Sangeetha.K.P Address Resolution Protocol (ARP) April 8, 2025 8 / 15
ARP Encapsulation and Identification
ARP messages are sent inside a network frame — placed in the
payload area.
The frame header contains a type field to identify the content.
If the type field is 0x0806, it indicates the frame contains an ARP
message.
This type value is standardized for Ethernet and is always the same
for all ARP messages.
To distinguish between ARP Request and ARP Reply, the receiver
inspects the ARP message contents.

Figure: An ARP message encapsulated in a physical network frame.


Sangeetha.K.P Address Resolution Protocol (ARP) April 8, 2025 9 / 15
ARP Message Format
ARP = Address Resolution Protocol
Used to map IP address (logical) to MAC address (physical)
ARP message format is flexible (works on many network types)
Mostly used for:
32-bit IPv4 address
48-bit Ethernet MAC address

Figure: The ARP message format when used to map an IPv4 address to an
Ethernet address.

Sangeetha.K.P Address Resolution Protocol (ARP) April 8, 2025 10 / 15


ARP Message Format...

Key Fields in ARP Message:


Hardware Type: Type of network (e.g., Ethernet = 1)
Protocol Type: Protocol used (e.g., IPv4 = 0x0800)
HLEN: Hardware address length (Ethernet = 6 bytes)
PLEN: Protocol address length (IPv4 = 4 bytes)
Operation: 1 = Request, 2 = Reply
Sender Hardware Address: MAC of sender
Sender IP Address: IP of sender
Target Hardware Address: MAC of target (0 in request)
Target IP Address: IP of target
In Request: Target MAC is unknown → set to all 0s
In Reply: All fields are filled with correct values

Sangeetha.K.P Address Resolution Protocol (ARP) April 8, 2025 11 / 15


Automatic ARP Cache Revalidation
Problem: Jitter due to ARP cache expiration
When ARP cache entry expires, the next packet is delayed.
This delay causes jitter, especially in real-time data (e.g., voice).
Solution: Early Revalidation
Each ARP cache entry has:
A main expiration timer.
A revalidation timer set slightly earlier.
On revalidation timer expiry:
If entry was recently used, send ARP request.
On reply: reset both timers, no delay occurs.
If no reply:
The main timer expires and ARP is retried.
Advantage:
Prevents jitter and improves performance for time-sensitive
applications.
Sangeetha.K.P Address Resolution Protocol (ARP) April 8, 2025 12 / 15
ARP Caches in Layer 3 Switches

Layer 3 Switch: A Layer 3 switch is basically a switch that can


perform routing functions in addition to switching.
Problem: Frequent ARP broadcasts from many computers (e.g.,
192) increase traffic.
Optimization by Switch:
Monitors ARP traffic and learns IP-MAC pairs.
Creates its own ARP cache.
Can reply to ARP requests directly without broadcasting.
Extra Smart:
Knows if a device is powered off (Ethernet link down).
Can safely update/remove stale ARP entries.
Benefits:
Reduces network ARP traffic.
No changes needed in connected computers.

Sangeetha.K.P Address Resolution Protocol (ARP) April 8, 2025 13 / 15


Proxy ARP
Definition: A technique where a device answers ARP requests on
behalf of another device.
Purpose: Makes two networks behave like one; helps in routing,
VPNs, and firewalls.
How it Works:
A special device (proxy) connects both networks.
Maintains a database of IP and MAC addresses.
Intercepts ARP requests and replies on behalf of the real target.
Forwards the packet to the actual destination.
Example:
Router R sends ARP for Host H4 (on another network).
Proxy replies with its own MAC.
Router sends data to Proxy, which forwards it to H4.
Security Use:
Proxy can act as a firewall or packet filter.
Ensures all traffic goes through one inspection point.
Advantage: No need to reconfigure other devices.
Sangeetha.K.P Address Resolution Protocol (ARP) April 8, 2025 14 / 15
Figure: Illustration of two networks using proxy ARP

Sangeetha.K.P Address Resolution Protocol (ARP) April 8, 2025 15 / 15


Quick Assignment: Computer Networks (10 minutes)

Instructions: Answer the following question briefly but clearly. You may
use diagrams or examples. Submit your response in 10 minutes.

Question:
A company has a computer with two network interfaces (multi-homed
computer). One interface gets an IP address via DHCP, and the other is
manually configured.
1 Explain how ARP helps this computer communicate with other hosts
in both networks.
2 What is the difference in how BOOTP and DHCP assign the IP
address for the dynamic interface?
3 Why might having a multi-homed setup require special care in
routing?

Sangeetha.K.P Address Resolution Protocol (ARP) April 8, 2025 15 / 15

You might also like