Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Apr 2021 06:50:10 -0700 (PDT)
From:      "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        Zhenlei Huang <zlei.huang@gmail.com>, "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>, freebsd-hackers@freebsd.org
Subject:   Re: Are there any RFCs for address selection for IPv4
Message-ID:  <202104261350.13QDoA0E097896@gndrsh.dnsmgr.net>
In-Reply-To: <8834.1619373361@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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@freebsd.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104261350.13QDoA0E097896>