1 / 36

ARP

ARP. Based on Computer Networks and Internets (Comer). Hidden but still present. Just when you thought it was safe to forget about the Data Link Layer …

lester
Download Presentation

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. ARP Based on Computer Networks and Internets (Comer)

  2. Hidden but still present • Just when you thought it was safe to forget about the Data Link Layer … • The IP Layer may hide the information of the Network Interface Layer (equivalent of Data Link Layer in OSI) from the above lying layers, but that information while hidden is still there and is necessary. • The software is useless unless it is acting on the hardware underneath.

  3. The final header • One should not forget that as a packet passes through a protocol stack, each layer adds a header to the packet. • The header added by Layer 2 includes a physical address. • Somehow a packet must obtain the hardware address of its destination • All communications require Layer 2 to Layer 2 to Layer 2, etc. (each Layer 2 hop has a unique hardware address)

  4. Translation • So eventually there must be a translation from the IP (software) address to the physical address. • The physical address is also known as • The hardware address • The MAC (Media Access Control) address • The DLC (Data Link Control) address • The DLC identifier

  5. The problem • The problem: given an IP address, what is the corresponding MAC address? • Finding the address is known as “resolving” or “resolution.” • One gives the packet a hardware address, so that it will be taken in by the right computer. • If the target computer is not on the same network, then it is the router’s NIC (gateway’s NIC) that takes in the packet and so that is the hardware address assigned. • A hardware address is never resolved beyond the network it is on.

  6. Solutions to finding MAC addresses • Look it up in a table. • Calculate it. • Send out a request packet (exchange messages).

  7. Table • Computers can have a table containing pairs of associated IP addresses and MAC addresses. • Tables can be dynamic (determined on the fly) or static (hand-coded).

  8. Fig. 19.2

  9. Closed Form Calculation • In general IP addresses are logically assigned and hardware addresses are not. • However, if the hardware addresses are configurable, then the hardware address and IP address can be simply related. • For instance, the hardware address and node portion of the IP address could be made the same.

  10. Exchanging messages • The previous two approaches were local (at least once the table is made). • In the third approach, the computer sends out a message requesting the MAC address that corresponds to a particular IP address. • But to whom is the request made?

  11. AR Server or broadcast • Some networks have an AR (address resolution) server, a machine dedicated (at least in part) to answering these address resolution questions. • If there is no AR server, the request is broadcast to all computers on the network and the one with a matching IP address replies with a packet containing its MAC address.

  12. Address Resolution Protocol • Address Resolution Protocol (ARP) is a set of rules governing the translation of IP addresses into physical addresses. • ARP is part of the TCP/IP suite • The protocol specifies a packet allowing for • A request: has known IP, seeks MAC • A response: fills in MAC Not to be confused with AARP

  13. ARP Cache • Before issuing an ARP request packet, the computer will see if it has the information locally. • A table, known as the ARP cache, holds IP/MAC address pairs that the computer has recently used. • The table is refreshed roughly every 20 minutes (??) in case an IP address is reassigned

  14. How ARP Works • A computer has a message to send, it knows the IP but not the MAC address. • That computer may be the original source of the message. • Or that computer may be the local network’s router if the message originated on another network. • The computer first checks the ARP cache. If there is a “cache hit,” the Network Interface Layer (Data Link Layer) will add the appropriate header with the physical address found. Now the message is “complete” – ready to be placed on the physical network.

  15. An ARP Request • If there is a “cache miss,” ARP broadcasts a special request packet (containing the IP address to be resolved) to all nodes on the local network. • If a host recognizes the IP address as its own, then it returns a reply which supplies the physical address (which is then cached). • If the destination is not on the local network, a gateway will respond instead. • The message can not be sent until the address is resolved.

  16. Request is broadcast Response is unicast

  17. Flexibility of the protocol • ARP was designed to be flexible. • It has parameters determining the length of the IP address, so it can accommodate IP(v4) and IP(v6). • It has parameters determining the length of the physical address. • The protocol varies from LAN protocol to LAN protocol. • There are separate ARP Requests for Comments (RFC) for Ethernet, ATM, Fiber Distributed-Data Interface, etc.

  18. When a request arrives • Upon receiving an ARP request a computer • Caches the MAC/IP address pair into its ARP table • Adding it if it is new • Updating it if it is old • Compares the target IP address to its own • If it does not match, do nothing more • If it does match, prepare a response packet

  19. Fig. 19.6

  20. Example with IP(v4) and Ethernet Determines the type of LAN: 1 for Ethernet

  21. Example with IP(v4) and Ethernet Determines software protocol: usually IP

  22. Example with IP(v4) and Ethernet Determines length of hardware address: 6 octets for Ethernet

  23. Example with IP(v4) and Ethernet Determines length of protocol address: 4 octets for IP(v4)

  24. Example with IP(v4) and Ethernet Determines operation: request, response, etc.

  25. Example with IP(v4) and Ethernet Hardware address of source

  26. Example with IP(v4) and Ethernet Protocol (IP) address of source

  27. Example with IP(v4) and Ethernet Hardware address of destination (not known in a request)

  28. Example with IP(v4) and Ethernet Protocol (IP) address of destination

  29. RARP • Reverse Address Resolution Protocol (RARP) is when the physical address is known but the IP address is not known. • When booting “diskless workstations” know only their MAC address and not their IP addresses. • They must discover their IP addresses from an external source, usually a RARP server. • The network administrator creates a table of MAC/IP address pairs.

  30. Diskless workstation • A workstation or PC on a LAN that does not have its own hard drive. • Instead, it puts files on a network file server. They can reduce the cost of a LAN since one large-capacity disk drive is usually cheaper than several low-capacity drives. • Also they can simplify backups and security because all files are on the file server. • A disadvantage is that they are useless if the network fails.

  31. What’s my address? • When a diskless workstation is booted, its RARP client program requests that the RARP server send it its IP address. • Provided the entry is in the RARP server’s table, it sends it to the diskless workstation in a RARP response.

  32. arp (at home, not a network) options

  33. arp (at work in one of the labs, after pinging a few other computers)

  34. Inverse ARP • Recall that in connection-oriented schemes one works not with the destination address but with the virtual circuit (channel) identifier (VCI). • Inverse ARP (InARP) translates an IP address into a VCI.

  35. Other References • http://www.webopedia.com • http://www.whatis.com • http://www.hill.com/library/publications/tcpip.shtml

More Related