Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

dhcpd (dhcp server) will not start on boot.

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
5 posts • Page 1 of 1
Author
Message
dgiorgio
n00b
n00b
Posts: 68
Joined: Sun Jun 24, 2012 12:18 am

dhcpd (dhcp server) will not start on boot.

  • Quote

Post by dgiorgio » Mon Mar 18, 2013 3:38 pm

dhcp server will not start on boot.

but it is possible to start after the system has loaded.
# /etc/init.d/dhcpd restart
* Starting dhcpd ...
# 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
# 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?
Top
tuner23
Tux's lil' helper
Tux's lil' helper
Posts: 82
Joined: Thu May 18, 2006 5:42 pm

  • Quote

Post by tuner23 » Tue Mar 19, 2013 7:58 am

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: Select all

/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.
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

  • Quote

Post by khayyam » Tue Mar 19, 2013 8:57 am

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: Select all

rc_net_eth0_need="iptables"
or, similarly, to have 'ipset' start before 'iptables'.

/etc/conf.d/net

Code: Select all

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
Top
tuner23
Tux's lil' helper
Tux's lil' helper
Posts: 82
Joined: Thu May 18, 2006 5:42 pm

  • Quote

Post by tuner23 » Tue Mar 19, 2013 9:28 am

Oh, thanks for the info..
Top
dgiorgio
n00b
n00b
Posts: 68
Joined: Sun Jun 24, 2012 12:18 am

  • Quote

Post by dgiorgio » Tue Mar 19, 2013 10:00 pm

# 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"?
Top
Post Reply

5 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic