To add some filter rules in conf file

Ashmath Khan at
Tue Oct 13 13:20:25 UTC 2009


I want to add some filter rules into the configuration file.
For example, If I find string "Amino" in the option dhcp-client-identifier,
then the range would be  A, options B and if the string is "Phone*" then the
range would be C and options D.
I tried this:
subnet netmask {
default-lease-time 86400;
max-lease-time 86400;
option routers;
option domain-name-servers;

if substring (option dhcp-client-identifier, 0, 5) = "Amino" {
option time-offset -12345;
option boot-size 65000;
} elsif substring (option dhcp-client-identifier, 0, 5) = "Phone" {
option time-servers,;
option host-name "";
ignore known-clients;
} else {
option perform-mask-discovery false;
option policy-filter,;

But its giving error:
/etc/dhcpd.conf line 8: right brace expected.
/etc/dhcpd.conf line 11: expecting a declaration
} elsif
/etc/dhcpd.conf line 16: expecting a declaration
} else
/etc/dhcpd.conf line 20: expecting a declaration
Configuration file errors encountered -- exiting

what could be the reason ? Or how do I put these in conf file ?
Thanks for help.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the dhcp-users mailing list