Click to See Complete Forum and Search --> : Command to display DNS server addresses


Phaete
04-08-2003, 12:00 AM
What's the command to display the DNS server addresses when client IP's are assigned byt the ISP's DHCP server?

ifconfig -all doesn't quite go as far as Windows' ipconfig /all .... is there another command?

homey
04-08-2003, 01:18 AM
There are probably other methods but one tool is nslookup. If you know the name of your ISP domain it helps as you can use the command: nslookup in a teminal window.

Example....

nslookup
> myisp.com

displayed the following

Server: xxx.xxx.xxx.xxx
Address: xxx.xxx.xxx.xxx #53

Type exit to get out of nslookup. The number with #53 is the ISP DNS address.

homey
04-08-2003, 01:40 AM
I'm not sure about other distros but, in Redhat, you can check the file /etc/resolv.conf

bwkaz
04-08-2003, 10:20 AM
Yep, /etc/resolv.conf is the file you're looking for. It's not RH-specific, it's used for anything using a recent-enough version of glibc (recent-enough being at least glibc 2.2, and perhaps earlier glibc versions).