Member
Posts: 240
Registered: ‎04-09-2013
Kudos: 89
Solutions: 6
Accepted Solution

[dhcp client] Tuning vendor-class-identifier - dhcp option 60

Hi,

I know there are possibilities to set up options for dhcp server on ERL, but this time, I need to customize my ERL option 60 as a dhcp client (required by some ISP to use ERL instead of their box).

As far as I know, the standard way to do that on a linux box would be in /etc/dhcp3/dhclient.conf. But I'm looking for a more "vyatta/EOS friendly" way to do that Man Happy

Exemple of given configuration in /etc/dhcp3/dhclient.conf:

interface "eth0" {
        send vendor-class-identifier "neufbox-BypassedNeufBox-DirectConnectionToFTTH-xxx@yyy.zzz";
}

 

Do you have any good idea? Idea


Accepted Solutions
Highlighted
Previous Employee
Posts: 13,551
Registered: ‎06-10-2011
Kudos: 5473
Solutions: 1656
Contributions: 2

Re: [dhcp client] Tuning vendor-class-identifier - dhcp option 60

Currently there is no config settings to add additional options, and we could look into adding that. For now, one possible workaround is to modify the file "/opt/vyatta/sbin/vyatta-interfaces.pl" on the router and add the additional option line you need (search for "request subnet" and add the new line there).

View solution in original post


All Replies
Highlighted
Previous Employee
Posts: 13,551
Registered: ‎06-10-2011
Kudos: 5473
Solutions: 1656
Contributions: 2

Re: [dhcp client] Tuning vendor-class-identifier - dhcp option 60

Currently there is no config settings to add additional options, and we could look into adding that. For now, one possible workaround is to modify the file "/opt/vyatta/sbin/vyatta-interfaces.pl" on the router and add the additional option line you need (search for "request subnet" and add the new line there).

Member
Posts: 240
Registered: ‎04-09-2013
Kudos: 89
Solutions: 6

Re: [dhcp client] Tuning vendor-class-identifier - dhcp option 60

[ Edited ]

I'm not used to perl at all, so let's give a try Man Happy

 

sub dhcp_update_config {
    my ($conf_file, $intf) = @_;

    my $output = dhcp_conf_header();
    my $hostname = get_hostname();

    $output .= "interface \"$intf\" {\n";
    if (defined($hostname)) {
       $output .= "\tsend host-name \"$hostname\";\n";
    }
    $output .= "\trequest subnet-mask, broadcast-address, routers, domain-name-servers";
    my $domainname = is_domain_name_set();
    if (!defined($domainname)) {
       $output .= ", domain-name";
    }

    my $mtu = get_mtu($intf);
    $output .= ", interface-mtu" unless $mtu;

    $output .= ";\n";
    $output .= "send vendor-class-identifier \"neufbox-BypassedNeufBox-DirectConnectionToFTTH-xxx\@yyy.zzz\";\n";       <<<<-----------
    $output .= "}\n\n";

    dhcp_write_file($conf_file, $output);
}

Is that correct? Of course, that will be a working workaround because right now I only have one interface configured by the dhcp client.

I won't deny that a proper implementation of the VCI option (useful if your wanna use an ERL as a replacement for set-top boxes) would make me happy Man Happy

--

edit: small correction: @ has to be escaped too.

And it works Man Happy

Previous Employee
Posts: 13,551
Registered: ‎06-10-2011
Kudos: 5473
Solutions: 1656
Contributions: 2

Re: [dhcp client] Tuning vendor-class-identifier - dhcp option 60

Haven't tried running this but that looks like it should work. Of course like you said this is only a workaround and as mentioned we can look into supporting custom options (similar to DHCP server config). Thanks for the feedback.

Member
Posts: 133
Registered: ‎04-10-2014
Kudos: 118
Solutions: 11
Contributions: 1

Re: [dhcp client] Tuning vendor-class-identifier - dhcp option 60

Hi Elgo,

I see you're working on Neufbox, i'm actually in the same waters than yours with Orange.

Thanks for this post, this will help me enable some options for orange.

Did you really need to set this up to get your connection working ? Was it the only parameter ?

Any idea how to customize this method for a specific interface / vlan ? (and have several configurations based on them).

New Member
Posts: 1
Registered: ‎04-10-2014

Re: [dhcp client] Tuning vendor-class-identifier - dhcp option 60

Hey, any plans on implementing this feature?