Linux DHCP information for DNS
This is probably a really stupid question, but I can't seem to find an answer. I would like to know how to view information given to a linux client via DHCP, especially DNS information.
I know you can hard code DNS info in the /etc/resolv.conf file, and you can view the IP via ifconfig, but how do you view what DNS servers your DHCP handed to you, without digging through your dhcp log (/var/lib/dhcpcd/dhcpcd-eth0.info on mine). I'm running SuSE 9.1 on a laptop, using the dhcpcd client. Thank you! |
you'll find it in the same places as a static ip, they just got there from a different means...
route ifconfig etc... i would think that for a one shot you can probably also run your dhcp client in some form of debug mode, as there are a few other things, like ntp servers etc.. that got put away in places you wouldn't expect. |
Just to add to what acid_kewpie said, you'll find it in /etc/resolv.conf -- it just got there by a different means.
|
Thank you for the info...
By the way I found the following command gives me all the information I need: ifstatus eth0 I wasn't aware of the command, and actually found it by accident after I got your responses. Thanks again for your help. |
hi tisource,
do you need to install certain packages to use the ifstatus command? i only get a "command not found " message. i'm on debian sarge btw... thanks! |
I dunno.... I didn't install anything.
I'm running SuSE 9.1. I'm not sure where the ifstatus command comes from.... I believe the command is also available on Mandrake also.... not sure on Red Hat or other distribs. |
All times are GMT -5. The time now is 04:56 PM. |