Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

One website I often visit have a configuration that if you are from a specific ISP you would go to a specific IP that is from that ISP, so the connection would be the best for users from different ISP. I heard that this could only be done on DNS, but exactly how is something I wan to know.

share|improve this question

Bind has views, which allows you to serve different answers to different people based on their IP address. I'm sure other DNS servers have similar features. For example, PowerDNS has a GeoIP backend that might be suitable.

If you are large enough to have your own PI address space, I believe you can use BGP to advertise the same range from two different networks, and clients would use the one nearest to them. I can imagine that clients would get upset if routes changed to the other site and you used server side state. You'd also have consistency issues to deal with.

If you're physically close enough to that ISP, you could ask to peer with them, so users from that ISP would have a dedicated network connection to use.

share|improve this answer
+1 for bind views. – Manuel Faux Jul 26 '09 at 10:48

What do you want to do?

If you want to spread the requests to your website one solution could be Anycast. By this every client will connect to a different server, which may be used for load balancing. Another solution would be DNS round robin.

If you want to offer different mirrors which are located in different countries to offer your clients more speed, I don't think there is a solution concerning DNS. You will have to choose a mirror server on one of your main servers, which are resolved by DNS, based on the client's IP address. You can then redirect your client from that main server to the chosen mirror.

share|improve this answer
+1 for everything else after the Anycast reference. That part i think is too custom and not in use for regular HTTP/TCP communications. – nik Jul 26 '09 at 10:23
-1: Anycast is the exact opposite of every client resolving a different IP. Anycast works at the IP level; every client connects to the same IP, which is advertised from multiple locations. Users will connect to the 'closest' (from a network toplogy point of view) instance of a service, while still only having one DNS record for it. – Murali Suriar Jul 26 '09 at 18:18
You're right, anycast is wrong, because he wants to choose one of more IP addresses; but it's a possible solution for load balancing. – Manuel Faux Jul 26 '09 at 20:00
That's not quite what I meant. "By this every client will resolve a different IP." This is not true - with anycast, every client connects to the same IP, but that IP is advertised from multiple locations. It would in fact be a valid solution for this problem, as anycast would let users connect to whichever instance of the service was closest to their ISP. However, there are constraints; the OP will need provider independent address space, and will most likely have to advertise /24 netblocks, as most ISPs won't accept /32 routes via BGP. – Murali Suriar Jul 26 '09 at 21:24
Thnk's for that hint, I've corrected the anycast part. – Manuel Faux Jul 26 '09 at 21:57

There are domain lookup based techniques used by many multi-national organizations for the purpose of load balance and sometimes region/language specific support.

  • Google has country specific TLDs while others use different methods depending on how their service provision works (who is running the service, how much would they like to invest in maintaining and managing the service, etc).

If you see a redirect to a TLD or domain prefix that is is region specific, a domain based divert was made for you. A TLD based divert is likely to be uniquely registered for each country where-as, a prefix based divert (say, is more likely diverted internally by the company owned assets.

If the resolved IP address changes with the redirect, you are looking at a domain based 'balance' across the company servers.

To find where you are coming from -- there are various ways, one quick way:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.