How to add an option to dhclient.conf / DHCP client?

  • Hi,

    I'd like to add option below to dhclient.conf to get an IP from Motorola IPTV DHCP server:

    send vendor-class-identifier XX:XX:XX:XX:XX;

    but I can not even find the conf file.

    Is there any other way to change the configuration file of DHCP client?

    Thanks in advance

  • Don't like bumbing old posts, but this is exactly what I need to do at the moment as my ISP also started to provide IPTV.

    For pfsense to act as the set-top box, i need to send the vendor-class with the dhcp request.

    Asgari, did you figured it out? or can someone else help me on the way.

  • pfSense 1.2.3-Release


    But it seems to revert back to a default state upon reboot.  :-(

    I too would like to add vendor specific information option to wan (ISP) dhcp discover/request.

    Anyone know where to add this so that it will stick?


  • I'll just bump this too, i need this as well.

  • I've done it in pfSense 2 Beta4.
    Just in short:

    First, it's not send vendor-class-identifier but send dhcp-class-identifier.
    This is different from other dhcp clients, but using dhcp-class-identifier does send option-60.
    You may also need other options. Just compare dhcp requests with a sniffer…

    To get it persitent, you need to modify the /etc/inc/ file.
    If you only have one external interface you need to find the place where it writes the dhclient_wan.conf file.
    (this differs from version to version!)
    Here you should find the lines that write:

            $dhclientconf .= <<<eod<br>interface "{$wanif}" {
    timeout 60;
    retry 1;
    select-timeout 0;
    initial-interval 1;</eod<br> 

    You may add any line you like there.

    If you have, like me, one WAN interface for internet and another going to the IPTV network and you only want the extra dhcp options on that one, you need to add some intelligence with something like:

    if ($wanif == "re2") {
    ... (your modified setup)
    else {
    ... (a copy of the original setup)

    You will make any modifications at your own risk! Make backups!
    One last thing, this modification will not survive an pfSense update!

Log in to reply