Title: Chapter 19: Binding Protocol Addresses ARP
1Chapter 19 Binding Protocol Addresses (ARP)
- Jing Wang
- Towson University
219.1. Introduction
- Before protocol software can send a packet across
a physical network, it must translate IP address
of the destination computer into hardware address - Three mechanisms used to perform address mapping
- Table lookup
- Closed-form computation
- Message exchange
319.2. Protocol Addresses And Packet Delivery
- Protocol addresses are abstractions provided by
software physical network hardware does not know
how to locate a computer from its protocol
address. - The protocol address of the next hop must be
translated to an equivalent hardware address
before a packet can be sent.
419.3. Address Resolution
- Translation from a computers protocol address to
an equivalent hardware address is known as
address resolution, and a protocol address is
said to be resolved to the correct hardware
address - Address resolution is local to a network.
519.3. Address Resolution
- Figure 19.1. A simple internet with routers R1
and R2 connecting three physical networks each
network has two host computers attached. A
computer can only resolve the address of a
computer attached to the same physical network.
619.3. Address Resolution
- Mapping between a protocol address and a hardware
address is called address resolution. - A host or router uses address resolution when it
needs to send a packet to another computer on the
same physical network. - A computer never resolves the address of a
computer that attaches to a remote network.
719.4. Address Resolution Techniques
- What algorithm does software use to translate a
protocol address into a hardware address? - The answer depends on the protocol and hardware
addressing schemes - The method used to resolve an IP address to an
Ethernet address differs from the method used to
resolve an IP address to an ATM address - Because Ethernet addressing scheme differs from
the ATM address scheme. - A router or multi-homed host can connect to
multiple types of physical networks, need more
than one address translation module
819.4. Address Resolution Techniques
- Table lookup
- Binding or mappings are stored in a table in
memory, which the software searches when it needs
to resolve an address - Closed-form computation
- The protocol address assigned to a computer is
chosen carefully so the computers hardware
address can be computed from the protocol address
using basic Boolean and arithmetic operation. - Message exchange
- Computers exchange messages across a network to
resolve an address. One computer sends a message
that requests an address binding (i.e.,
translation), and another computer sends a reply
that contains the requested information.
919.5. Address Resolution With Table Lookup
- Figure 19.2. An example address binding table.
Each entry in the table contains a protocol
address and the equivalent hardware address.
1019.5. Address Resolution With Table Lookup
- A separate address binding table is used for each
physical network - Chief advantage
- Generality
- Easiness
- For a network that contains less than a dozen
hosts, a sequential search can suffice - For large networks, to improve computational
efficiency - Hashing
- Direct indexing
- When protocol addresses are assigned from a
compact range
1119.5. Address Resolution With Table Lookup
- Figure 19.3. An example of direct lookup for a
class C network. The host portion of an address
is used as an array index.
1219.6. Address Resolution With Closed-Form
Computation
- When a computer connects to a network that uses
configurable addressing, the local network
administrator must choose a hardware address as
well as an IP address. The two values can be
chosen to make address resolution trivial. - Suppose a configurable network 220.123.5.0/24
- IP address 220.123.5.1, hardware address 1
- Hardware_address ip_address 0xff
1319.7. Address Resolution With Message Exchange
- A distributed approach in which a computer that
needs to resolve an address sends a message
across a network and receives a reply. - The message carries a request that specifies the
protocol address, and the reply carries the
corresponding hardware address
1419.7. Address Resolution With Message Exchange
- Where should an address resolution request to
sent? - A network includes one or more servers that are
assigned the task of answering address resolution
requests. - Centralization
- Easier to configure, manage, and control
- Servers expensive, bottleneck
- Each computer on the network participates in
address resolution by agreeing to answer
resolution requests for its address. - Distributed computation
- Eliminates servers
1519.7. Address Resolution With Message Exchange
- Figure 19.4. Comparison of address resolution
using a table lookup (T), closed-form computation
(C), and dynamic message exchange (D).
1619.8. Address Resolution Protocol
- The method chosen depends on the addressing
scheme used by hardware - Table lookup WAN
- Closed-form computation configurable network
- Message exchange LAN hardware that has static
addressing - Address Resolution Protocol (ARP)
- Request an IP address
- Reply both IP address and hardware address
1719.9. ARP Message Delivery
- Figure 19.5. An ARP message exchange. (a)
Computer W begins to broadcast an ARP request
that contains computer Y's IP address. (b) All
computers receive the request, and (c) computer Y
sends a response directly to W.
1819.10. ARP Message Format
- Although the ARP message format is sufficiently
general to allow arbitrary protocol and hardware
addresses, ARP is almost always used to bind a
32-bit IP address to a 48-bit Ethernet address.
1919.10. ARP Message Format
- Figure 19.6. The format for an ARP message when
used to bind Internet protocol addresses to
Ethernet hardware addresses.
2019.10. ARP Message Format
- HARDWARE ADDRESS TYPE
- 1 when ARP is used with Ethernet
- PROTOCOL ADDRESS TYPE
- 0x0800 when ARP is used with IP
- HADDR LEN
- Number of octets in a hardware address
- 6 octets of Ethernet hardware addresses
- PADDR LEN
- Number of octets in a protocol address
- 4 octets of IP protocol addresses
- OPERATION
- 1 request
- 2 - response
2119.11. Sending An ARP Message
- Figure 19.7. Illustration of an ARP message
encapsulated in an Ethernet frame. The entire ARP
message travels in the data area of the frame
the network hardware neither interprets nor
modifies contents of the ARP message.
2219.12. Identifying ARP Frames
- Figure 19.8. Illustration of the type field in an
Ethernet header used to specify the frame
contents. A value of 0x806 informs the receiver
that the frame contains an ARP message.
2319.13. Caching ARP Responses
- To reduce network traffic, ARP software extracts
and saves the information from a response so it
can be used for subsequent packets. - ARP maintains a small table of bindings in
memory, and manages the table as a cache. - An entry is replaced whenever a response arrives,
and the oldest entry is removed whenever the
table runs out of space or after an entry had not
been updated for a long period of time (e.g., 20
min) - Whenever ARP performs address binding, it
searches the cache before using the network.
2419.14. Processing An Incoming ARP Message
- The receiver extracts the senders address
binding and checks to see if the senders address
is present in the cache. If so, update the
previously stored binding. - The receiver examines the OPERATION field to
determine what to do - After a computer replies to an ARP request, it
extracts the senders address binding from the
request and adds the binding to its cache for
later use.
2519.15. Layering, Address Resolution, Protocol
Addresses
- Figure 19.9. Layered protocol software in a
computer and the conceptual boundary between the
network interface layer and higher layers.
Software above the boundary uses protocol
addresses software below the boundary translates
each protocol address to an equivalent hardware
address.
2619.16. Summary
- Software must translate the protocol address to
an equivalent hardware address before sending a
packet the translation is called address
resolution - Three general methods are used for address
resolution the method used depends on the
underlying hardware - TCP/IP suite contains a standard ARP, which
defines the format of messages and rules for
handling ARP messages.