tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ndp(1) and arp(1) enhancements for easier scripting of IPv6 prefix delegation



OK, right after posting I fetched a coffee - and then the obvious solution
was clear and most of this post is bogus:

> This alogrithm is not quite stable. It assumes building public
> addresses from IPv6 prefix via mac (in dhcpcd terms: slaac hwaddr) --
> which is OK in my case as I only do it for NetBSD hosts under my
> controll;

That part is true but also gives the easy answer (see below)

> but (far worse) it assumes the host has already updated the
> public address after the RA told it about the new prefix.

.. but this is not true. Actually it was the original reason I used the
link local addresses to query the suffix. The public addresses have shorter
expiry time and are often not available in ndp -a output, but given the other
requirement the suffix attached to the new prefix will always be valid (or
become valid soonish).

So what I am going to do is:

 - remove the arp/ndp usage from the main script run at prefix change time

 - create a table of { hostname, suffix } pairs and iterate over those,
   just using ${prefix}::${suffix} as address

Then I'll move the arp/ndp part to a separate script that updates the
full table in the other script. This "update the script" script will
only be run manually whenever a new host is added or a MAC address
changes. Since that other script is rarely run, it may be as complex as
needed and no changes to arp(1) or ndp(1) are required.

Martin


Home | Main Index | Thread Index | Old Index