LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 11-26-2011, 08:45 AM   #1
5883
Member
 
Registered: Aug 2004
Posts: 153

Rep: Reputation: 0
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 ?
 
Old 11-27-2011, 12:09 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
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.
 
Old 11-27-2011, 04:08 PM   #3
5883
Member
 
Registered: Aug 2004
Posts: 153

Original Poster
Rep: Reputation: 0
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 View Post
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.
 
Old 11-27-2011, 04:14 PM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
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.
 
Old 11-27-2011, 06:49 PM   #5
5883
Member
 
Registered: Aug 2004
Posts: 153

Original Poster
Rep: Reputation: 0
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 View Post
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.

Last edited by 5883; 11-27-2011 at 06:51 PM.
 
  


Reply

Tags
dhcp, uml


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCP failed on ubuntu-8.04 cheesewizz Linux - Networking 4 06-25-2008 03:03 AM
Resetting DHCP leases files fakhan Linux - Server 1 01-19-2008 07:29 AM
Iptables / Host* files / New Cable Modem (dhcp) rhb327 Slackware 3 12-31-2005 06:11 PM
ISC 3.1 DHCP, CHROOT and Included Files carsten.engel Linux - Software 0 10-28-2005 09:45 AM
How do I share files on a Windows DHCP network? yzrider210 Linux - Networking 2 12-13-2003 03:29 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration