Project

General

Profile

Bug #6880

Multiple DHCP6 WAN connections leads to multiple dhcp6c clients

Added by Roy Hooper 4 months ago. Updated about 1 month ago.

Status:
Confirmed
Priority:
Normal
Category:
DHCP6
Target version:
Start date:
10/28/2016
Due date:
% Done:

0%

Affected version:
2.3.2
Affected Architecture:
All

Description

When configuring multiple interfaces as DHCP6, such as PPPoE DSL and Cable, multiple dhcp6c processes get started, one per interface. This leads to problems, as only the first started dhcp6c will work properly, as dhcp6c binds to *::546

This leads to the second started dhcp6c answers being picked up by the first started, which starts to emit the error message "unexpected interface (%d)" when the wrong dhcp6c receives a reply.

The fix is to run only one dhcp6c and have a combined config file. For example, I might have /var/etc/dhcp6c_wan.conf and /var/etc/dhcp6c_opt3.conf, which should be merged.
Two processes will be started:
/usr/local/sbin/dhcp6c -D -c dhcp6c_wan.conf -p /var/run/dhcp6c_em0.pid -f em0
/usr/local/sbin/dhcp6c -D -c dhcp6c_opt3.conf -p /var/run/dhcp6c_pppoe0.pid -f pppoe0

A working combined config looks like this

interface pppoe0 {
    send ia-na 0;   # request stateful address
    send ia-pd 0;   # request prefix delegation
    request domain-name-servers;
    request domain-name;
    script "/var/etc/dhcp6c_opt3_script.sh"; # we'd like some nameservers please
};
id-assoc na 0 { };
id-assoc pd 0 {
    prefix ::/56 infinity;
    prefix-interface em3_vlan6 {
        sla-id 1;
        sla-len 8;
    };
    prefix-interface em3_vlan5 {
        sla-id 2;
        sla-len 8;
    };
};

interface em0 {
    send ia-na 1;   # request stateful address
    send ia-pd 1;   # request prefix delegation
    request domain-name-servers;
    request domain-name;
    script "/var/etc/dhcp6c_wan_script.sh"; # we'd like some nameservers please
};
id-assoc na 1 { };
id-assoc pd 1 {
    prefix-interface em3 {
        sla-id 0;
        sla-len 0;
    };
};

And the process would be launched like
/usr/local/sbin/dhcp6c -dD -c dhcp6c.conf -p /var/run/dhcp6c.pid -f em0 pppoe0

History

#1 Updated by Jim Thompson 4 months ago

  • Assignee set to Jim Pingle

#2 Updated by Jim Pingle 4 months ago

  • Status changed from New to Confirmed
  • Assignee deleted (Jim Pingle)
  • Target version set to Future

Confirmed. The daemon is binding to all interfaces, which prevents the second one from operating properly.

Changing the dhcp6c process to use a single config and instance will require significant work to implement for little gain. At this time, a single LAN cannot utilize prefixes from both WANs until other features such as #4881 are implemented. Therefore, at the moment having a second DHCPv6 WAN is of little use.

#3 Updated by Jim Thompson 3 months ago

  • Assignee set to Renato Botelho

#4 Updated by Luke Hamburg about 1 month ago

I have a dual WAN 2.3.2-p1 system with only one of the WANs configured for DHCP6 (not PPPoE, just Ethernet) and I am hitting this issue too. Not sure if it's quite the same bug, but the end result of winding up with multiple instances of dhcp6c running (and losing v6 connectivity as a result) is the same.

#5 Updated by Martin Wasley about 1 month ago

Its not, it's a problem that appears from time to time and is quite intermittent. In 2.4b changes have been made which hopefully nai!s this issue of multiple fhcp6c clients.

#6 Updated by Luke Hamburg about 1 month ago

Ok great, I will definitely try 2.4b then. If you happen to know which commits are relevant to that fix I'd love to look at them.

#7 Updated by Martin Wasley about 1 month ago

If you update to the latest snapshot then you can try patch ID: cdb6c8ac8e65f98a2ac0fa469c963c055a5c522d

There are a couple of subsequent minor commits to that, but they are cosmetic and/or minor function call changes that do not affect the overall operation.

Try it and post back your results please.

#8 Updated by Luke Hamburg about 1 month ago

Thanks. I first checked out master and didn't find that commit... then drank some coffee & realized it's a PR still under review by Renato. Looks like it is ready to be merged. Will test shortly.

#9 Updated by Renato Botelho about 1 month ago

Luke Hamburg wrote:

Thanks. I first checked out master and didn't find that commit... then drank some coffee & realized it's a PR still under review by Renato. Looks like it is ready to be merged. Will test shortly.

PR has been merged, but there were a couple of minor problems there, fixed in 31677494e659768a12d134641bbd4453d2c0a03c

Also available in: Atom PDF