This is my really short installation log of how I installed and configured a DHCP server on Ubuntu Hardy Heron.
1: Make sure that the latest version is installed:
sudo apt-get install dhcp3-server
Note: Don’t be alarmed if the startup fails; that’s because you haven’t configured it yet.
2.1: Edit the DHCP server configuration:
sudo nano /etc/dhcp3/dhcpd.conf
2.2: The contents of my configuration file, for me the comments already in the file was what I needed to make the necessary changes:
# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;
# option definitions common to all supported networks...
option domain-name "home.lan";
option domain-name-servers ubuntu.home.lan;
default-lease-time 600;
max-lease-time 7200;
# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;
# This is a very basic subnet declaration.
subnet 10.10.10.0 netmask 255.255.255.0 {
range 10.10.10.100 10.10.10.200;
option routers router.home.lan;
}
3: Start the DHCP server (it should now start without problems):
sudo /etc/init.d/dhcp3-server start
Done
[...] Setting up a DNS for the local network on the Ubuntu Hardy Heron server Setting up a DHCP server on Ubuntu Hardy Heron [...]
[...] How To setup DHCP server on Ubuntu Hardy Heron in 3 simple steps! [...]
Hey Lami,
Nice post.
Are you using 2 Network Cards? and if that’s so, did you have both of them connected during the setup?
I am failing to get my DHCP to start, and to this moment, could not find the reason.
One more question, are you using 1 or 2 network cards?
Hi JPierre, thanks for your comments.
I’m only using 1 network card.
Maybe you can find a clue of what’s wrong in the system log:
“tail /var/log/syslog”
Regards,
Lani
I can now get DHCP, but can’t get the connected clients to browse the web. I can ping google from the server though for example. Any tips?
JPierre: Make sure that “option domain-name-servers” is set to your dns in the configuration, as this is the dns that the clients will be told to use. Also make sure that if you have specified your external router in the configuration file, if you have one. You do this with the “option routers” statement. I think this is what the clients will use as the default gateway.
To narrow down the problem I would do these simple tests:
1. Ping the server from a client.
2. Ping the IP-address of google. If this works it is a DNS problem.
[...] aicea Setting up a DHCP server on Ubuntu Hardy Heron __________________ It has been said that the contents of the rules sections of sendmail.cf most [...]
syslog says: Not configured to listen on any interfaces!
[...] How To setup DHCP server on Ubuntu Hardy Heron in 3 simple steps! [...]