openwrt / odhcpd

This repository is a mirror of https://git.openwrt.org/?p=project/odhcpd.git. Pull requests will be accepted which will be merged in odhcpd.git
GNU General Public License v2.0
160 stars 96 forks source link

local address assignment issue with IPv6 PD #147

Closed madires closed 4 years ago

madires commented 4 years ago

Hi!

While setting up IPv6 PD with OpenWRT 18.06.4 I found several issues. This one is about the address assignment for router interfaces. The ISP provides a /56 prefix via PD and the IPv6 assignment length for the LAN interface is set to /62 because a downstream router on the LAN needs a /63 prefix. Unfortunately the LAN interface gets a /62 address assigned instead of /64: inet6 2003:a:b:c00::1/62 scope global dynamic

But the route entry is correct: 2003:a:b:c00::/64 dev br-lan metric 1024

The network size of the assigned address follows the IPv6 assignment length for the interface. IMHO, the address assigned should always have a network size of /64 or, if supported, whatever is configured.

Cheers, Markus

dedeckeh commented 4 years ago

This behavior is on purpose as netifd installs the IPv6 address on the lan with the delegated prefix; odhcpd picks up the IPv6 address with the associated prefix length and if the prefix length is smaller than 64 sub-prefixes can be derived to perform prefix delegation to LAN devices

madires commented 4 years ago

Hi!

I see, it's a workaround for a broken concept. It would be nice if both teams (netifd and odhcpd) would work together and implement a proper solution.

Cheers, Markus