Re: IPv6 hooks
Andrew Cooks
Thu Jul 10 11:10:02 2014
Hi Roy
On Thu, Jul 10, 2014 at 5:35 PM, Roy Marples <roy@xxxxxxxxxxxx> wrote:
>
> For IPv4 there is only ever one address. For IPv6, well, there are quite a
> few!
Oh. Having multiple IPv4 addresses is common enough, but I didn't
realise that dhcp can only assign one and that dhcpv6 is different.
> DHCPv6 reasons have the suffix of 6
> BOUND6, REBIND6, REBOOT6, etc. They generally mirror the IPv4 reasons.
> In this instance, the addresses are held within IA options as an array
> dhcp6_ia_na1_ia_addr1=addr1
> dhcp6_ia_na1_ia_addr2=addr2
> dhcp6_ia_na2_ia_addr1=addr3
> dhcp6_ia_ta1_ia_addr1=addr4
> dhcp6_ia_pd1_ia_prefix1=prefix4
>
> Basically, each IA type can have more than one IAID assigned - for example
> one interface required for whatever reason two addresses, you could set two
> IAIDS.
> On the other hand, for your one IAID the server might want to hand you two
> addresses as well. The above format allows for this.
>
> For IPv6 Router Advertisements, there is just the ROUTERADVERT reason
> in this instance, all the current valid addresses from all routers are an
> array
> ra1_prefix=address
> ra2_prefix=address
Thanks. I think part of the problem is that I've been using Router
Advertisement (with radvd) and don't understand the relationship
between RA and DHCPv6 properly yet. I'll have to configure another
VLAN with DHCPv6 and without RA for more tests.
The second part that I don't understand yet is whether it's not
feasible to track all RA-assigned addresses or not dhpcd's concern
what those addresses are.
> For the dhcpcd-dbus and dhcpcd-ui projects we only look at the 1st NA
> address.
I wasn't aware of dhcpcd-dbus, so I'll definitely have a look. Does
either dhcpcd-dbus or dhcpcd-ui track enough state to be able to
report changes to RA-assigned addresses?
> Others whilst may exist, typically they won't in real world usage. If they
> do, the chances are you won't be running a GUI on the device itself, web
> front end maybe.
The device I'm working on has both an LCD display and a web interface.
One part of the use case is to report the new address to the user when
a cable is plugged in. So, while the user can go nuts with address
assignment, we'd still like to report something sensible. We report
only the first IPv4 address and first global scope IPv6 address
through the event mechanism, but the complete list is in a menu if the
user needs to see all of them.
Since dhcpcd made everything so elegantly simple with link detection,
static addresses and ip4ll, I was hoping that IPv6 RA could be
similar. If not, I'll create a little script to track all RA assigned
addresses, but I think that state should be kept out of the
applications, if possible.
Thanks for the great software and the help!
a.
Archive administrator: postmaster@marples.name