Are there any RFCs for address selection for IPv4

Rodney W. Grimes freebsd-rwg at gndrsh.dnsmgr.net
Mon Apr 26 13:50:20 UTC 2021


> Zhenlei Huang writes:
> 
> > Reading RFC 3927 2.7, it states link-local addresses are not routable. The router shall
> > discard those packets from or to link-local addresses. Then it make no sense for a host
> > to select link-local address as source address when it initialize a connection, except for 
> > an edge case that the destination is also link-local address.
> 
> As I understand it, it only makes sense let the kernel select a LL address under two
> conditions:
I take it you mean for IPv4 only?

> A) The destination is also LL *or* multicast

Agree, this is pretty clear from specs.

> 
> B) There is only one "UP" interfaces with an LLA.

This I am not clear on.  RFC 3927 does bring up some of the
problems, and possible solutions, for a multihomed situation
with LL addresses.  Section 3.2

> 
> Implementing the second criteria runs into us putting a (IPv6)LL
> on the loopback interface.
Huh?  We already do that.

> 
> Does anybody know why we put a (ipv6)LL on loopback interfaces ?

I believe someplace in the bowls of all the IPv6 specs this
is a requirement.  I could not find it quickly though.


Question:  Should we allow a route to have a next hop of a LL(ipv4)?
Reason:  RFC3927 2.6.2:
	The host MUST NOT send a packet with an IPv4 Link-Local destination
	address to any router for forwarding.

So, arguably, it is a violation to allow the default route to have
a LL next hop for ipv4.  For that matter, it is a violation to allow
ANY ipv4 LL address to be the next hop in the routing table(s).


-- 
Rod Grimes                                                 rgrimes at freebsd.org


More information about the freebsd-hackers mailing list