DHCP options

Very interesting project, only discovered today :slight_smile:

Coming from a Juniper environment, I like the look of this, however, I would like to ask:

Do we have the ability to send DHCP options, I need to send option 61, client-identifier to my ISP to get an IP address from them on the WAN side ?

Worth trying:
set interfaces ethernet eth0 dhcp-options client-option “send dhcp-client-identifier “username@skydsl|mypass”;”

Note " is the delimiter, text in between the client identifier

haha … love it how you just assume it’s for Sky … but you are 100% correct :wink:

unfortunately, it doesn’t work, I get :

Configuration path: interface ethernet eth0 [dhcp-options] is not valid
Set failed

I can probably hack it in a config file or something … will have a look.


Ok … got it to write the options in the dhclient.conf file (/var/lib/dhcp3/dhclient_eth1.conf) in my case. I had to hack the “vyatta-interfaces.pl” script a little to make it happen. I should now receive a public IP address via DHCP from Sky :wink:

autogenerated by vyatta-interfaces.pl on Wed May 10 13:58:49 UTC 2017

interface “eth1” {
send host-name “myuser@skydsl|mypass”;
send dhcp-client-identifier “myuser@skydsl|mypass”;
request subnet-mask, broadcast-address, routers, domain-name-servers, domain-name, interface-mtu;

Hi related to this, my ISP needs to receive the hostname with this format: ‘XXX/XXX’. The problem is every time I try to change the host-name or dhcp-client-identifier params, the interface eth0 (where I do the changes) gets disabled. I think this is for the character ‘/’. Do you know how to bypass this? In ubnt edge os equipment it is possible.


might have to put a ‘’ before the ‘/’ … it’s a perl script. you can also run the script manually afterwards to make sure it parse properly. this is what i added to the perl script, note the ‘’ before the @ sign:

my $output = dhcp_conf_header();

    my $hostname = "mypfsense\@skydsl|abxdef123";
    my $clientid = "mypfsense\@skydsl|abxdef123";

$output .= "interface \"$intf\" {\n";

if (defined($hostname)) {
   $output .= "\tsend host-name \"$hostname\";\n";
   $output .= "\tsend dhcp-client-identifier \"$clientid\";\n";

also … this is hard coded then and not done via the command-line.

i now use pfsense as my home router and that has the “hostname” option on the WAN interface.

Hi! Thanks for you response. I should try to escape the ‘/’ char, but I think I am going to try pfsense. Anyway, I always can use my ubnt equipment again. It is just that I wanted to virtualize the router.