Will my internet address for my internal site cause my traffic to go external?

3

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?

Toby Allen

Posted 2011-02-27T11:40:37.697

Reputation: 2 634

Answers

4

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.

Majenko

Posted 2011-02-27T11:40:37.697

Reputation: 29 007

3

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.

Olli

Posted 2011-02-27T11:40:37.697

Reputation: 6 704

Easy if you run your own DNS server inside the network... Impossible if it's someone else's DNS server... – Majenko – 2011-02-27T13:35:51.247

1You 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 – 2011-02-27T17:02:13.103