2

I got my IPv6 prefix via dhcpv6 (/48) on my personal (OpenBSD) router. So the inside interface get partially configured by dhcpv6. I would like to know if it's possible to define the host part of it.

Here is my dhcp6c.conf:

interface re0 {
send ia-pd 0;
send ia-na 0;
send rapid-commit;
};

id-assoc na 0 {
};

## https://www.azabani.com/2015/08/06/modern-openbsd-home-router.html
id-assoc pd 0 {
    prefix-interface re2 {

    ## I want prefix:: as address.
    sla-id 0;

    ## prefix provided by isp is /48, I want my lan to be /64, so I  reduce by 16.
    sla-len 16;
    };
};

And here is the re2 (lan interface) addresses :

    stephane@mirror:/home/stephane ifconfig re2 inet6
    re2: flags=8b43<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500
    lladdr 00:0d:b9:3e:a8:12
    index 3 priority 0 llprio 3
    media: Ethernet autoselect (100baseTX full-duplex,rxpause,txpause)
    status: active
    inet6 fe80::20d:b9ff:fe3e:a812%re2 prefixlen 64 scopeid 0x3
    inet6 fd00:2016:22:dec:: prefixlen 64
    inet6 2a06:4000:1576:: prefixlen 64
    inet6 2a06:4000:1576:0:20d:b9ff:fe3e:a812 prefixlen 64

The ula address is defined as static address in conf'. The 2a06:4000:1576:: address is also defined statically but I would like it to be really automatic.

The 2a06:4000:1576:0:20d:b9ff:fe3e:a812 comes out of dhcpv6 conf' and I see the network part is automatic (/48 prefix + 0 as assigned in dhcp6c.conf). The host part is definitely slaac. This host part I would like to replace to ::

Do you know the way to do it (out of statically define it)?

1

Just found out the solution :

I need to use the ifid option.

https://www.mankier.com/5/dhcp6c.conf#Prefix_interface_statement

Here is the code I would like to use :

id-assoc pd 0 {
    prefix-interface re2 {
    sla-id 0;

    ## prefix provided by isp is /48, I want my lan to be /64, so I reduce by 16.
    sla-len 16;

    ifid 0;
    };
 };

But the version of dhcp6c provided to my OS (OpenBSD) does not include this option (yet ?).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.