# DHCP group ip address problem



## hilal (Dec 15, 2010)

Hi,

I am trying to assign different ip address to different groups of PCs, so after some web searching I tried this solution:

on server: /etc/dhcp3/dhcpd.conf 

```
...
option special code 202 = boolean;


class "foo" {
        match if option special = true;
}

subnet 192.168.1.0 netmask 255.255.255.0 {
  pool {
    allow members of "foo";
    range 192.168.1.30 192.168.1.40;
  }
  pool {
    deny members of "foo";
    range 192.168.1.160 192.168.1.200;
  }
}
```

on clients that are special: /etc/dhclient.conf

```
option special code 202 = boolean;
interface "wlan0" {
        option special on;
}
```

but when I run dhclient on the client I get this error:

```
/etc/dhclient.conf line 9: expecting a statement.
option 
^
/etc/dhclient.conf line 10: semicolon expected.
interface 
^
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPACK from 192.168.1.100
bound to 192.168.1.30 -- renewal in 300 seconds.
```

and it gets an ip from the first group. I tried dhclient on a client with empty /etc/dhclient.conf it get assigned from the special group too...

Thank you for your help in advance.
br,


----------



## SirDice (Dec 15, 2010)

hilal said:
			
		

> on server: /etc/dhcp3/dhcpd.conf


That doesn't look like the correct location. All ports have their configuration files in /usr/local/etc/.


----------



## hilal (Dec 15, 2010)

The DHCP server is running on a Linux machine. While client on a FreeBSD 9 Current 201010. Sorry for not mentioning it.


----------

