Project

General

Profile

Actions

Bug #6880

closed

Multiple DHCP6 WAN connections leads to multiple dhcp6c clients

Added by Roy Hooper about 8 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Viktor Gurov
Category:
DHCP (IPv6)
Target version:
Start date:
10/28/2016
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
22.05
Release Notes:
Default
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


Related issues

Related to Bug #12823: Multiple DHCP6 WAN connections PPPoE interface 'defached' statusNew

Actions
Related to Bug #13253: ``dhcp6c`` is not restarted when applying settings when multiple WANs are configured for DHCP6ResolvedJim Pingle

Actions
Has duplicate Bug #13353: DHCPv6 (still) doesn't work properly with multiple interfacesDuplicate

Actions
Actions

Also available in: Atom PDF