Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Command to get my ISP's DNS, like ipconfig/all on Win2000

Command to get my ISP's DNS, like ipconfig/all on Win2000
Thread Tools
vereri
Fresh-Faced Recruit
Join Date: Nov 2000
Location: Renton, WA, USA
Status: Offline
Reply With Quote
Jul 4, 2002, 01:32 AM
 
Well, the subject line pretty much says it. My cable ISP uses DHCP, and they are reluctant to reveal their DNS. I need it to set up a static IP on my OS X box on my subnet behind my Linksys router. Of course, I could go into the next room and run ipconfig/all on my Win2000 machine, but then I'd have to get up.

Plugging my router's address into Lookup in the Network Utility app, with Any/All Information selected did return the primary nameserver, but I'm nor sure what utility's for...I was just experimenting. I mean, that might have just been some error information being sent back. Plus, it didn't tell me the secondary DNS, and I want that too.

I browsed my various bin directories, trying commands that looked likely, but no dice.
     
Magicite
Forum Regular
Join Date: Jun 2001
Location: Minneapolis, MN
Status: Offline
Reply With Quote
Jul 4, 2002, 02:48 AM
 
nslookup?
Goats and Monkeys!
magicite.org
     
Mactoid
Grizzled Veteran
Join Date: Sep 2000
Location: Springfield, MA
Status: Offline
Reply With Quote
Jul 4, 2002, 02:48 AM
 
When you run the nslookup program it tells you the name and address of the default name server.
We hope your rules and wisdom choke you / Now we are one in everlasting peace
-- Radiohead, Exit Music (for a film)
     
Camelot
Mac Elite
Join Date: May 1999
Location: San Jose, CA
Status: Offline
Reply With Quote
Jul 4, 2002, 04:13 AM
 
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by vereri:
<strong>Well, the subject line pretty much says it. My cable ISP uses DHCP, and they are reluctant to reveal their DNS. I need it to set up a static IP on my OS X box on my subnet behind my Linksys router. Of course, I could go into the next room and run ipconfig/all on my Win2000 machine, but then I'd have to get up.
</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">Why do you care? You can use *ANY* DNS server - you do not have to use your ISPs DNS server.

For example, try "140.186.123.171" which is ns1.macnn.com
Gods don't kill people - people with Gods kill people.
     
Detrius
Professional Poster
Join Date: Apr 2001
Location: Asheville, NC
Status: Offline
Reply With Quote
Jul 5, 2002, 12:59 AM
 
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by Camelot:
<strong> </font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by vereri:
<strong>Well, the subject line pretty much says it. My cable ISP uses DHCP, and they are reluctant to reveal their DNS. I need it to set up a static IP on my OS X box on my subnet behind my Linksys router. Of course, I could go into the next room and run ipconfig/all on my Win2000 machine, but then I'd have to get up.
</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">Why do you care? You can use *ANY* DNS server - you do not have to use your ISPs DNS server.

For example, try "140.186.123.171" which is ns1.macnn.com</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">Technically, if you use just ANY DNS server, then your internet connection will be slow and unreliable. For example, if you use the above DNS server, then every time you type in a web address, your computer has to send a request all the way out to the macnn server and then the response has to get all the way back before your computer can begin trying to go to the website. For websites with references to several different servers, this can add several seconds to the rendering of the page.

Amazing what minor details like that can change.

Oh, and if macnn ever goes down, so does your ability to surf the web easily.
ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
     
Camelot
Mac Elite
Join Date: May 1999
Location: San Jose, CA
Status: Offline
Reply With Quote
Jul 5, 2002, 03:49 PM
 
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by Detrius:
<strong>Technically, if you use just ANY DNS server, then your internet connection will be slow and unreliable. For example, if you use the above DNS server, then every time you type in a web address, your computer has to send a request all the way out to the macnn server and then the response has to get all the way back before your computer can begin trying to go to the website. For websites with references to several different servers, this can add several seconds to the rendering of the page.

Amazing what minor details like that can change.

Oh, and if macnn ever goes down, so does your ability to surf the web easily.</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">I disagree on the 'slow and unreliable' comment, Detrius.

First, there's no reason why it would be any less reliable. I picked macnn as an example just because it's clearly somewhere we all know. There's no reason why you couldn't pick 17.254.0.50 (nserver.apple.com) or 152.163.159.232 (dns-01.ns.aol.com) if you're concerned about the stability of MacNN's DNS servers (I assume you trust AOL and Apple )

Secondly, there's a reason why you can specify multiple DNS servers in your TCP/IP configuration. Choosing two (or three) different DNS servers overcomes the potential problem of your primary DNS server being offline.

Thirdly, on the slow issue, yes, the FIRST lookup for any hostname will take a few milliseconds longer to lookup if the name server you choose is far away. However, this is mitigated by the fact that DNS responses are cached, so subsequent lookups take (essentially) no time at all, regardless of the DNS server you have setup.

Even if these few milliseconds are important to you, just find a large corporate name server that is close to you (for example, if you're in England, you might use 17.72.133.64 (nserver.euro.apple.com) rather than 17.254.0.50 (nserver.apple.com) - I'm sure you get the idea.)
I would certainly advocate this anyway, since using remote DNS servers can impact content delivery networks such as Akamai, which rely on DNS tricks to route you to a nearby server - if they think you're a user in San Jose because that's where your DNS request comes from but you're really in New York, you wont see as much benefit out of their network.

Finally, if you needed further convincing, what about all the people who use large national ISPs such as AOL, MSN or EarthLink. I don't use any of these, but I wouldn't be surprised to find all AOL users, for example, referring to a DNS server farm in Virginia rather than a local one. In this case, you would get BETTER DNS performance using my suggestion and manually using a local corporation's name server.

FWIW, you can find out exactly how long it takes to resolve DNS from various servers using dig. Try the following:

dig <a href="http://www.macnn.com" target="_blank">www.macnn.com</a> @nserver.apple.com
dig <a href="http://www.macnn.com" target="_blank">www.macnn.com</a> @dns-02.ns.aol.com
dig <a href="http://www.macnn.com" target="_blank">www.macnn.com</a> @ns1.earthlink.net
dig <a href="http://www.macnn.com" target="_blank">www.macnn.com</a> @ns1.macnn.com

and compare the times by looking for the 'Query time' listed near the bottom of the output. To be fair, run it a couple of times and average the results.

In my particular case, ns1.earthlink.net was the fastest, at 35ms, which is actually better than the 80ms returned by my ISP.

Note: you should check the DNS server before relying on it for everyday use. Some DNS servers are configured to not return replies for domains they are not responsible for (Microsoft's DNS servers, for example, won't respond to queries for non-Microsoft domains.

(fixed typo)

<small>[ 07-05-2002, 03:54 PM: Message edited by: Camelot ]</small>
Gods don't kill people - people with Gods kill people.
     
Sword of Orion
Forum Regular
Join Date: Jan 2002
Location: Texas
Status: Offline
Reply With Quote
Jul 5, 2002, 05:21 PM
 
ipfw will log DNS traffic, given the appropriate rules. I'm not on OS X right now, or I'd check to see if I have any rules that would log DNS. I know that in the past, I've seen three DNS servers listed in my log, one right after the other - so I assume that my Mac checked on all the ones that DHCP configured it for...
     
rantweasel
Dedicated MacNNer
Join Date: Oct 2001
Location: Philly
Status: Offline
Reply With Quote
Jul 8, 2002, 02:49 AM
 
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by Camelot:
<strong>Note: you should check the DNS server before relying on it for everyday use. Some DNS servers are configured to not return replies for domains they are not responsible for (Microsoft's DNS servers, for example, won't respond to queries for non-Microsoft domains.</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">Also note:

</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">mwegner@itachi ~&gt;nslookup 4.2.2.4
Server: ns1.dca.net
Address: 204.183.80.2

Name: i-will-not-steal-service.gtei.net
Address: 4.2.2.4</pre><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">Not every DNS server is for public consumption. Ask if it's okay, don't just assume that it's fair to take.
     
Gene Jockey
Mac Elite
Join Date: Mar 2001
Location: Houston, TX
Status: Offline
Reply With Quote
Jul 8, 2002, 10:03 PM
 
Assuming you're just leaving the DNS pane blank in the Network Pref Pane, the DNS servers fetched by DHCP will be listed in /etc/resolv.conf. So if you're looking for a command to see your name server, more /etc/resolv.conf would do the trick.

--J
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 07:01 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,