LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   What files are associated with DHCP (ubuntu) (http://www.linuxquestions.org/questions/linux-networking-3/what-files-are-associated-with-dhcp-ubuntu-915628/)

5883 11-26-2011 08:45 AM

What files are associated with DHCP (ubuntu)
 
I got a rootfs built manually (basically copying files instead of debootstrap) for UML.
Static ip works, but when i try to use DHCP ip, no ip address acquired.

So what files should i manually copy over to set up DHCP ?
guess i need /etc/dhcp3, /etc/network

what else pls ?

---------- Post added 11-26-11 at 09:45 AM ----------

/etc/dhclient.conf r,
/usr/share/synce-hal/dhclient.conf r,
./apparmor/init/network-interface-security/sbin.dhclient3
# This is a sample configuration file for dhclient. See dhclient.conf's
./dhcp3/dhclient.conf
grep: ./blkid.tab: No such file or directory
/etc/dhclient.conf r,
/usr/share/synce-hal/dhclient.conf r,
./apparmor.d/sbin.dhclient3

what are these apparmor files pls ?

theNbomr 11-27-2011 12:09 PM

It isn't clear whether you're trying to set up a dhcp server, dhcp client, or both. On the server host, monitor /var/log/messages, using 'tail -f'. See if the requests from dhcp clients are arriving. You can exercise the server by running the program 'dhclient', on the client. Do you believe you already have a working dhcp server on your LAN?

'apparmor' is some kind of system hardening scheme used by Suse, maybe others.

It is hard to guide you, as there isn't really a completely standard system for configuration of dhcp clients. I suggest using ISC dhcp, and follow the guidelines in their documentation pages. In systems where ISC DHCP is installed by package installers, there is usually a static component in the /sbin tree, including at least the dhclient binary, and a script that gets called by dhclient whenever it executes. In the /etc tree, there is a system of scripts that are called under different conditions related to the state of a dhclient transaction with the server. Often, there is a script there with a variable 'DEBUG', which you can edit to be 'True', and thus cause some log files to be left behind for inspection. This can probably be found in a directory tree with the words 'enter-hooks' &/or 'exit-hooks' in the directory name.

If it is your intention to simply copy files from some existing host, it would be helpful to describe the nature of that host OS.

--- rod.

5883 11-27-2011 04:08 PM

Thanks for the reply 1st. I'll read it through.

My case is like this, we need a ubuntu UML.
So we made the UML rootfs by copying files (/etc, /sbin, ...) from a ubuntu desktop.
This should be the dhcp client i guess. The desktop can get dhcp ip from server successfully.
(debootstrap didn't work well from some reason.)



Quote:

Originally Posted by theNbomr (Post 4535380)
It isn't clear whether you're trying to set up a dhcp server, dhcp client, or both. On the server host, monitor /var/log/messages, using 'tail -f'. See if the requests from dhcp clients are arriving. You can exercise the server by running the program 'dhclient', on the client. Do you believe you already have a working dhcp server on your LAN?

'apparmor' is some kind of system hardening scheme used by Suse, maybe others.

It is hard to guide you, as there isn't really a completely standard system for configuration of dhcp clients. I suggest using ISC dhcp, and follow the guidelines in their documentation pages. In systems where ISC DHCP is installed by package installers, there is usually a static component in the /sbin tree, including at least the dhclient binary, and a script that gets called by dhclient whenever it executes. In the /etc tree, there is a system of scripts that are called under different conditions related to the state of a dhclient transaction with the server. Often, there is a script there with a variable 'DEBUG', which you can edit to be 'True', and thus cause some log files to be left behind for inspection. This can probably be found in a directory tree with the words 'enter-hooks' &/or 'exit-hooks' in the directory name.

If it is your intention to simply copy files from some existing host, it would be helpful to describe the nature of that host OS.

--- rod.


theNbomr 11-27-2011 04:14 PM

Sorry, still confused. You say 'The desktop can get dhcp ip from server successfully', so what is the problem? What is it that does not work. Please be clear about which part(s) of the system you are trying to configure. What is UML? Is there something special about it with respect to DHCP?

--- rod.

5883 11-27-2011 06:49 PM

sorry i didn't describe clearly, check UML here,
http://user-mode-linux.sourceforge.n...nux-HOWTO.html

it's a virtual machine, has its kernel and file systems.
So i tried to match the kernel with my linux desktop,
then tried to match the file system with linux desktop.

But UML has a size limit so i can only copy the minum set of files, as i need to run many instances of UML.
So now i need to figure out what files to copy for dhcp so i can just copy them only.

Hope this explains.


Quote:

Originally Posted by theNbomr (Post 4535561)
Sorry, still confused. You say 'The desktop can get dhcp ip from server successfully', so what is the problem? What is it that does not work. Please be clear about which part(s) of the system you are trying to configure. What is UML? Is there something special about it with respect to DHCP?

--- rod.



All times are GMT -5. The time now is 05:26 AM.