ARP and RARP
LESSON 7
(September 27, 1995)
Daniel Z. Tabor Jr.
New Jersey Institute of Technology
Outline:
ARP and RARP
The Address Resolution Problem:
- ? How does a host or gateway map an IP address to the correct physical address when it needs to send a
packet over a physical network ?
- Devise a low-level software that hides physical addresses and allows higher-level programs to work only
with internet addresses.
- Mapping of high-level to low-level addresses is the address resolution problem.
| IP address A | conceptual | B IP address |
| Physical address A | physical | B Physical address |
Physical Addresses:
- Two basic types of physical addresses:
- Large
- Small
- Token Ring (proNET-10)
- 8 bits
- proNET-10 - uses Class C addresses with host-id portion = 1, 2, ... , 255
Physical Addresses:
Mapping
- Mapping must be computationally efficient (simply mask all portions of the address excluding the host-id portion)
- When address mapping can only be done via an address table (X.25 to IP), hashing is used to speed up lookup.
- Problem with representation of 48-bit Ethernet addresses within a 32-bit IP address and allowing new
machines to be added without recompilation.
- Avoid maintaining a static table of mappings by using the ARP (Address Resolution Protocol).
Address Resolution Protocol (ARP):
- ARP - is a low-level protocol used to bind addresses dynamically.
- ARP allows a host to find a physical address of a target host on the same physical network, given only it’s IP
address.
- ARP hides the underlying network physical addressing. It can be thought of as part of physical network
system and not the internet protocols.
- ARP broadcasts special packets with the destination’s IP address to ALL hosts.
- The destination host (only) will respond with it’s physical address.
- When the response is received, the sender uses the physical address of destination host to send all packets.
ARP Inefficiencies and Improvements:
- Broadcasting is expensive on network resources, so an ARP cache of recently acquired IP-to-Physical address
bindings is kept.
- Other Broadcast Improvements:
- Include the sender’s IP-to-Physical address binding along with the request, to the destination. This reduces
future traffic.
- During each broadcast, ALL machines can find out the senders physical address and record it locally in it’s ARP
cache.
- When a new machine comes on-line, it immediately broadcasts it’s IP-to-Physical address binding to all nodes.
ARP Functionality:
- There are two main functional parts of the address resolution protocol:
- Determine the destination’s physical address before sending a packet.
- Answer requests that arrive for it’s own Physical-to-IP address binding.
- Because of lost/duplicate packets, ARP must handle this to avoid many re-broadcasts.
- Bindings in ARP cache (actual cache table) must be removed after a fixed period of time to ensure validity.
- When a packet is received, the sender’s IP address is stripped and the local table is updated (ARP cache),
then the rest of the packet is processed.
- Two types of incoming packets:
- Those to be processed (correct destination).
- Stray broadcast packets (can be dropped after updating the ARP cache).
- Application programs may request the destination address many times before the binding is complete.
This must be handled, by discarding enqueued requests, when the correct binding returns.
- ARP sets the field "TYPE" for the ID of a frame.
- ARP packets DO NOT have a fixed format header, so they can be used with arbitrary physical addresses
and arbitrary protocol addresses.
- The lengths of physical addresses may vary up to 48-bits.
ARP Header Fields:
- Hardware Type: (16-bits) - the type of interface the sender seeks an answer for.
- Protocol Type: (16-bits) - the high-level software address type provided.
- HLEN: (8-bits) - length of arbitrary physical address.
- PLEN: (8-bits) - length of arbitrary protocol address.
- OPERATION: (16-bits) - the specific type of operation requested.
- ARP.request (1)
- ARP.response (2)
- SENDER HA: (6-octets) - the sender’s actual hardware address, scalable up to six bytes.
- SENDER IP: (4-octets) - the sender’s IP address, always 32-bits.
- TARGET HA: (6-octets) - the destination node’s hardware address, scalable up to six bytes.
- TARGET IP: (4-octets) - the destination node’s IP address, always 32-bits.
Booting with Physical Addresses:
- Machines without secondary-storage (diskless workstations) that cannot store their IP addresses need to
find out by broadcasting their physical address and requesting a binding to the appropriate IP address.
- Terminals and nodes cannot connect to their fileservers without using source and destination IP addresses.
- IP addresses should not be bound into a machines bootstrap image. Not doing so allows for flexibility and
convenient changes to configuration information.
- A connection is needed at start-up to allow the diskless workstation to begin functioning (sends request to
a server and waits for the response).
- To provide the connection, workstations include a minimal set of TCP/IP protocols in firmware.
- Two advantages of using a unique physical address:
- Physical address is available from the network interface hardware and does not have to be bound into the
operating system.
- The machine ID depends on the network (not it’s CPU) so all machines will be given uniform and unique IDs.
Reverse Address Resolution Protocol (RARP):
- RARP functionality supports multiple physical network types.
- All machines receive RARP requests but only those authorized to supply RARP services can respond.
Machines supplying RARP services are called RARP servers.
- RARP is only used on LANs with a low probability of failure since bootstrapping requires quick responses.
Primary and Backup RARP Servers:
- Primary servers respond while backup servers simply record the time of the incoming requests.
- If the primary server is down, backup server will see reoccurring requests and take over. This take over is
done by using a random delay to see if other backup servers respond first.
RARP Header Fields:
- RARP requests and responses use the same frame format as ARP, however the OPERATION field value differs.
- OPERATION: (16-bits) - the specific type of operation requested.
- RARP.request (3)
- RARP.response (4)
Last Modification: (Sunday, August 25, 1996)
All work was written, produced, and is copyrighted by Daniel Z. Tabor Jr.
Page created by Daniel Z. Tabor Jr.
Copyright ©1996 Illusion Industries Inc.
