subnets separate with physical cards

Glenn Satchell Glenn.Satchell at uniq.com.au
Tue Jan 29 12:02:34 UTC 2008


>Date: Mon, 28 Jan 2008 16:19:06 -0200
>From: "Carlos Miranda" <debian at mstaaravin.com.ar>
>To: dhcp-users at isc.org
>Subject: Re: subnets separate with physical cards
>
>On 1/28/08, Romer Ventura <rventura at h-st.com> wrote:
>> Since each of them are on a different subnet you can define each of the
>> options that you need on their respective subnet declaration within the
>> .conf file so there is not need to have multiple .conf files and I really
>> don't think it is supported. (multiple conf files)
>
>Thanks for quickly respond
>in /etc/dhcp3-server/dhcpd.conf at the end of file say:
>
>You can declare a class of clients and then do address allocation
>based on that. The example below shows a case where all clients
>in a certain class get addresses on the 10.17.224/24 subnet, and all
>other clients get addresses on the 10.0.29/24 subnet.
>
>#class "foo" {
>#  match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
>#}
>
>#shared-network 224-29 {
>#  subnet 10.17.224.0 netmask 255.255.255.0 {
>#    option routers rtr-224.example.org;
>#  }
>#  subnet 10.0.29.0 netmask 255.255.255.0 {
>#    option routers rtr-29.example.org;
>#  }
>#  pool {
>#    allow members of "foo";
>#    range 10.17.224.10 10.17.224.250;
>#  }
>#  pool {
>#    deny members of "foo";
>#    range 10.0.29.10 10.0.29.230;
>#  }
>#}
>
>I guess it's what I need, but how define the vendor class, with MAC
>address...? or nominal name (eth0, ethx, etc)

I don't think you need to go to that level of complexity.

First up, read the dhcpd.conf man page, and especially the section
named EXAMPLES. There is an example there that is almost exactly what
you need.

You need a subnet declaration for each of the subnets, with the correct
subnet mask. In each subnet declare the dns server (option
domain-name-servers) and the default gateway (option routers) to be the
ip address of the server on that subnet. Add a range statement for
dynamic allocation and you're done.
 
In /etc/default/dhcp3-server set INTERFACES="eth1 eth2" so that it
listens on both those subnets.

regards,
-glenn


More information about the dhcp-users mailing list