LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Linux DHCP information for DNS (https://www.linuxquestions.org/questions/linux-networking-3/linux-dhcp-information-for-dns-248504/)

tisource 10-28-2004 04:36 PM

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!

acid_kewpie 10-28-2004 04:54 PM

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.

baz2 10-29-2004 08:14 AM

Just to add to what acid_kewpie said, you'll find it in /etc/resolv.conf -- it just got there by a different means.

tisource 10-30-2004 08:22 PM

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.

dreambrother 10-31-2004 01:30 PM

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!

tisource 10-31-2004 06:47 PM

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.