1

In this common case:

ns1.domain.com: IP1
ns2.domain.com: IP2

What I know the two IP addresses used like if one unreachable, the other will use as a secondary choice and user still can access the same server.

  1. I am not really understood how two IP addresses (can be more than two) is useful and making sure network up time 99% because both IPs pointed to the same server (I think both may have same physical network path or am I wrong?) Anyone can explain?

  2. Now I have I am using Rackspace Cloud Server and I maintain a cPanel. Because of limited IP v4 availability, I cannot buy an IP except for HTTPS and load balancing. So currently, I only have one IP assigned to my cPanel server.


Case 1: cPanel has built-in DNS. cPanel user with the domain pointed to this server directly are able to manage the DNS records in the cPanel UI, it will autogenerate CNAME for cpanel., webmail., ftp. subdomain access, but remember since I only have one IP address, my 1st and 2nd nameserver defined in the cPanel WHM pointed to the same IP:

ns1.mycpanelserver.com: IP1
ns2.mycpanelserver.com: IP1

Case 2: However Rackspace has DNS server virtually located just outside from the cloud. If a domain pointed to this DNS, I can manage the records from Rackspace client area and A record can be set to my cPanel server IP address to serve the hosted web site. By this way, I have two IP addresses for their respective nameservers provided which is like the common case, but I don't have the ability to edit the DNS records in cPanel UI and CNAME records must be defined manually each time new domain registered.

I am trying to use the case 2 which is common, but not sure what is the strong reasons why common two IP addresses for two nameservers in one server?

2
  • First, Two IPs means two NIC. Second some sites on a server might use a dedicated IP.
    – AbiusX
    Mar 16, 2011 at 20:15
  • 3
    @AbiusX Two IPs does not require two NICs. It is possible to set servers to use two IPs on the same NIC (to serve multiple subnets) - a feature I discovered accidentally while setting a static IP in Windows Server 2008 Core. Also, if the server (or any other computer) is hosting virtual machines, it can bridge its connection to the virtual machines, creating an additional IP address on the same NIC for each Virtual Machine.
    – TuxRug
    Mar 17, 2011 at 3:10

4 Answers 4

3

I am not quite following your English here, but what I think you are asking is how you should best go about having 2 name servers when you only have 1 IP address and 1 server.

Well, the best thing I can recommend is that you run your primary DNS server om your cPanel server and assign that to ns1.yorudomain.com, and then use a third party to act as a secondary name server and assign them as ns2.yourdomain.com (or ns0 and ns1 whatever numbering scheme you like).

Changes to your primary DNS in cPanel will be passed out to your secondary DNS servers through dns-axfr zone transfers, so you will have full control from within cPanel.

There are a number of sites that provide free secondary DNS hosting, such as:

Or your network provider may be able to act as a secondary DNS for you.

5
  • My cPanel - ns1.mydomain.com: MyCurrentIP, ns2.mydomain.com: xIP. My provider - dns1.stabletransit.com: RackspaceIP1, dns2.stabletransit.com: RackspaceIP2. Do you mean by I can assign xIP with any of RackspaceIP1 or RackspaceIP2?
    – CallMeLaNN
    Mar 16, 2011 at 19:49
  • Only if Rackspace will set themselves up as a backup DNS server.
    – Majenko
    Mar 16, 2011 at 19:50
  • I am not sure what is the backup DNS means but as you said, it seems possible to assign Rackspace DNS server IP address to my 2nd nameserver. Thanks pointing out the DNS server service, seems I can add more than two nameserver and even for free to get the benefit of Case 2 at the same time uses cPanel to manage DNS to take benefit of Case 1. I never notice about the "Changes to your primary DNS in cPanel will be passed out to your secondary DNS servers"
    – CallMeLaNN
    Mar 16, 2011 at 20:21
  • 1
    This may help you understand it better: en.wikipedia.org/wiki/DNS_zone_transfer
    – Majenko
    Mar 16, 2011 at 20:23
  • Even @TuxRug answer my question well, but this is actually the thing I wanted to achieve. Thanks.
    – CallMeLaNN
    Mar 16, 2011 at 20:32
1

The idea is that the two IP addresses for the nameservers are in completely different subnets. That way if a router goes down somewhere or for some other reason a subnet becomes unreachable your server still has a way to perform DNS resolution.

1

Multiple servers can share a single IP address through clustering. That way, multiple servers can be treated as one. If one goes down, the others take the job of the failed server. Also, servers sharing an IP address (through network address translation or clustering) can sometimes see what name was used to connect, so requests to name1 at IP1 can go to serverA, and requests to name2 also at IP2 can go to serverB. This is usually done when a company doesn't have or doesn't want to use enough external IP addresses to give each server an IP.

Also, individual servers can be given different IP addresses for different reasons. Different IP addresses can map to different services the server offers, or to provide load balancing on their network to make sure one part of the network isn't too stressed. This is useful if they need more bandwidth (sometimes incorrectly referred to as speed) than they can get from one internet connection, because they can send some data through different internet connections.

The most common reason for a server to have multiple external IP addresses is in case the internet connection goes down. If the Internet Service Provider the server is connected to goes down or gets unusably slow, the server can switch over to a different connection. This can also help if a cable gets cut or unplugged.

2
  • Really make sense but only ISP is not in my case. As per my IP to location lookup, my provider, Rackspace is also ISP provider, all IP addresses is belong to them and actually they point a single ISP (who is themself) to their server.
    – CallMeLaNN
    Mar 16, 2011 at 20:13
  • Sorry, you and @Matt Jenkins answering my question but I need to choose one, I can only mark one answer as accepted here :)
    – CallMeLaNN
    Mar 16, 2011 at 20:35
0

I use the same IP for both nameservers without any problem. The fact that the VPS (and sites) are on the same IP address anyway really defeats the purpose of having a backup DNS. When NS1 is offline or unreachable, the sites will be down too. It's absolutely pointless to have a second nameserver kick in to point users to a dead or unreachable server.

2
  • I do. I am using cloud with same IP for both nameservers. just want to know why normally using different IP. The site not necessary will be down. practically the provider will put the DNS in separate server. it can be down without the site down. it happened to my ISP which some site unreachable simply cause by the DNS too old and have a problem with syncing the million of records. another thing applying country code TLD in my country require the different IP address. By using the secondary DNS the chance to reach your site is high. But to prevent your web from down, use web farm.
    – CallMeLaNN
    Apr 2, 2011 at 5:02
  • 1
    This is ok for a website where poor performance, DNS timeouts and non-availability are acceptable. In general though it's best not to have DNS resolution performance be potentially impacted by an overloaded web server, and if the server goes down or has planned maintenance, useful to be able to change the resolved IP address to point to a page elsewhere saying why the site is down and when it will be back. Your setup when writing this is where many people start, and I'm wondering if you still operate this way now, 8 years later :)
    – Nick
    Jan 17, 2019 at 12:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .