View previous topic :: View next topic |
Author |
Message |
dgiorgio n00b
Joined: 24 Jun 2012 Posts: 68
|
Posted: Mon Mar 18, 2013 3:38 pm Post subject: dhcpd (dhcp server) will not start on boot. |
|
|
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 |
|
|
tuner23 Tux's lil' helper
Joined: 18 May 2006 Posts: 82
|
Posted: Tue Mar 19, 2013 7:58 am Post subject: |
|
|
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 |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Tue Mar 19, 2013 8:57 am Post subject: |
|
|
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 |
|
|
tuner23 Tux's lil' helper
Joined: 18 May 2006 Posts: 82
|
Posted: Tue Mar 19, 2013 9:28 am Post subject: |
|
|
Oh, thanks for the info.. |
|
Back to top |
|
|
dgiorgio n00b
Joined: 24 Jun 2012 Posts: 68
|
Posted: Tue Mar 19, 2013 10:00 pm Post subject: |
|
|
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 |
|
|
|