1. Field of the Invention
The present invention relates to computer networks. More specifically, the present invention relates to a method and an apparatus for detecting a non-compliant router that improperly responds to ARP requests for IPv4 Link-Local addresses.
2. Related Art
In order to participate in an Internet Protocol (IP) network, a network node, such as a computer or a printer, needs to be configured with an IP address. Additionally, in order communicate with another device using IP over Ethernet or similar media, the network node needs the ability to translate an IP address for the device into the corresponding hardware (e.g. Ethernet) address for the device. The Address Resolution Protocol (ARP) solves this translation problem by providing an address-resolution mechanism which determines the hardware address for a given IP address, thereby enabling a network node to participate in an IP network.
IP addresses can be configured either manually by the user, or automatically with the help of another network node, such as a DHCP server. Unfortunately, a DHCP server may not always be available. Furthermore, it is cumbersome to have the user configure an IP address. Therefore, there is a strong need for a configuration mechanism by which a network node can automatically configure an IP address on its own.
IPv4 Link-local addressing (RFC 3927) provides such a configuration mechanism. In IPv4 link-local addressing, a configuration mechanism within a network node randomly picks a “candidate” IP address in a specified link-local address range and sends an ARP request to check whether the candidate link-local IP address is unique within the scope of the link. If the candidate link-local IP address is already in use by another network node, then the configuration mechanism picks another link-local IP address and checks whether that is unique. Once the configuration mechanism finds a unique link-local IP address, the network node uses it to communicate with other nodes in the network.
Unfortunately, some network routers are misconfigured to respond to all ARP requests, including ARP requests for any link-local IP address. If such a router is attached to a local network, it can interfere with the configuration mechanism by responding to ARP requests sent by the configuration mechanism, making it appear as if every single possible address is already in use. This can prevent the configuration mechanism from selecting an IP address.
For example,
Note that if such a router is configured to ignore ARP “probes,” which are sent by a device that is attempting to assign a link-local IP address, the router can still interfere with normal (non-probe) ARP requests, which are sent to determine an Ethernet address associated with an IP address.
For example,
Hence, what is needed is a method and an apparatus for handling the above-described problems encountered while performing ARP requests.
One embodiment of the present invention provides a system that detects a non-compliant router that incorrectly responds to all address-resolution-protocol (ARP) requests, including ARP requests for link-local IP addresses. A router is permitted to respond to ARP requests for a single IPv4 Link-Local address that it has properly claimed for its own legitimate use (for example, under the protocol specified in Network Working Group RFC 2937), but it is not correct for it to answer indiscriminately ARP requests for every IPv4 Link-Local address. Detecting a non-compliant router is accomplished by sending an ARP request asking for an Ethernet address associated with a link-local IP address, wherein the link-local IP address is a reserved link-local IP address, which should not be assigned to any device. If a response is received to the ARP request, the system determines that the response was sent by a non-compliant router that incorrectly responds to all ARP requests, including ARP requests for link-local IP addresses.
In a variation on this embodiment, the reserved link-local IP address is the broadcast address 169.254.255.255 and/or 169.254.0.0.
In a variation on this embodiment, if it is determined that the response is from a non-compliant router, the system places the source address for the non-compliant router on a black list pertaining to the specific IP address range in question (e.g. 169.254/16). The system then ignores subsequent ARP responses pertaining to that address range when they come from source addresses in the black list, so that subsequent incorrect ARP responses from the non-compliant router will be ignored.
In a variation on this embodiment, the ARP request is an ARP probe, which is sent by a requesting device that is in the process of assigning itself a link-local IP address.
In a further variation, prior to sending the ARP request, the requesting device selects a candidate link-local IP address, and sends an initial ARP probe for the candidate link-local IP address. Only if a response is received to the initial ARP probe does the requesting device send the ARP probe (with the reserved link-local IP address) to determine if a non-compliant router may have responded to the initial ARP probe.
In a variation on this embodiment, if the ARP probe with the reserved link-local IP address is not responded to, the requesting device assigns the candidate link-local IP address.
In a variation on this embodiment, the ARP request is a normal ARP request (not an ARP probe). If no response is received to the ARP request, or if a response is received from a non-compliant router and the source address for the non-compliant router is placed on a black list, the system then sends a subsequent ARP request for a valid link-local IP address to determine an Ethernet address associated with the valid link-local IP address.
The following description is presented to enable any person skilled in the art to make and use the invention, and is provided in the context of a particular application and its requirements. Various modifications to the disclosed embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the present invention. Thus, the present invention is not limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
The data structures and code described in this detailed description are typically stored on a computer-readable storage medium, which may be any device or medium that can store code and/or data for use by a computer system. This includes, but is not limited to, magnetic and optical storage devices, such as disk drives, magnetic tape, CDs (compact discs) and DVDs (digital versatile discs or digital video discs).
Networked Computer System
Router 304 is a device that couples local network 306 to a network 302, such as the Internet. However, in this system, router 304 is a “non-compliant” router that can potentially interfere with ARP requests performed by computer 308. For example, router 304 can interfere with ARP probes performed during the process assigning a link-local IP address, or with ARP requests performed to identify an Ethernet address associated with an IP address, such as an IP address for Ethernet device 310.
This interference can be handled as is described below with reference to
Process of Assigning an IP Address
If there is no response to the initial ARP probe, the candidate IP address is not assigned to any device. In this case, the system assigns the candidate IP address, typically to one of its interfaces (step 416). At this point, the process of assigning the IP address is complete.
If there is a response, the node A performs a second ARP probe for a reserved link-local IP address, which should not be assigned to any device, such as the broadcast address 169.254.255.255 and/or 169.254.0.0 (step 408). If there is no response to this second ARP probe, the system infers that no router is responding to ARP requests for link-local IP addresses. Hence, the response to the initial ARP probe validly indicates that the candidate IP address is already assigned to another device. In this case, the system selects a new candidate IP address (step 412) and returns to step 404 to probe for the new candidate IP address.
On the other hand, if there was a response to the second ARP probe in step 410, the system infers that a router is incorrectly responding to link-local IP addresses. In this case, the system blacklists the source address of the response so that subsequent responses from the source address will be ignored (step 416). The system then returns to step 404 to probe for the candidate address again.
Note that an ARP probe (which is used to test a candidate IP address) can be differentiated for a normal ARP request because the source address of an ARP probe is all zeros. Hence, it is possible that a router might be correctly configured to not respond to ARP probes, yet still incorrectly respond to normal ARP requests. In this case, the router will not interfere with ARP probes during the process of assigning IP addresses, but may instead interfere with normal ARP requests, in which a node seeks to determine an Ethernet address associated with a valid link-local IP address. This problem can be handled by the process described below with reference to
Process of Performing an ARP Request
On the other hand, if at step 504 the system determines that this will be the first link-local ARP on the interface, or that it is time to re-check this interface, the system first tests to see if there is a router indiscriminately responding to ARP requests on the network associated with the interface. This involves sending an initial ARP request on the network, for an address which should not be assigned to any node (as is described above) (step 506). The system then waits for a response (step 508). If there is no response, the system infers that no router is indiscriminately responding to the link-local ARP requests on the network. In this case, the system ARPs for the desired IP address as usual (step 512).
On the other hand, if there is a response to the ARP request, the system infers that a router is indiscriminately responding to link-local IP addresses. In this case, the system blacklists the source address of the response so that subsequent responses from that source address will be ignored (step 510) when they pertain to link-local IP addresses. The system then proceeds to step 512 and ARPs for the desired IP address as usual.
The foregoing descriptions of embodiments of the present invention have been presented only for purposes of illustration and description. They are not intended to be exhaustive or to limit the present invention to the forms disclosed. Accordingly, many modifications and variations will be apparent to practitioners skilled in the art. Additionally, the above disclosure is not intended to limit the present invention. The scope of the present invention is defined by the appended claims.
This application is a continuation of, and hereby claims priority under 35 U.S.C. §120 to a parent application, U.S. patent application Ser. No. 11/098,135, entitled “Method and Apparatus for Detecting a Router that Improperly Responds to ARP Requests,” by the same inventors as the instant application, and filed on 4 Apr. 2005 now U.S. Pat. No. 7,436,783.
Number | Name | Date | Kind |
---|---|---|---|
5708654 | Arndt et al. | Jan 1998 | A |
5724510 | Arndt et al. | Mar 1998 | A |
7200649 | Batke et al. | Apr 2007 | B1 |
20060062187 | Rune | Mar 2006 | A1 |
20060088037 | Finley et al. | Apr 2006 | A1 |
20060126614 | Logan | Jun 2006 | A1 |
20060190599 | Goodman et al. | Aug 2006 | A1 |
20060200580 | Wool | Sep 2006 | A1 |
20060224704 | Parikh et al. | Oct 2006 | A1 |
Number | Date | Country | |
---|---|---|---|
20080298257 A1 | Dec 2008 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 11098135 | Apr 2005 | US |
Child | 12190956 | US |