• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

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

Scheduled Pinned Locked Moved DHCP and DNS
5 Posts 5 Posters 11.2k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    asgari
    last edited by Dec 8, 2009, 12:19 PM

    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

    1 Reply Last reply Reply Quote 0
    • J
      j1nx
      last edited by Mar 16, 2010, 8:04 PM

      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.

      1 Reply Last reply Reply Quote 0
      • N
        NOYB
        last edited by Apr 5, 2010, 6:19 AM

        pfSense 1.2.3-Release

        /var/etc/dhclient_wan.conf

        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?

        Thanks

        1 Reply Last reply Reply Quote 0
        • S
          SockPants
          last edited by Aug 2, 2010, 10:02 AM

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

          1 Reply Last reply Reply Quote 0
          • J
            jimmy
            last edited by Aug 24, 2010, 2:19 PM

            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/interfaces.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!

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
              [[user:consent.lead]]
              [[user:consent.not_received]]