Title: Mapping Internet Addresses to Physical Addresses
1Mapping Internet Addresses to Physical Addresses
2TCP/IP Layers
Telnet
FTP
SMTP
SNMP
Application
TCP
UDP
Transport
IP
ICMP
Internet
ARP
Ethernet, FDDI, ATM, Frame Relay
Network Interface
Copper Wire, Fiber optic
Hardware
3Address Resolution Problem
- Hosts have both an IP address and a physical
address (MAC media access control) - Communication is accomplished at the Network
Access Layer through physical address - Must map IP address to physical address
4Two Types of Physical Address
- Some physical addresses are user configurable
- PA f(LA)
- proNET token ring network
- Assign last part of IP address as physical
address - 192.5.48.3 maps to 3
5Dynamic Binding
- Ethernet has 48 bit address, IP address is 32
bit address - Ethernet card address is preset
- Must determine physical address dynamically
- Address Resolution Protocol
6Address Resolution Protocol
- Allows a host to find the physical address of
another host on the same physical network given
the target hosts IP address - Broadcast a request for resolution
- All hosts look at packet
- Target host responds
7Address Resolution Protocol
- ARP is automatic when a request is made to send a
packet to another host - Several could stack up for same host from
different applications - Inefficient if done for every communication with
host - Why not just broadcast packet to be delivered?
8Address Resolution Protocol
A
X
B
Y
9Address Resolution Protocol
- Request includes
- Source IP address
- Source MAC address
- Destination IP address
10Address Resolution Protocol
- Response includes
- Source IP address
- Source MAC address
- Destination IP address
- Destination MAC address
11Address Resolution Protocol
- Address Resolution Cache
- Most communications consist of multiple packets
- Saves ARP responses in cache
- Saves ARP requests in cache why?
- Target
- Everyone else
- LRU algorithm used if cache full
- Cache entries expire
12Address Resolution Protocol
- What if a network card fails?
- New physical address
- Broadcast message includes source physical
address - All hosts can record source mapping
13Address Resolution Protocol
- ARP is a low-level protocol that hides the
underlying network physical addressing,
permitting one to assign an arbitrary IP address
to every machine. We think of ARP as part of the
physical network system, not as part of the
internet protocols.
14ARP ImplementationSend Request
- Looks in cache first
- If there, sends packet out
- Broadcast ARP packet and wait for reply
- Ethernet is best effort delivery packet may be
lost - Host must timeout and retry
- During ARP, original packet must be saved
- More packets may come in during ARP and should be
queued
15ARP ImplementationReceive Request
- When a broadcast request is received
- Add/update senders cache entry
- See if request is for this host
- If it is, send response to sender
16ARP ImplementationReceive Response
- When ARP Response is received
- Add/update cache
- Send packets which are waiting (if any)
17ARP Encapsulation
- Ethernet packet
- Preamble (8 bytes)
- Destination Address (6 bytes)
- Source Address (6 bytes)
- Frame Type ( 2 bytes 0x0806)
- Frame Data (ARP Packet)
- CRC
18ARP Packet
Hardware Type
Protocol Type
Ethernet 0001
IP 0800
Hdw Addr Len
Prot. Addr Len
Operation
0006
0004
Reqst 0001 Resp 0002
Sender Hardware Address (0-3)
Sender HA (4-5)
Sender IP (0-1)
Sender IP (2-3)
Target HA (0-1)
Target Hardware Address (2-5)
Target IP (0-3)
19Proxy ARP
- ARP based on trust
- No consistency checking performed
- Proxy ARP uses these facts
- Responds to ARP request with own physical address
- Accepts packets and forwards them to real host
- Appears that several hosts have same physical
address
20Proxy ARP
Host A
Host B
Bridge
Host X
Host Y
21The Future
- Direct mapping is more efficient
- Next generation of IP is designed to allow 48-bit
addresses to be encoded in IP addresses
22ARP Administration
- Unix ARP command
- arp
- man arp
- Windows ARP command
- arp -?