Previous

Linux Wireless Access Point HOWTO

Next

Chapter 5. Configuring DHCPD


5.1 Overview of DHCPD

DHCPD is the daemon used by Linux to dynamically configure TCP/IP information for client systems. NZ-Wireless uses DHCPD to automatically configure wireless clients that associate with one of our nodes so that the end user does not need to configure their systems in order to connect to us. Other community groups do likewise.

If you didn't install DHCPD during the initial Redhat installation in Chapter 3 you will need to download and install it now.

DHCPD is quite simple to configure so instead of providing a step-by-step instruction guide I have simply included an example configuration file in this section with comments imbedded to act as a guide. For a more in-depth guide to configuring DHCPD, refer to the DHCP mini-HOWTO


5.2 Example DHCPD configuration file

The file to configure DHCPD is /etc/dhcpd.conf You can edit this file yourself or copy and paste the example below, using the embedded comments as a guide. Each line that begins with a "#" is a comment.

In the following example we pretend that the network assigned to us by our wireless administrator is 10.1.2.0/255.255.255.0 As in other examples, you will need to change some of the values in this file to reflect the network actually assigned to you.

# Sample /etc/dhcpd.conf

# Set DHCPD to answer requests on the wireless interface

DHCPDARGS=wlan0;

# Set some defaults for lease time and DNS update method
ddns-update-style ad-hoc;
default-lease-time 600;
max-lease-time 7200;

# Set the subnet mask for the wireless IP network
option subnet-mask 255.255.255.0;

# Set the Broadcast address. This will be 10.x.x.255,
# the "x.x" will depend upon the network assigned to you by NZWireless.
option broadcast-address 10.1.2.255;

# Set the router address, this will be 10.x.x.1, the address
# of your wireless interface WLAN0
option routers 10.1.2.1;

# Set the Name Server address. This will be the same as your WLAN0 address
# because we intend to run DNS on this machine.
option domain-name-servers 10.1.2.1;

# Set the default domain name for clients on this network.
# i.e. the DNS domain assigned to you by your wireless administrator.
option domain-name "simon.akld.nzwireless.org";

# Allocate a network range for dynamic IP addresses to hand out to clients.
# Again, this range will be in 10.x.x.x, depending upon the network allocated
# to you by your wireless administrator.
subnet 10.1.2.0 netmask 255.255.255.0 {
    range 10.1.2.10 10.1.2.20;
}



5.3 Testing DHCPD

Test that this configuration is working by executing the command;

[root@accesspoint root]# service dhcpd start

Which should produce the following output. If it doesn't and you get a failed message instead, chances are you have made a syntax error in the configuration file. The error message should give you clues where to look.

Starting dhcpd:              [   OK   ]

If you have another wireless system available you may like to try associating with your Access Point from that system. Check to make sure that it receives all of the TCP/IP configuration settings correctly by setting your client wireless system to associate with the ESSID of your Access Point, which is simon.akld.nzwireless.org in our example. You should be able to ping one system from the other if your client system has received it's TCP/IP settings from our Access Point via DHCP correctly.


5.4 Enabling DHCPD from startup

Back in Chapter 3 We turned off a number of unnecessary services to improve system performance, using the setup utility. We now want to add DHCPD to our list of services that should start at boot time by adding an asterix beside DHCP in the System services menu of setup as described in section 3.3

Once that is completed, we're ready to move on to Configuring DNS



Previous Home Next
/arpa/ns/o/oob/html/nzwireless