because IP routing delivers packets over the shortest path to the closest available host. Another advantage is simplified configuration: The client needs to be configured with only a single IP anycast address of the server. Resiliency is another advantage: If one anycast server goes away, routing forwards the message to the next closest one with the same IP anycast address. Finally, anycast provides for load balancing, in which servers distributed over the network topology have the effect of balancing the traffic load for many clients. There are three broad uses for IP anycast. The first use is service discovery, in which IP anycast routes the client's packets to a nearby server, which then redirects the client to a server (possibly itself), which is subsequently accessed using IP uni- cast. The second is query/reply services, in which the entire exchange is done using IP anycast; DNS is a popular recent example. The third use is routing services: IP anycast routes a client's packets to a routing infrastructure (e.g., IP multicast), which then continues to forward the packet by using whatever technology is appropriate. Internet Addressing and Address Resolution IPv4 Addressing The current generation of IP is called IP version 4 (IPv4). IPv4 addresses have two parts: the network ID and the host ID. Under IPv4, which was the only scheme in use until CIDR was introduced around 1995, there are five classes, which support different numbers of networks and hosts (see Figure 8.12): Class A-With Class A, there can be a total of 126 networks, and on each of those networks there can be 16,777,214 hosts. Class A address space is largely exhausted, although ICANN has reserved some Class A address space. Class B-Class B addresses provide for 16,384 networks, each of which can have 65,534 hosts. Class B space is also largely exhausted; some Class B addresses are still available at a very high cost. Class C-Class C allows for 2,097,152 networks, each of which can have 254 hosts. Class D-Class D belongs to a special aspect of th