Next Previous Contents

27. DHCPd SERVER configuration

27.1 The Differences between DHCP and BOOTP

DHCP or Dynamic Host Control Protocol is the direct cousin of BOOTP.

27.2 Configuring DHCP support on various Linux Distributions:

Though TrinityOS primarily supports Redhat, I'm contantly adding support for other Linux distributions. If you have additions or comments, please let me know.

27.3 Determining MAC addresses for static DHCP scopes

NOTE: This config defines a STATIC IP address per core machine. All other machines get dynamic DHCP IP addresses. I do this for security reasons.

To find out the MAC address of a machine's Ethernet card, do the following:

Win95: run "winipcfg" WinNT: run "ipconfig /all" Linux: run "arp"

- For ALL distributions using the DHCPcd client, create and modify the file /etc/dhcpd.conf

27.4 Creating the /etc/dhcpd/conf file


--<begin>--
server-identifier roadrunner-int.acme123.com;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
option domain-name-servers 192.168.0.1, 24.1.64.33, 24.1.64.34;
option domain-name "acme123.com";
default-lease-time 86400;               

subnet 192.168.0.0 netmask 255.255.255.0 {
        range 192.168.0.9 192.168.0.10;
}
        
host coyote.acme123.com {
        hardware ethernet 00:60:08:B1:36:4A;
        fixed-address 192.168.0.4;      
}
--<end>--

Next, you need to create the dhcp.leases file:


                "touch /etc/dhcpd.leases"

As mentioned above, you will need to replace the hardware Ethernet MAC addresses with the MAC addresses of your specific NIC cards.

* Ok, now you need to put in all of your DHCP IP addresses into DNS as described in Section 24 and then restart Bind.

Now, you need to make sure you have the following lines in your /etc/services file:


                --
                bootps          67/udp                          # bootp server
                bootpc          68/udp                          # bootp client
                --

27.5 Starting up DHCP

Finally, lets start DHCP up:

Slackware: Run "/usr/sbin/dhcpd eth1"

Redhat: Run "/etc/rc.d/init.d/dhcpd start"

* Additional security: DHCPd runs as root in a non-chroot'ed way. If you are paranoid about security, check out the LASG doc. The URL is in Section 5

If that works well, you should enable DHCP full time:

Redhat:


                        chkconfig --level 2345 dhcpd on


Next Previous Contents