Title: Ch 17 - Binding Protocol Addresses
1Ch 17 - Binding Protocol Addresses
- Address translation
- Address resolution
- Address resolution techniques
- Table lookup
- Closed-form computation
- Dynamic resolution techniques
- ARP messages
- RARP messages
-
2Protocol Addresses Packet Delivery
- Application layers use protocol addresses (IP)
for hosts routers - IP addresses are maintained by software (virtual)
- "Virtual network" addressing scheme hides
hardware details - Network hardware uses Physical (hardware)
addresses for eventual delivery - Therefore, protocol address must be translated
into hardware address for delivery
3Address Translation
- Upper layers use only protocol addresses (IP)
- Upper layer hands down protocol address of
destination to data link layer - Data link layer translates it into hardware
address for use by hardware layer - Finding a hardware address (MAC) for any protocol
address (IP) - Data link layer resolves protocol address to
hardware address - Resolution is local to a network
- Network component resolves address for other
components on the same network only
4Address Resolution Techniques
- Binding is the association between the IP address
and the hardware (Physical) address - Address resolution is local to a network
- TCP/IP uses three techniques to find a Physical
address from IP Address depending on the hardware
technologies - 1. Table lookup bindings stored in table with
protocol address as key used in WAN - Data link layer looks up protocol address to find
hardware address
5Address Resolution Techniques
- 2. Closed-form computation hardware address can
be calculated from protocol address using basic
logic arithmetic operations used in
Configurable networks - 3. Message exchange hosts exchange messages
across a network to resolve address when needed
used in LAN - Data link layer sends message requesting hardware
address destination responds with its hardware
address - Which algorithm should be used? Depends on the
protocol and hardware addressing schemes.
6Address Resolution with Table Lookup
- Use an array of 2 entries IP addresses and
hardware addresses (P, H) for each host on the
net - Use protocol address (IP) to extract
corresponding hardware address (H)
7Table Lookup (contd)
- Sequential (Direct) search is suitable for a
small net (O(n2)) - Advantages easy to implement and can be used for
an arbitrary set of computers - Disadvantage large computation time for large
networks - Indexing or hashing is efficient for large nets
(O(n)) - use host-id part of IP address as an index
8Closed-form Computation
- Used for small configurable hardware addresses
- Network administrator can choose hardware
address based on the IP address - Example hardware uses one octet address that can
be configured - For IP address 198.109.25.23 use 23 as hardware
address - Simply choose hardware address to be hostid to
make translation trivial - Now, any host can determine hardware address as
- hardware_address ip_address AND 000f
- It is often used with configurable networks
- Easy to program
- Computational efficient
- There is no need to maintain a table
9Message Exchange (ARP)
- Any computer that needs to find HW address sends
a message across the network and waits for a
reply - Two approaches
- Server-based (centralized) computer sends
message to ARP server to resolve address
serveranswers all address resolution inquires - Advantages centralization, easy to configure,
manage and maintain on non-broadcast media (e.g.,
ATM) - Disadvantages availability and reliability
- Distributed all computers participate
destination provides hardware address to host - Advantages no ARP servers required, no
administration - Disadvantages could increase network traffic
10Dynamic Resolution Techniques
- Table lookup (T)
- Closed-form computation (C)
- Dynamic message exchange (D)
11Address Resolution Protocol (ARP)
- IP uses distributed resolution technique
- ARP is part of TCP/IP protocol suite
- Two types of messages
- Request contains an IP address and requests a
hardware address for this IP Address - An ARP request is broadcast to all computers
- Reply from destination carrying both the IP
address and the requested hardware address. - An ARP response is sent as a reply only to the
requesting computer
12ARP Message Exchange
- ARP request message dropped into hardware frame
and broadcast - Uses separate protocol type in hardware frame
(Ethernet 806) - Sender inserts IP address into message and
broadcast - Every computer examines the request
- Computer whose IP address is in request responds
- Puts hardware address in response
- Unicasts to sender
- Original requester can then extract hardware
address and send IP packet to destination
13ARP Message Delivery Example
- A computer broadcast a request
- What is the HW address of 198.109.25.23?
- The computer whose address is 198.109.25.23 will
reply with - the HW address for 198.109.25.23 is
11.51.AA.33.55.66 -
14ARP Message Format
- Maps IP address to hardware address
- Both protocol address and hardware address sizes
are variable depending on the technology - Ethernet 6 octets (48 bits).
- IP 4 octets (32 bits)
- Can be used for other protocols and hardware
types
15ARP Message Format
- ARP messages are sent directly to MAC layer
- The ARP standard describes a general form for ARP
messages - H/W ADDRESS TYPE 1 for Ethernet
- PROTOCOL ADDRESS TYPE 0x0800 for IP
- OPERATION 1 for request, 2 for response
- Contains both target and sender mappings from
protocol address to hardware address - Request sets hardware address of target to 0
- Target can extract hardware address of sender
(saving an ARP request) - Target exchanges sender/target in response
16ARP Message Format
- (6bytes)
- Properties
- Hardware address fields are not fixed
- A fixed field specifies the size of the hardware
addresses - Most often used to bind a 32-bit IP address to a
48-bit hardware address
.. (4 bytes)
..
17Sending an ARP Message
- Sender constructs ARP message into HW frame
- ARP message carried as data in hardware frame -
encapsulation
ARP MESSAGE
FRAME DATA AREA (What is the addr. of..)
FRAME HEADER
CRC
18Identifying ARP Frames
- How does a computer know if the frame is ARP?
- Uses separate frame type for Ex. Ethernet uses
type 0x0806 to indicate - Operation field used to indicate incoming message
as Request or Response
19Caching ARP Responses
- Problem sending multiple ARP requests is not
efficient for networks i.e. use ARP for each IP
packet which adds two packets of overhead for
each IP packet - Solution uses locality of reference concept and
caches ARP responses in a ARP table in memory - New entry replaces old entry when the table is
out of space - Oldest entry is removed if it has not been
updated for a "long" time (gt20 Min) - Cache searched prior to sending ARP request
- If binding is in cache, ARP will use it
- Otherwise
- ARP broadcasts a request
- waits for a response
- Updates the cache and then proceeds to use the
binding
20Processing ARP Messages
- When ARP protocol arrives, the Receiver
- Extracts sender's hardware address and updates
its local ARP table - Examines operation field request or response ?
- Response
- Adds sender's address to local cache
- Sends pending IP packet(s)
- Request
- If receiver is target, forms response
- Unicasts to sender
- Adds sender's address to local cache
- Saving to local Cache is important
- Computer Communication involves 2-way traffic
- Computer memory to store bindings is limited
21Layering and Address Resolution
- IP addresses and ARP used to hide the details of
physical addressing and allows generality in
upper layers - ARP is accomplished in the network interface
layer
Applications
I P Addresses Used
Higher Layers of Protocol Software
Protocol Address Boundary
Address Resolution Device Driver
Hardware Addresses Used
Network Hardware
22Reverse Address Resolution Protocol (RARP)
- RARP-request is used by diskless computer to
find its own IP address (broadcast Dst. is all
1s) - What is the IP address for this HW address?
- RARP-SERVER will process this request and reply
with - The IP address for this HW address is ..
- RARP-SERVERS have Cache table which includes both
addresses
23Other ARP
- Proxy RARP A router may act as a proxy for many
IP addresses - Inverse ARP
- find an IP address of a computer on the opposite
end of a hardware connection - Used for ATM and Frame Relay
24Summary
- Address resolution translates IP address to
hardware address which can be done by - Table lookup (static) which is often used for WAN
- Closed form computation which is used with
config. net to extract HW address from IP address
- Message exchange (Dynamic) uses network messages
to resolve protocol address - TCP/IP protocol uses ARP for address resolution
to find the physical address of an IP address - RARP-request is used by diskless computer to
find its own IP address