<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Ashmath Khan</b> <span dir="ltr"><<a href="mailto:hashmat.email@gmail.com">hashmat.email@gmail.com</a>></span><br>

Date: Tue, Oct 13, 2009 at 6:50 PM<br>Subject: To add some filter rules in conf file<br>To: Users of ISC DHCP <<a href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a>><br><br><br>Hello,<br><br>I want to add some filter rules into the configuration file.<br>

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.<br>
I tried this:<br>subnet 192.168.1.0 netmask 255.255.255.0 {<br>default-lease-time 86400;<br>max-lease-time 86400;<br>option routers 192.168.1.254;<br>option domain-name-servers 192.168.1.254;<br><br>if substring (option dhcp-client-identifier, 0, 5) = "Amino" {<br>


range 192.168.1.64 192.168.1.253;<br>option time-offset -12345;<br>option boot-size 65000;<br>} elsif substring (option dhcp-client-identifier, 0, 5) = "Phone" {<br>range 192.168.1.66 192.168.1.253;<br>option time-servers 1.2.3.4,10.232.167.89;<br>


option host-name "<a href="http://something.com" target="_blank">something.com</a>";<br>ignore known-clients;<br>} else {<br>range 192.168.1.68 192.168.1.253;<br>option perform-mask-discovery false;<br>option policy-filter 3.4.5.6,255.255.255.0;<br>


}<br>                                                                            <br>But its giving error:<br>/etc/dhcpd.conf line 8: right brace expected.<br>range <br> ^<br>/etc/dhcpd.conf line 11: expecting a declaration<br>


} elsif <br> ^<br>/etc/dhcpd.conf line 16: expecting a declaration<br>} else <br> ^<br>/etc/dhcpd.conf line 20: expecting a declaration<br>}<br> ^<br>Configuration file errors encountered -- exiting<br><br><br>what could be the reason ? Or how do I put these in conf file ?<br>


Thanks for help.<br><font color="#888888"><br>-Ashmath<br>
</font></div><br>