LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to display DNS, etc? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-display-dns-etc-257844/)

Steerpike 11-22-2004 01:09 AM

how to display DNS, etc?
 
I'm trying to troubleshoot my wireless network configuration, having downloaded and installed the ndiswrapper for my Dell TrueMobile 1400 built-in wireless card. I'm posting this from the linux laptop wirelessly, so I've made good progress but it's not yet consistently working after a reboot.

Anyway, I'm still troubleshooting this, but it would be great if I knew how to query what my current DNS, default gateway, etc settings are for the wlan0 interface. I've already figured out ifconfig, iwconfig, etc but these only seem to show me the dhcp-assigned ip and netmask, not gateway, dns servers, etc. Googling around, there are thousands of posts telling me how to setup my linux box as a dns server, but I don't want that - just to know what my current remote servers are.

In windows, I simply typed 'ipconfig /all' and got the answer. I'm sure this is going to be an easy one, but I can't find it!

And if anyone happens to know, which of the seemingly many config files is being read when the wlan0 device starts up? I see several, and I've ended up putting entries (ESSID, encyrption, etc) in many of them while troubleshooting, so I"m not sure which ones 'matter'.

Thanks!

nixcraft 11-22-2004 01:32 AM

Here are tools

ALL ARE RH/RHEL/FC specific

more /etc/resolve.conf : To see/setup nameserver of ISP

ifconfig : To see all network interface info.

hostname : To get hostname

more /etc/sysconfig/network : To setup hostname and
networking can enabled or disabled.

dnsdomainname : List or setup domainname.

more /etc/hosts :Make sure at least localhost entry do exist.

route or netstat –rn : To print routing table

host www.yahoo.com : To see if dns works or not
or
nslookup


Hope this helps

Steerpike 11-22-2004 02:11 AM

Quote:

Originally posted by nixcraft
[B]Here are tools

ALL ARE RH/RHEL/FC specific
I'm running suse 9.2, but let's see what we get ... ;)

Quote:

more /etc/resolve.conf : To see/setup nameserver of ISP
tried that, but file does not exist - which surprises me.

Quote:

...
more /etc/sysconfig/network : To setup hostname and
networking can enabled or disabled.
on my system, /etc/sysconfig/network is a directory. listing as follows:
Code:

linux:~ # ls /etc/sysconfig/network
.      dhcp      ifcfg-eth-id-00:0d:56:de:de:02  ifcfg-wlan0~    providers  update-log.debug
..      if-down.d  ifcfg-lo                        ifcfg.template  scripts    wireless
config  if-up.d    ifcfg-wlan0                    ifroute-lo      update-log

Quote:

route or netstat –rn : To print routing table
This one gave me the gateway information, which was good!

Quote:

host www.yahoo.com : To see if dns works or not
or
nslookup
nslookup was somewhat helpful;
Code:

# nslookup
> yahoo.com
Server:        216.148.227.68
...

I recognize this 'server' address as my ISP's dns, so this is giving me what I need.

I presume there is a simpler way, though!

Quote:

Hope this helps
Thanks a lot!

nixcraft 11-22-2004 10:23 AM

Sorry buddy file is /etc/resolv.conf and not the /etc/resolve.conf (typo)

If /etc/resolv.conf does not exist create one as follows
vi /etc/resolv.conf
search mydomain.com
nameserver IP-ISP-NS1
nameserver IP-ISP-NS2


Most of the tools should work on Suse 9.x also


All times are GMT -5. The time now is 06:12 PM.