Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dhcpd (dhcp server) will not start on boot.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
dgiorgio
n00b
n00b


Joined: 24 Jun 2012
Posts: 58

PostPosted: Mon Mar 18, 2013 3:38 pm    Post subject: dhcpd (dhcp server) will not start on boot. Reply with quote

dhcp server will not start on boot.

but it is possible to start after the system has loaded.

Quote:
# /etc/init.d/dhcpd restart
* Starting dhcpd ...


Quote:
# rc-update
NetworkManager | default
acpid | default
alsasound | boot
bootmisc | boot
consolefont | boot
consolekit | default
dbus | default
devfs | sysinit
dhcpd | default
dmesg | sysinit
fsck | boot
hostname | boot
hwclock | boot
iptables | boot
keymaps | boot
killprocs | shutdown
laptop_mode | default
local | default
localmount | boot
modules | boot
mount-ro | shutdown
mtab | boot
net.lo | boot
netmount | default
procfs | boot
root | boot
samba | default
savecache | shutdown
sshd | default
swap | boot
swapfiles | boot
sysctl | boot
sysfs | sysinit
syslog-ng | default
termencoding | boot
tmpfiles.setup | boot
udev | sysinit
udev-mount | sysinit
urandom | boot
vixie-cron | default
xdm | default
xinetd | default


Quote:
# more /etc/dhcp/dhcpd.conf
# dhcpd.conf
# Sample DHCP Server Configuration File


##########################################
#####----- Global Configuration -----#####
##########################################
option domain-name "REDE-VM";
#option domain-name-servers 192.168.56.1, 192.168.56.130;
#option routers 192.168.56.1;
ddns-update-style none;
#ddns-rev-domainname "in-addr.arpa";
default-lease-time 600;
max-lease-time 7200;
authoritative;
##############################################
#####----- End Global Configuration -----#####
##############################################


###############################################
#####----- Start Modem Configuration -----#####
###############################################
#subnet 192.168.1.0 netmask 255.255.255.0 {
# interface eth0;
#}
#############################################
#####----- End Modem Configuration -----#####
#############################################


####################################################
#####----- Start REDE-VM Configuration -----#####
####################################################
subnet 192.168.56.0 netmask 255.255.255.0 {
interface vboxnet0;
default-lease-time 600;
max-lease-time 7200;
range 192.168.56.100 192.168.56.200;
option subnet-mask 255.255.255.0;
option routers 192.168.56.1;
#option routers 192.168.0.254;
option broadcast-address 192.168.56.255;
###--- If you want to provided WINS Server
#option netbios-name-servers 192.168.10.13;
#option netbios-node-type 8;
}
##################################################
#####----- End Downstairs Configuration -----#####
##################################################


##################################################
#####----- Start Upstairs Configuration -----#####
##################################################
#subnet 10.0.0.0 netmask 255.255.255.0 {
# interface eth2;
# default-lease-time 6000;
# max-lease-time 7200;
# range 10.0.0.100 10.0.0.200;
# option subnet-mask 255.255.255.0;
# option routers 10.0.0.254;
# option broadcast-address 10.0.0.255;
#}
################################################
#####----- End Upstairs Configuration -----#####
################################################


#####################################################################
#####----- Start Server and Fixed IP Address Configuration -----#####
#####################################################################
group{
###--- Any global server settings should go here ---###
host DEBIAN-VM { hardware ethernet 08:00:27:DF:4F:C8; fixed-address 192.168.56.10; }
host FREEBSD-VM { hardware ethernet 08:00:27:2E:C1:26; fixed-address 192.168.56.11; }
host CENTOS-VM { hardware ethernet 08:00:27:0F:27:C6; fixed-address 192.168.56.12; }
host MAGEIA-VM { hardware ethernet 08:00:27:47:A7:82; fixed-address 192.168.56.13; }
}
###################################################################
#####----- End Server and Fixed IP Address Configuration -----#####
###################################################################



interface "vboxnet0" would be the problem?
Back to top
View user's profile Send private message
tuner23
n00b
n00b


Joined: 18 May 2006
Posts: 68

PostPosted: Tue Mar 19, 2013 7:58 am    Post subject: Reply with quote

Hy,


dhcpd needs a succesfull started net interface, so yes vboxnet0 has to be up.

If you want to use it only with vbox, you have to wait till vbox is started.

Possible solutions are:
* change the dependencies in the init-scripts
e.g. try (hope the name of the service is /etc/init.d/vbox )
[code]/etc/init.d/dhcp
...
need net vbox
...
[code]
the problem here is that you ever have to update the init-script, when recompiling dhcpd.
* Or add dhcpd service to service local (/etc/local.d/), when everything is already up and running.

Hope that helps.

Greets,
Antonis.[/code]
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2965

PostPosted: Tue Mar 19, 2013 8:57 am    Post subject: Reply with quote

tuner23 wrote:
[...] the problem here is that you ever have to update the init-script, when recompiling dhcpd.

tuner23 ...

rc_need_*, rc_after_*, rc_provide_*, rc_before_*, etc, can be defined in /etc/conf.d/* or /etc/rc.conf, so its better to make changes there rather than in /etc/init.d/*

An example, to have an interface need 'iptables'

/etc/conf.d/net
Code:
rc_net_eth0_need="iptables"

or, similarly, to have 'ipset' start before 'iptables'.

/etc/conf.d/net
Code:
rc_ipset_before="iptables"


Anyhow, all this may be besides the point as I'm not even sure virtualbox is started via init.

HTH & best ... khay
Back to top
View user's profile Send private message
tuner23
n00b
n00b


Joined: 18 May 2006
Posts: 68

PostPosted: Tue Mar 19, 2013 9:28 am    Post subject: Reply with quote

Oh, thanks for the info..
Back to top
View user's profile Send private message
dgiorgio
n00b
n00b


Joined: 24 Jun 2012
Posts: 58

PostPosted: Tue Mar 19, 2013 10:00 pm    Post subject: Reply with quote

Quote:
# more /etc/conf.d/modules
# You can define a list modules for a specific kernel version,
# a released kernel version, a main kernel version or just a list.
# The most specific versioned variable will take precedence.
#modules_2_6_23_gentoo_r5="ieee1394 ohci1394"
#modules_2_6_23="tun ieee1394"
#modules_2_6="tun"
#modules_2="ipv6"
#modules="ohci1394"

# You can give modules a different name when they load - the new name
# will also be used to pick arguments below.
#modules="dummy:dummy1"

# Give the modules some arguments if needed, per version if necessary.
# Again, the most specific versioned variable will take precedence.
#module_ieee1394_args="debug"
#module_ieee1394_args_2_6_23_gentoo_r5="debug2"
#module_ieee1394_args_2_6_23="debug3"
#module_ieee1394_args_2_6="debug4"
#module_ieee1394_args_2="debug5"

# You should consult your kernel documentation and configuration
# for a list of modules and their options.
modules="${modules} vboxdrv vboxnetflt vboxnetadp"


the modules are started at boot.

how do I load the network interface "vboxnet0"?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum