How do you list your DNS servers? Linux really needs an IPCONFIG command

Asked by LEGOManiac

Once again I find myself missing the IPCONFIG /all command.

This time I was trying to confirm what IP(s) a DHCP server was dishing out for DNS. The windows client next to the Ubuntu client listed everything nicely with ipconfig /all but in Linux? Lets see: the IP, netmask, broadcast address and MAC Address are listed by 'ifconfig'. The default gateway is shown by 'route', but nowhere could I find the DNS servers, confirmation that the IP was being handed out by DHCP, the DHCP server address and the WINS server address.

I got some of it from the GUI, but, for reference sake, if one wanted to compile a reasonably complete state of linux box's network configuration/status/settings from the command line such as is produced in Windows by IPCONFIG /all, what would be the shortest list of commands necessary?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Sam_
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Florian Diesch (diesch) said :
#1

I don't know about IPCONFIG. On Linux DNS servers are configured in /etc/resolv.conf and DHCP leases are stored in /var/lib/dhcp3/dhclient.leases. WINS servers are handled by Samba. but as I don't use it I don't know about the details.

Revision history for this message
VanillaMozilla (vanillamozilla) said :
#2

Try ifconfig.

Revision history for this message
Tom (tom6) said :
#3

Yes in linux we use

ifconfig

stupid Microsquish started using ipconfig instead just to be different and awkward. On the command-line you can get a quick help, cheat sheet on all the tags and how to use them by typing

ifconfig --help

Click the button at the bottom of VanillaMozilla's answer if this has helped because i just copied his/her answer and made it verbose ;)
Good luck and regards from
Tom :)

Revision history for this message
Sam_ (and-sam) said :
#4

In private network the gateway is often identical with DNS.
Compare
route -n
with
nslookup 127.0.0.1 | grep Server

http://www.debianadmin.com/ubuntu-networking-for-basic-and-advanced-users.html

##btw. the usage of 'ifconfig' was already mentioned in the entry post.
Quote: Lets see: the IP, netmask, broadcast address and MAC Address are listed by 'ifconfig'.

Revision history for this message
LEGOManiac (bzflaglegomaniac) said :
#5

The list so far:

IP, Netmask, Broadcast, MAC addresses: ifconfig
Default gateway: route
DNS servers: cat /etc/resolv.conf

Still needed: commands to tell you whether a workstation is using DHCP or a static address?

If a workstation is using DHCP, which commands tell you:

- what DHCP server provided the address info
- what WINS server is it now using

Revision history for this message
Paweł T. Jochym (jochym) said :
#6

All this information is present in the "Connection Info" from the NetworkManager.
Just right-click on the icon and select the connection info entry.

Revision history for this message
LEGOManiac (bzflaglegomaniac) said :
#7

Pawel: I'm sure I've seen this before, but where is NetworkManager? Typing NetworkManager from a command line appears to require root access but preceeding it with sudo, yields neither an window nor an error message.

Over and above the point that I'd still like to be able to find NetworkManager, I've got the "network connection eth0" icon on my upper panel but it doesn't hve a "Connection Info" item in it's contectext menu. The properties item has a support tab that shows some of the information I'm looking for, as I indicated in my question. Yet, I'm almost certain I've seen the menu you were referring to.

Last: If you go back and re-read the original question, you'll note from my last paragraph that I was looking for command-line methods for determining the IP info, much like IPConfig gives in Windows.

Revision history for this message
LEGOManiac (bzflaglegomaniac) said :
#8

Pawel: I'm sure I've seen this before, but where is NetworkManager? Typing NetworkManager from a command line appears to require root access but preceeding it with sudo, yields neither an window nor an error message.

Over and above the point that I'd still like to be able to find NetworkManager, I've got the "network connection eth0" icon on my upper panel but it doesn't hve a "Connection Info" item in it's contectext menu. The properties item has a support tab that shows some of the information I'm looking for, as I indicated in my question. Yet, I'm almost certain I've seen the menu you were referring to.

Last: If you go back and re-read the original question, you'll note from my last paragraph that I was looking for command-line methods for determining the IP info, much like IPConfig gives in Windows.

Revision history for this message
Best Sam_ (and-sam) said :
#9

system administration -> network
https://help.ubuntu.com/community/NetworkManager0.7

via CLI:
network-admin
##no 'sudo' necessary, it's handled via PolicyKit (also in system administration), only unlock.
https://wiki.ubuntu.com/DesktopTeam/Specs/PolicyKitIntegration
https://wiki.ubuntu.com/MainInclusionReportPolicyKit

or:
gnome-nettool

http://packages.ubuntu.com/jaunty/gnome-nettool

Revision history for this message
LEGOManiac (bzflaglegomaniac) said :
#10

Thanks for the link. Now I know where I've seen Network Manager - and now I know it's missing. It's also not in my System->Administration menu. I'll make a separate thread for this.

Revision history for this message
LEGOManiac (bzflaglegomaniac) said :
#11

Thanks for the link. Now I know where I've seen Network Manager - and now I know it's missing. It's also not in my System->Administration menu. I'll make a separate thread for this.

Revision history for this message
Sam_ (and-sam) said :
#12

Glad to see in question #82285 that you've 'found' network manager.
Enjoy Ubuntu.

Revision history for this message
LEGOManiac (bzflaglegomaniac) said :
#13

Thanks Sam, that solved my question.