next up previous contents index
Next: Leases Up: DHCP Server Previous: DHCP Server   Contents   Index

Setting up dhcpd

Lets say that Bob wants to take his network and put the IP addresses from 1.2.3.200 to 1.2.3.250 into a pool to be given out with DHCP. Bob is going to use bob.org (1.2.3.4) as his DHCP server. There are a few ways this can be done. If you want you can use linuxconf and under Control and Configure Linuxconf modules you can activate the dhcpd DHCP server configuration. Once this has been activated you can quit linuxconf and start it again. Config, Networking, Boot Services you will find the DHCP/BOOTP server. This will allow you to input information that you would like to give out to computers that ask for IP addresses. GUIs are fun, but limited. Currently, this GUI program does not allow things like Static DHCP. Oh, well. I guess we will just have to write the configuration files by hand. Create a file called /etc/dhcpd.conf and put something like this inside:

server-identifier 1.2.3.4;
default-lease-time 86400;
max-lease-time 172800;
option domain-name	"bob.org";
option domain-name-servers	1.2.3.2,
	1.2.3.3;
option host-name	"bob.org";
option routers	1.2.3.1;
option subnet-mask	255.255.255.0;
subnet 1.2.3.0 netmask 255.255.255.0{
	range  1.2.3.200 1.2.3.250;
	default-lease-time 86400;
	max-lease-time 172800;
	option domain-name		"bob.org";
	option domain-name-servers		1.2.3.2,
		1.2.3.3;
	option host-name		"bob.org";
	option routers		1.2.3.1;
	option subnet-mask		255.255.255.0;
}

Now that was easy. All we have to do now is start the DHCP server and have it start on reboot:

bash# /etc/rc.d/init.d/dhcpd start
bash# chkconfig dhcpd on


next up previous contents index
Next: Leases Up: DHCP Server Previous: DHCP Server   Contents   Index
Joseph Colton 2002-09-24