First Time with Groups

Glenn Satchell glenn.satchell at uniq.com.au
Wed Mar 31 02:55:13 UTC 2010


Note that the proper command to set the default gateway is "option 
routers", so it should look like this:

	option routers 10.1.1.1;

regards,
-glenn

On 03/31/10 05:43, Simon Hobson wrote:
> Matt Neimeyer wrote:
>
>> I set up a dhcp 3.1.2 server on my Gentoo box the other day and I'm
>> trying to set it up so that my "unified" network in the house has
>> three computers using the office DSL router and the rest using the
>> home DSL router. The three office PCs are statically assigned and all
>> but one of the home PCs are dynamic. I know I could do seperate
>> subnets but I've got enough shared resources between the two that I'd
>> prefer not to go that route if I can avoid it. (NAS devices, printers,
>> etc)
>>
>> If I've read the various man pages right I should indicate all devices
>> in the conf file but I'm not sure how I should represent devices that
>> are "self contained" with a set IP. For example, the DSL routers and
>> the one switch I have. (10.1.1.1, 10.1.1.254 and 10.1.1.2
>> respectively)
>
> You don't do anything for devices you aren't configuring via DHCP -
> there is no need to.
>
> Turning to your config, you have several errors, not least of which is
> that host statements are global and should not be within a subnet. Also,
> putting a range statement in a group doesn't help.
>
> Try this :
>
> subnet 10.1.1.0 netmask 255.255.255.0 {
> # // Residential
> range 10.1.1.100 10.1.1.200
> router 10.1.1.254
> }
>
> # Residential
> group {
> # router 10.1.1.254 ; - redundant as it's the subnet config
> host omega {
> hardware ethernet 00:00:sa:mp:le:01;
> fixed-address 10.1.1.5;
> }
> }
>
> # Business
> group {
> router 10.1.1.1 ;
> host alpha {
> hardware-ethernet 00:00:sa:mp:le:02;
> fixed-address 10.1.1.6;
> }
> host beta {
> hardware-ethernet 00:00:sa:mp:le:03;
> fixed-address 10.1.1.7;
> }
> host gamma {
> hardware-ethernet 00:00:sa:mp:le:04;
> fixed-address 10.1.1.8;
> }
> }
>
>
> By default, any hosts not configured otherwise will get an address from
> the one pool - and the residential router as their gateway.
>
> Host Omega will get the fixed address specified and any options
> specified in teh group statement. In practical terms, none are required
> since the router specified is the same as the default router for the
> subnet. In this case, the group statement is redundant since there
> aren't any group specific options to set, and there's only one member
> anyway.
> If you don't actually need a fixed address, then you could simply omit
> the host entry for omega altogether.
>
>
> The three hosts alpha, beta, and gamma will get the alternative router
> specified in the group statement, and the fixed addresses specified.
> Note that they don't actually have to have a fixed address, it's OK to
> let them have dynamic addresses.
>
> The group statement is really just a shorthand way of applying a set of
> config statements to multiple hosts. The end results are the same as
> writing :
>
> host alpha {
> hardware-ethernet 00:00:sa:mp:le:02;
> fixed-address 10.1.1.6;
> router 10.1.1.1 ;
> }
> host beta {
> hardware-ethernet 00:00:sa:mp:le:03;
> fixed-address 10.1.1.7;
> router 10.1.1.1 ;
> }
> host gamma {
> hardware-ethernet 00:00:sa:mp:le:04;
> fixed-address 10.1.1.8;
> router 10.1.1.1 ;
> }
>



More information about the dhcp-users mailing list