PDA

View Full Version : Mac Version of IPconfig




pcproff
May 10, 2005, 05:22 PM
I need to find the dns server's ip from my isp. Is there something I can look it up on the mac just like in windows ipconfig /all?

Thanks guys



emw
May 10, 2005, 05:45 PM
You should be able to find that in your Network Preference Pane in System Preferences.

hcuar
May 10, 2005, 05:51 PM
ifconfig


Note the "f" in ifconfig

daveL
May 10, 2005, 05:57 PM
ifconfig


Note the "f" in ifconfig
Since when does "ifconfig" show you the DNS servers' addresses?

Network Preferences doesn't show them either if you pick them up via DHCP. If you set them manually, the OP wouldn't be asking the question, I wouldn't think.

Anyway, in Terminal type "cat /etc/resolv.conf"; the IP addresses of your DNS servers should be listed there.

mkrishnan
May 10, 2005, 06:15 PM
Anyway, in Terminal type "cat /etc/resolv.conf"; the IP addresses of your DNS servers should be listed there.

I was wondering about ifconfig's ability to give you this kind of info too.... but even with the resolv.conf file, I get the router's address as the nameserver, and not the real DNS.

Airport Admin Utility does provide it, in the internet tab. I bet if you're using another router, you can find it in the config pages you get when you point a browser at the router's IP.

Mechcozmo
May 10, 2005, 06:20 PM
ipconfig -getifadder -(address name, either en0 or en1 most of the time)
Gets you your IP address

That's all I know, sorry.

yellow
May 10, 2005, 06:48 PM
What about using nslookup and then using the "server" query?

Or contacting the ISP's technical support?

jeremy.king
May 10, 2005, 07:03 PM
What about using nslookup and then using the "server" query?

Or contacting the ISP's technical support?

+1

nslookup and dig will yeild your primary DNS server IP

yellow
May 10, 2005, 07:12 PM
dig, right.. good call!

yellow% dig -x 17.254.0.91

; <<>> DiG 9.2.2 <<>> -x 17.254.0.91
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2781
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 6, ADDITIONAL: 4

;; QUESTION SECTION:
;91.0.254.17.in-addr.arpa. IN PTR

;; ANSWER SECTION:
91.0.254.17.in-addr.arpa. 86400 IN PTR www.apple.com.

;; AUTHORITY SECTION:
17.in-addr.arpa. 86400 IN NS nserver4.apple.com.
17.in-addr.arpa. 86400 IN NS nserver.asia.apple.com.
17.in-addr.arpa. 86400 IN NS nserver.euro.apple.com.
17.in-addr.arpa. 86400 IN NS nserver.apple.com.
17.in-addr.arpa. 86400 IN NS nserver2.apple.com.
17.in-addr.arpa. 86400 IN NS nserver3.apple.com.

;; ADDITIONAL SECTION:
nserver.apple.com. 408147 IN A 17.254.0.50
nserver2.apple.com. 408147 IN A 17.254.0.59
nserver3.apple.com. 408147 IN A 17.112.144.50
nserver4.apple.com. 408147 IN A 17.112.144.59

;; Query time: 149 msec
;; SERVER: 100.100.100.100#53(100.100.100.100)
;; WHEN: Tue May 10 20:15:03 2005
;; MSG SIZE rcvd: 278


OR

yellow% dig -x 17.254.0.91 | grep SERVER
SERVER: 100.100.100.100#53(100.100.100.100)

daveL
May 10, 2005, 07:14 PM
I was wondering about ifconfig's ability to give you this kind of info too.... but even with the resolv.conf file, I get the router's address as the nameserver, and not the real DNS.

Airport Admin Utility does provide it, in the internet tab. I bet if you're using another router, you can find it in the config pages you get when you point a browser at the router's IP.
I guess it depends on your router. I set the DNS addresses on my router, but they don't show in Network Preferences (DHCP). They are, however, put into /etc/resolv.conf, not the router address. I'm using a Linksys router.

I didn't suggest looking at the router config, since I figured if the OP knew enough to get into the router, he wouldn't be asking the question.

pcproff
May 11, 2005, 04:52 AM
Thanks guys for the responses. Yes, I also have a Linksys Router and yes I can into the interface and assign different local static ip's to my different mac's. example: PB: 192.168.1.100 Mini: 192.168.1.101 G4: 192.168.1.102. Unless I set the network configuration in the wireless card to DHCP I do not connect. I realize I need to add the DNS address to the if I am going to configure it manually. The ISP tech support would not disclose this info (comcast) So all I need to do is get that DNS address while I am connected while in DHCP. Hope you guys got all that lol.

yellow
May 11, 2005, 09:51 AM
The Comcast tech wouldn't give you their DNS server? Unbelievable. Call back. Tell them there are many broadband offerings out there, you're willing to seek other companies if they can't give you something as simple as a DNS server's IP address.

jeremy.king
May 11, 2005, 10:31 AM
Thanks guys for the responses. Yes, I also have a Linksys Router and yes I can into the interface and assign different local static ip's to my different mac's. example: PB: 192.168.1.100 Mini: 192.168.1.101 G4: 192.168.1.102. Unless I set the network configuration in the wireless card to DHCP I do not connect. I realize I need to add the DNS address to the if I am going to configure it manually. The ISP tech support would not disclose this info (comcast) So all I need to do is get that DNS address while I am connected while in DHCP. Hope you guys got all that lol.

Log into your routers admin panel and look at the Status. It gives you the DNS servers it picked up from your modem.

I also use some supposedly public DNS servers at 4.2.2.2 and 4.2.2.3 which are tons faster than RR's.