Need help setting up dhcp server

Glenn Satchell Glenn.Satchell at uniq.com.au
Tue Mar 18 10:14:07 UTC 2008


>Date: Mon, 17 Mar 2008 23:04:40 -0700 (PDT)
>From: mister moo <moleque_da_rua at yahoo.com>
>Subject: Need help setting up dhcp server
>To: dhcp-users at isc.org
>
>I have edited and re-edited the configuration file for
>the server and I am not able to start it on the
>interface.
>
>Here is a copy of the file:
>
>ddns-update-style none;
>
>option domain-name-servers 68.87.74.162, 68.87.68.162;
>
>default-lease-time 86400;
>max-lease-time 604800;
>
>authoritative;
>
>subnet 192.168.0.0 netmask 255.255.255.0 {
>        range 192.168.0.50 192.168.0.229 
>        option subnet-mask 255.255.255.0;
>        option broadcast-address 192.168.0.255;
>        option routers 192.168.0.1;

>        option interfaces eth1

This is not a valid statement. What are you trying to achieve here?
There is no need to bind a subnet to an interface. dhcpd works out what
the ip addresses are on the subnet and sorts this out automatically.
>}
>
># Pooter
>subnet 192.168.57.0 netmask 255.255.255.0 {
>	range 192.168.57.0 192.168.57.255;

This range includes the network and broadcast addresses, along with the
router and your fixed address host. Either leave the whole line out or
reduce the size
	range 192.168.57.50 192.168.57.229;
	
You need a router definition in this subnet
	option routers 192.168.57.1;
>	}
># fingers
>host fingers.com {
>	hardware ethernet 1;Ethernet  HWaddr
>00:15:F2:7A:DC:83

Wrong format for the ethernet address, should look like:
	hardware ethernet 00:15:F2:7A:DC:83;
	
>	fixed-address 192.168.57.0;
This is not a valid IP address, it is the same as the subnet network
address. Try
	fixed-address 192.168.57.2;
	
>	}
>

Do you actually have two separate subnets, with a router (or host
acting as a router) in between? Or one network with two IP address
ranges on it?

If it's the latter then you need to add a "shared_network" around the
two subnets.

There is an example config in the dhcpd.conf man page that shows all
these settings. The rest of your file looks ok.

So the two subnet definitions could look like this:

subnet 192.168.0.0 netmask 255.255.255.0 {
        range 192.168.0.50 192.168.0.229 
        option subnet-mask 255.255.255.0;
        option broadcast-address 192.168.0.255;
        option routers 192.168.0.1;
}
subnet 192.168.57.0 netmask 255.255.255.0 {
	range 192.168.57.50 192.168.57.229;
	option routers 192.168.57.1;
	}
# fingers
host fingers.com {
	hardware ethernet 00:15:F2:7A:DC:83;
	fixed-address 192.168.57.2;
	
	}


regards,
-glenn


More information about the dhcp-users mailing list