Beruflich Dokumente
Kultur Dokumente
physical addresses.
Systems in the same network must know their physical addresses in order to
communicate with each other.
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
Consider two machines A and B that connect to the same physical network.
The goal is to devise a low-level software that hides physical addresses and allows
higher-level programs to work only with internet addresses.
System A wants to send packets to System B across a physical network to which they
both are attached, but A has only B’s internet addresss, how does A map that address to
B’s physical address.
1) A must map B’s IP address to its physical address.
2) At any point along the path from the source A to the destination B the packet may
be sent to the router. So the sender A must map the intermediate router’s internet
address to a physical address.
The problem of Mapping of high-level IP address to low-level physical addresses is
called as address resolution problem.
This can be solved by 2 ways
1) some protocols suites keeps tables in each machine that contain pairs of high-level
and physical addresses.
2) Others solve the problem by encoding hardware addresses in high-level addresses.
proNET-10 - uses Class C addresses with the host-id portion = 1, 2, ... , 255
Choosing a numbering scheme that makes address resolution efficient means selecting a
function f that maps IP addresses to physical addresses.
PA = f (IA)
In an ATM network one or more computers (servers) store pairs of addresses, where
each pair contains an internet address and the corresponding physical address. Such
servers store the pairs in a table in memory to speed searching. To guarantee efficient
address resolution in such cases, software can use a conventional hash function to
search the table.
When a host wants to resolve IP address IB, it broadcasts a special packet that asks the
host with IP address IB to respond with its physical address PB.
All hosts, including B receive the request, but only host B recognizes its IP address and
sends a reply that contains its physical address.
When A receives the reply, it uses the physical address to send the internet packet
directly to B.
ARP Cache
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.
Broadcasting is expensive on network resources, so an ARP cache of recently
acquired IP-to-Physical address bindings is kept in the cache.
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 Refinement
A includes its IP-to-PA binding when sending B a request. B extracts A’s binding
from the request, saves the binding in its ARP cache, and then sends a reply to A.
A broadcasts its initial request, all machines on the network receives it and can
extract and update A’s IP-to-PA binding in their cache.
When a computer has its host interface replaced, its PA changes, the computer
can notify others of a new address by sending an ARP broadcast when it boots.
ARP implementation
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 message
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.
Determining an Internet Address at startup / Reverse Address
Resolution Protocol (RARP)
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)
RARP requests and response are susceptible to loss, because it uses the physical network
directly, no other protocol software will time the response or retransmit the request,
RARP software must handle these tasks.
RARP is used in LAN like Ethernet, where the probability of failure is low.
If the network has only one RARP server, that machine may not be able to handle the
load, so packets may be dropped.
The main advantage of having several computers function as RARP servers is that it
makes the system more reliable.
If one server is down or too heavily loaded to respond, another answers the request.
The disadvantage of having several RARP servers is that when a machine broadcasts a
RARP request, the network becomes overloaded because all servers attempt to respond.