Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Address resolution protocol

14.611 visualizaciones

Publicado el

  • Inicia sesión para ver los comentarios

Address resolution protocol

  1. 1. Address Resolution Protocol - ARP IP over Ethernet 1
  2. 2. Introduction Upper levels of protocol stack (TCP/IP, IPX/SPX, DECNet, etc.) use protocol addresses Network hardware must use hardware/physical/link-level address for eventual delivery Protocol address must be translated into hardware address for delivery 2
  3. 3. Address Resolution Finding hardware address for protocol address is called Address Resolution Data link layer resolves protocol address to hardware address Resolution is local to a network Network component only resolves address for other components on same network 3
  4. 4. Address Resolution(continued)A resolves protocol address for B for protocol messages from anapplication on A sent to an application on BA does not resolve a protocol address for FThrough the internet layer, A delivers to F by routing through R1 andR2A resolves R1 hardware addressNetwork layer on A passes packet containing destination protocoladdress F for delivery to R1 Host A Host C Host E Network 1 Router 1 Network 2 Router 2 Network 3 Host B Host D Host F 4
  5. 5. Address ResolutionTechniquesAssociation between a protocol address and ahardware address is called a binding. Threetechniques: Table lookup - Bindings stored in memory with protocol address as key - data link layer looks up protocol address to find hardware address Closed-form computation - Protocol address based on hardware address - Data link layer derives hardware address from protocol address Dynamic - Network messages used for "just-in- time" resolution - Data link layer sends message requesting hardware address; destination responds 5
  6. 6. Closed-form ComputationIf hardware technology uses small, configurablehardware address, network administrator canchoose hardware address based on IP addressExample - hardware uses one octet address thatcan be configuredSimply choose hardware address to be hostidNow, any host can determine hardware addressas:hardware_address = ip_address & 0xff 6
  7. 7. Dynamic ResolutionUse the network to resolve IP addresses tohardware addressesMessage exchange with other computer(s)returns hardware address to sourceTwo designs: Server-based - computer sends message to a server to resolve the address. Every computer would need: List of servers OR Broadcast to locate servers Distributed - all computers participate; destination provides hardware address to host 7
  8. 8. Address Resolution Protocol -ARP IP uses dynamic distributed resolution technique Address Resolution Protocol (ARP) - part of TCP/IP protocol suite RFC 826 - Address Resolution Protocol Two-part protocol: Request from source asking for hardware address Reply from destination carrying hardware address 8
  9. 9. ARP Message Exchange ARP request message dropped into a hardware frame and broadcast Sender inserts IP address into message and broadcast Every other computer examines request 9
  10. 10. ARP Message Exchange(cont’d) Computer whose IP address is in the request responds Puts its own hardware address in the response Unicasts the response to the sender Original requester can then extract hardware address and send IP packet to destination using recently acquired hardware address 10
  11. 11. ARP Message Format 11
  12. 12. ARP Message ContentsHARDWARE ADDRESS TYPE = 1 forEthernetPROTOCOL ADDRESS TYPE = 0x0800 forIPOPERATION = 1 for request, 2 for responseContains both target and sender mappingsfrom protocol address to hardware addressRequest sets hardware address of target to 0Target can extract hardware address of 12
  13. 13. Sending an ARP Message Sender constructs ARP message ARP message carried as data in hardware frame - encapsulation 13
  14. 14. Processing the ARPMessagesReceiver extracts senders hardware address and updateslocal ARP tableReceiver checks operation - request or response Response: Adds senders address to local cache Sends pending IP packet(s) Request: If receiver is target, forms response Unicasts to senderAdds senders address to local cacheNote: Target likely to respond "soon" Computers have finite storage for ARP cache Only target adds sender to cache; others only update if target already in cache 14
  15. 15. 15
  16. 16. ARP, Bridging and RoutingARP is transparent to bridging, since bridging willpropagate ARP broadcasts like any other Ethernetbroadcast, and will transparently bridge the replies.A router does not propagate Ethernet broadcasts,because the router is a Network Level device, andEthernet is a Data Link Level protocol. Therefore, anInternet host must use its routing protocols to select anappropriate router, that can be reached via EthernetARPs.After ARPing for the IP address of the router, thepacket (targeted at some other Destination Address) istransmitted to the Ethernet address of the16router.
  17. 17. Proxy ARPProxy ARP is a technique that is can be used by routers tohandle traffic between hosts that dont expect to use arouter as described above. Probably the most commoncase of its use would be the gradual subnetting of a largernetwork. Those hosts not yet converted to the new systemwould expect to transmit directly to hosts now placedbehind a router.A router using Proxy ARP recognizes ARP requests forhosts on the "other side" of the router that cant reply forthemselves. The router answers for those addresses withan ARP reply matching the remote IP address with therouters Ethernet address (in essence, a lie). 17
  18. 18. Proxy ARP Use Host A Host B "Old" IP Routing Router IP Subnet Routing and Modified ARP 18
  19. 19. Proxy ARP - ProblemsProxy ARP is best thought of as a temporarytransition mechanism, and its use should not beencouraged as part of a stable solution. There area number of potential problems with its use,including the inability of hosts to fall back onalternate routers if a network component fails, andthe possibility of race conditions and bizarre trafficpatterns if the bridged and routed networksegments are not clearly delineated. 19
  20. 20. Proxy ARP UseWhen host A wants to send an IP datagram to host B, it first has todetermine the physical network address of host B through the use ofthe ARP protocol.As host A cannot differentiate between the physical networks, his IProuting algorithm thinks that host B is on the local physical networkand sends out a broadcast ARP request. Host B doesnt receive thisbroadcast, but router R does. Router R understands subnets, that is, itruns the ``subnet version of the IP routing algorithm and it will be ableto see that the destination of the ARP request (from the target protocoladdress field) is on another physical network. If router Rs routingtables specify that the next hop to that other network is through adifferent physical device, it will reply to the ARP as if it were host B,saying that the network address of host B is that of the router R itself. 20
  21. 21. Proxy ARP UseHost A receives this ARP reply, puts it in hiscache and will send future IP packets for hostB to the router R. The router will forward suchpackets to the correct subnet.The result is transparent subnetting. Normalhosts (such as A and B) dont know aboutsubnetting, so they use the “old” IP routingalgorithm.The routers between subnets have to: Use the “subnet” IP algorithm. Use a modified ARP module, which can reply on behalf of other hosts. 21
  22. 22. Reverse ARP - RARPSometimes, it is also necessary to find out the IP-addressassociated with a given Ethernet address. This happenswhen a diskless machine wants to boot from a server onthe network, which is quite a common situation on localarea networks.A diskless client, however, has virtually no informationabout itself-- except for its Ethernet address! So what itbasically does is broadcast a message containing a pleafor boot servers to tell it its IP-address.Theres another protocol for this, named Reverse AddressResolution Protocol, or RARP. Along with the BOOTPprotocol, it serves to define a procedure for bootstrappingdiskless clients over the network. 22
  23. 23. Reverse ARP - RARP Reverse ARP, document in RFC 903, is a fairly simple bootstrapping protocol that allows a workstation to broadcast using its Ethernet address, and expect a server to reply, telling it its IP address. 23
  24. 24. Inverse ARP Used on point to point links Find IP address of the host on the other end Used in frame relay and ATM Uses codes 8 (request) and 9 (response) Ref: RFC 1293 24
  25. 25. Summary ARP allows converting IP address to MAC addresses Proxy ARP, RARP, Inverse ARP 25