How does DHCPD determine what IP address to assign and...
Ryan McCain
Ryan.McCain at dss.state.la.us
Fri Dec 28 19:51:07 UTC 2007
>>> On Fri, Dec 28, 2007 at 11:30 AM, in message
<4774DE52.5D1A.003A.0 at dss.state.la.us>, "Ryan McCain"
<Ryan.McCain at dss.state.la.us> wrote:
>>>> On Fri, Dec 28, 2007 at 10:32 AM, in message
> <B2ED9364017FF54FB9392221F9A49845025DEA35 at nwpsrv08.edj.ad.edwardjones.com>,
> "Stulic,Damjan" <damjan.stulic at edwardjones.com> wrote:
>> You could test the validity of your config file with
>> /usr/sbin/dhcpd -q -t -cf <config file>
>>
>> Damjan Stulic
>> IS Security Identity Management
>> Edward Jones
>>
>
> That command is very useful. Although for me I had to omit the -q for it to
> work.
>
> After trial and error I got the config file to pass using this syntax:
>
> class "DialUp" {
> match if (substring(suffix(dhcp-client-identifier,7),0,5)="Async")
> or
> (substring(suffix(dhcp-client-identifier,6),0,5)="Async") ;
> log (info, " Matched Dialup Rule");
> }
>
> -SNIP-
>
> subnet 10.116.6.0 netmask 255.255.255.0 {
> pool {
> allow members of "DialUp";
> range 10.116.6.1 10.116.6.8;
> option routers 10.116.6.1;
> }
> }
>
> -SNIP-
>
> #DSS - Cisco VPN
> subnet 10.116.6.0 netmask 255.255.255.0 {
> range 10.116.6.9 10.116.6.179 ;
> option routers 10.116.6.254;
> }
>
> -SNIP-
>
> ......The next test will be to see if it actually works.
>
>
> Thanks,
> Ryan
I had someone dial in to test the setup and it didn't allocate an IP address in the 'DialUp' class as I had hoped. Here is my dhcpd.conf:
-SNIP-
class "DialUp" {
match if (substring(suffix(dhcp-client-identifier,7),0,5)="Async")
or
(substring(suffix(dhcp-client-identifier,6),0,5)="Async") ;
log (info, " Matched Dialup Rule");
}
-SNIP_
subnet 10.116.6.0 netmask 255.255.255.0 {
pool {
allow members of "DialUp";
range 10.116.6.1 10.116.6.8;
option routers 10.116.6.1;
}
}
-SNIP-
#DSS - Cisco VPN
subnet 10.116.6.0 netmask 255.255.255.0 {
range 10.116.6.9 10.116.6.179 ;
option routers 10.116.6.254;
}
.../var/log/messages shows this:
Dec 28 13:35:54 dss-cs99la59 dhcpd: DHCPOFFER on 10.116.6.179 to 00:10:7b:4d:73:c6 via 10.116.6.251
Dec 28 13:35:54 dss-cs99la59 dhcpd: DHCPREQUEST for 10.116.6.179 (10.120.11.85) from 00:10:7b:4d:73:c6 via 10.116.6.251
..And the leases file showed this entry:
lease 10.116.6.179 {
starts 5 2007/12/28 19:35:54;
ends 6 2007/12/29 19:35:54;
binding state active;
next binding state free;
hardware ethernet 00:10:7b:4d:73:c6;
uid "\000cisco-10.116.6.251-Async43";
..As you can see it handed out an IP address in the second subnet I posted above. The goal is to have any DHCP client that connects from the 10.116.6.0 network with "Async" in the UID be assigned an IP address between 10.116.6.1 - 10.116.6.8 while any other client connecting from the 10.116.6.0 network would be assigned an IP address between 10.116.6.9 - 10.116.6.179.
I've read through the man pages you guys recommended and I'm stumped.
Thanks again,
Ryan
More information about the dhcp-users
mailing list