why need 2 nameserver?

engteng

New member
Joined
Feb 25, 2008
Messages
1
Hi,
I'm currently hosting my own website on a dedicated server with 1 IP address.

However, i noticed that we need 2 nameserver when registering to a web domain (with the registra), eg: ns1.mydomain.com/ns2.mydomain.com.

If i only have 1 IP, is it possible to just register 1 nameserver, ns.mydomain.com? If yes, is there any issue with only 1 nameserver vs 2 ?

Please advise.
 
You need at least two. RFC 2182 states a minimum of three is ideal with no more than 7 total.

Basically, you are supposed to have your NS on different boxes. Having both on the same box isn't exactly correct, although most people do it.
 
Actually, on different networks :). Having them both on the same box? You really can't do that.

You can pretend to do it by using two different nameserver names both pointing to either the same IP# or to two different IP#s on the same box, but either way you've only got one server.

Oh wait ... you can have two different nameservers on the same box ...

You can run one to bind to port 53 and another to bind to a different port (I'm not sure if you can do this without recompiling from patched source). Then you can have firewall rules so that port 53 on the first IP# is forwarded to the first nameserver, and port 53 on the second IP# is forwarded to the second nameserver.

Sounds a bit complex, especially since you don't gain much redundancy by doing it.

(You do get some, as one nameserver could be down while the other is still up.)

Jeff
 
You need 2 nameservers because of redundancy. If one fails you always have a backup. The last thing you want is that someone can't find an SOA server for your domain.

Offcourse there are tricks to run 2 servers on the same box:
- Setting up two BIND installations, each with their own config file and bound to a certain (virtual) IP-address
- Setting up two virtual machines, each with BIND installation
But if that box goes down... you're out of business. Your domain cannot be resolved and visitors might think the domain has gone for good.
 
Back
Top