Zeroconfig and Multicast DNS
Pat Lashley
patl+freebsd at volant.org
Thu Aug 24 19:22:14 UTC 2006
> > > There is also an option to force it to assign
> > >(as an alias) a LLA address even if the interface is already is
> > >configured with another address.
> >
> > I think that I'd reverse the default on that. There should normally be no
> > harm in having an LLA address, as long as we've got the non-LLA preference
> > stuff working correctly. It is quite likely that the LLA address would
> > never actually be used; but so what?
>
> Unless we modify the IPv4 routing code to actually know that different
> interfaces with LLAs are on different subnets, we will need to insure
> that there is only one interface with an LLA on it at once. The
> modification probably makes sense, but I have no idea what it would
> entail.
Actually, it is quite possible for multiple interfaces to be on the same LLA
link/subnet; so we can't make any assumptions either way. We -do- need to be
able to handle the case where they are on different links. That really isn't
an 'unless', it's a 'when'.
We also need to be able to handle the case where they are on physically
different links; but the host is acting as a bridge between them to make one
logical link sharing a single LLA subnet. (We don't need to explicitly handle
the case where the bridging is being handled externally because that should be
virtually indistinguishable from a single physical link.)
Our lla daemon should be tracking -all- LLA ARP requests/responses on the
interfaces on which it is active. So, over time, the system will normally
collect a fairly complete set of IP address <-> MAC mappings for each
interface. There's no reason why the lla daemon shouldn't add those mappings
to the routing table as it discovers them. (And remove them if they time
out...) And that should make it easy to detect which interfaces are on the same
link.
So the issue mainly arises with the case where we want to open a connection to
a host/service for which we have a mapping to an LLA IP address; but no mapping
to a MAC address. In that case, I think we need to send an ARP request on each
distinct local link for which we are using LLA. If there are multiple
interfaces connected to that link, we can choose one arbitrarily.
I think this all means that for a multi-homed host, we should not automatically
add a route for the 169.254/16 network. Instead, we should just add specific
/32s as discovered; and use ARP when we need to find a new 169.254.x.y -> MAC
translation.
There still remains the possibility of multiple distinct hosts having the same
LLA IP address on separate local links; each attached to a separate interface.
In practice that situation should be sufficiently rare that we can afford to
ignore it until someone comes up with some clever way to handle it. (Or we all
move to IPv6 and it becomes moot.)
-Pat
More information about the freebsd-net
mailing list