1 / 27

Mapping Internet Addresses to Physical Addresses (ARP)

Mapping Internet Addresses to Physical Addresses (ARP). Chapter 5. Each host has 32-bit address (IP address) Internet uses only assigned addresses for packet sending and receiving Two machines can communicate only if they know each other’s physical address

zamir
Download Presentation

Mapping Internet Addresses to Physical Addresses (ARP)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mapping Internet Addresses to Physical Addresses (ARP) Chapter 5

  2. Each host has 32-bit address (IP address) • Internet uses only assigned addresses for packet sending and receiving • Two machines can communicate only if they know each other’s physical address How does host (or router) map an IP address to a correct physical address??

  3. Address Resolution Problem • Refers to problem of mapping high-level addresses to physical addresses • Suppose two machines A and B are connected to the same physical network A------------------------------------B IAIB PAPB • What if A only has B’s IP address? How does A map this to B’s physical address?

  4. Address mapping must occur at each step along a path as well • In general, two cases: • Case 1: • Last step in delivering a packet • Last computer must map final destination’s internet address to the destination’s physical address • Case 2: • Any point along the path when sending to intermediate router • Sender must map intermediate router’s internet address to a physical address

  5. Two basic types of physical addresses: • proNET • Small, easily configurable physical addresses • Address resolution is easy • Ethernet • Large, fixed physical addresses • Address resolution is hard

  6. Direct Mapping Resolution • Consider a proNET token ring • Uses small integers for physical addresses • Allows user to choose hardware address • Make address resolution easy by making part of the IP & physical address the same • Assign IP addresses with hostid portion equal to 1, 2, 3, … • When installing interface card, select physical address of 1, 2, 3, … • IP 192.5.48.3 get physical address 3

  7. Mapping is easy • Just extract host portion of IP address • Conceptually, select a function f that maps IP addresses to physical addresses • Resolving IP address IAmeans computing PA = f (IA) • Want computation as efficient as possible

  8. Dynamic Binding Resolution • Consider an Ethernet • Each interface has a 48-bit physical address • Interface fails, address changes • 48-bits can’t be encoded into 32-bit IP addresses • Use Address Resolution Protocol (ARP) • Host sends packet requesting intended destination to respond with its physical address • All receive; destination recognizes its IP address and responds

  9. ARP: • allows a host to find the physical address • of a target on the same physical network • given only the target’s IP address • Why not just send the packet? • The request for address is broadcast • Too expensive to broadcast every packet • All machines must process the packet

  10. ARP Cache • Maintain a cache of recently acquired pairs • Keep IP, PhyAddr pairs to reduce comm costs • Looks in cache before sending packet • If have a binding, use it • If not, broadcast an ARP request • Since most communications involve multiple packets, even a small cache helps

  11. Example Address Binding Table

  12. Soft state • Information becomes stale without warning • Example: • Computer A gets binding for computer B • B then crashes • A does not get notified • A continues to send packets to B • Ethernet does not have guaranteed delivery! • No way of knowing ARP cache is wrong

  13. Responsibility for correctness lies with the owner of the information • Use timer to periodically delete old bindings • Typical timeout is 20 minutes (since set) • Information must be removed • Two cases then: • 1) If no more packets, nothing happens • 2) If have more packets, do another ARP broadcast • If destination reachable, will get new binding • If not, sender will know

  14. Advantage of soft state is autonomy • Computer knows to revalidate bindings independent of other computers • Sender does not need communication with anyone to invalidate a binding • No reliance on network hardware for reliable transfer • Disadvantage is delay • Time to detect a crash is potentially as large as the timeout window

  15. Refinements to ARP • Include own binding when send a request • Queried machine updates its ARP cache • All machines can update as well • After a crash, send out an ARP request as part of the booting process

  16. ARP is only one scheme for mapping • Some network technologies don’t need it • Really imposes new address scheme on to of lower-level hardware address mechanism • Think of ARP as part of physical network system (vs part of internet protocols)

  17. ARP Implementation • Divided into two functional parts • Mapping IP address to physical address • Answering requests • Mapping • If have binding in cache, use it • If not, send broadcast • May not get reply (lost or machine down) • Must store outgoing packets • If other programs run, must not generate multiple requests for the same address currently waiting on

  18. When ARP reply arrives • Update ARP cache • Remove packet(s) from queue • May have been packets from other applications • Send

  19. Answering requests • First extract sender’s binding • If cache entry exists, update it • Next, process the packet • If target of request, then answer • If not target, ignore rest of packet

  20. ARP Encapsulation • ARP messages travel in data portion of a frame • Sender assigns special type value in header

  21. ARP Protocol Format • ARP packets do not have fixed format header • Length of fields with addresses depend on the type of network • Header includes fixed fields near beginning • Format is general enough to be used with arbitrary physical addresses and arbitrary protocol addresses

  22. Example ARP message format for Ethernet

  23. Automatic Cache Revalidation • Jitter • Variance in packet transfer times • ARP timer expires; next datagram has extra delay • Automatic revalidation • Use a second (revalidation) timer for each entry • Goes off early; sends ARP request • Can still use ARP cache entry • If station replies, both timers reset • If no reply, act as normal when traditional timer expires

  24. Reverse ARP (RARP) • Operation field can specify Reverse ARP • Allows system to obtain its IP address at startup • Computer can know its hardware address, but perhaps not its IP address (ex.: diskless systems) • When booting, system broadcasts a RARP request • RARP server has to be configured and listening • RARP server sends reply giving requester’s IP address • RARP no longer used • At one time was essential for computers without stable storage (see DHCP, Chap. 22)

  25. Summary • IP addresses are independent of physical addresses • To send packets, must do mapping • Direct mapping • If physical addresses smaller than IP addresses • Dynamic mapping • ARP performs dynamic address resolution

  26. ARP broadcast finds physical addresses • All machines receive ARP broadcast • If IP address matches machine’s, answer request • Replies directed to one machine only (not broadcast) • For efficiency, bindings are cached • Cache helps eliminate many broadcast • Early revalidation can be used to avoid jitter • RARP • Could be used to obtain IP address at startup • Now obsolete

More Related