Is it better (for efficiency) to use an IP address when setting a custom name server for my domain name rather than a domain like ns1.myserver.com?
Asked
Active
Viewed 115 times
1
-
I can't figure out how this question could make sense. In what case do you have to choose between using a domain name or using an IP address? – David Schwartz Mar 13 '12 at 02:28
-
This question is very vague; use IP address where? In general, using an IP address is best for daemons and servers in general. – Mei Mar 13 '12 at 02:29
-
Apologies for the vagueness--my understanding of how this works is limited. I have a domain registered with a company other than where my web site is being hosted, and thus need to point the domain to my web host. – devios1 Mar 13 '12 at 02:40
1 Answers
5
When you specify a name server, you need to provide an NS
record. NS
records always point to a name. See Can the value for a NS record be an IP address?
$ host -t NS serverfault.com
serverfault.com name server ns3.serverfault.com.
serverfault.com name server ns4.serverfault.com.
serverfault.com name server ns1.serverfault.com.
serverfault.com name server ns2.serverfault.com.
Whatever hosts you list as your name servers must also resolve to an IP.
$ host ns3.serverfault.com
ns3.serverfault.com has address 69.59.196.217
Thus, if you're using an interface that is asking you to enter a name server's address, enter a DNS name.
Also, don't sweat the round-trip-time to find that A record -- the referring server also keeps the A
record as "glue". That's why you usually also have to enter the IP address. When looking up the NS
record, we get that additional data as well. With my registrar, I must first define a nameserver's name and IP combination before I can register the nameserver to the domain.
$ dig serverfault.com. @b.gtld-servers.net
; <<>> DiG 9.7.3-P3 <<>> serverfault.com. @b.gtld-servers.net.
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30818
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 3, ADDITIONAL: 3
;; WARNING: recursion requested but not available
;; QUESTION SECTION:
;serverfault.com. IN A
;; AUTHORITY SECTION:
serverfault.com. 172800 IN NS ns1.serverfault.com.
serverfault.com. 172800 IN NS ns2.serverfault.com.
serverfault.com. 172800 IN NS ns3.serverfault.com.
;; ADDITIONAL SECTION:
ns1.serverfault.com. 172800 IN A 64.34.119.33
ns2.serverfault.com. 172800 IN A 64.34.119.34
ns3.serverfault.com. 172800 IN A 69.59.196.217
;; Query time: 151 msec
;; SERVER: 192.33.14.30#53(192.33.14.30)
;; WHEN: Mon Mar 12 22:37:41 2012
;; MSG SIZE rcvd: 135

Jeff Ferland
- 20,547
- 2
- 62
- 85
-
I could have sworn I've been able to add IP addresses into the name server settings for a domain before. Oddly enough my registrar has two apparent ways to set this: one under "name servers" and the other under NS record of DNS. How are these different? – devios1 Mar 13 '12 at 02:37
-
@chaiguy Gave you some updates on glue records... it is very likely that you did have to add addresses when specifying name servers. – Jeff Ferland Mar 13 '12 at 02:43
-