Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If I have two domains pointing to the same machine, but one resolves to an internal address and the other to my internet facing router, will there be any differnce in route taken to my machine (primarily in terms of performanc).

eg.

internal.mydomain.com resolves to 192.168.1.200 
external.mydomain.com resolves to A.Web.External.IP

both eventually resolve back to the same machine. For a client in the network, will using the external address give a performance penalty?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

Yes, but only slight. The traffic will have to first go to the router, where it will be forwarded on to the machine. If there is a massive amount of traffic and the router isn't man enough for the job you may notice some slowdown.

share|improve this answer

As @Matt already noted, yes, there is slight slowdown. However, there is also solution for that: split DNS. In split-horizon DNS you answer with different records depending on where request comes from. Example configuration for bind9:

view "trusted" {
 match-clients { 192.168.1.0/24; }; // our network
 recursion yes;
 // other view statements as required
 zone "mydomain.com" {
  type master;
  // private zone file including local hosts
  file "internal/master.mydomain.com";
 };
 // add required zones
};
view "badguys" {
 match-clients {"any"; }; // all other hosts
 // recursion not supported
 recursion no;
 // other view statements as required
 zone "mydomain.com" {
  type master;
  // public only hosts
  file "external/master.mydomain.com";
 };
// add required zones
};

(Source)

That way bind will serve internal/master.mydomain.com to requests coming from your LAN and external/master.mydomain.com for requests coming from internet. Advantage is that you can use same addresses from both networks, but LAN traffic is not going through your router.

share|improve this answer
    
Easy if you run your own DNS server inside the network... Impossible if it's someone else's DNS server... –  Majenko Feb 27 '11 at 13:35
1  
You can also provide your own caching DNS server(s) to provide split DNS functionality if the external server is not on your network. I user dnsmasq to do so. –  BillThor Feb 27 '11 at 17:02

Your Answer

 
discard

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.