Are there any RFCs for address selection for IPv4

Rodney W. Grimes freebsd-rwg at gndrsh.dnsmgr.net
Mon Apr 26 14:56:38 UTC 2021


> --------
> Rodney W. Grimes writes:
> 
> > > 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.
> 
> I'm not seeing Linux doing it for instance ?

I'll investigate further and see if I can discover why we
do this, if it is or isnt in spec, etc.

> 
> > 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).
> 
> You are reading that wrong.

Yep

> 
> It is OK to have a LL as next-hop.
> 
> It is not OK to send a packet with dst=LL to any next-hop.

No, that is explicity forbidden:
RFC 3927 at 2.7 paragraph 2:

   An IPv4 packet whose source and/or destination address is in the
   169.254/16 prefix MUST NOT be sent to any router for forwarding, and
   any network device receiving such a packet MUST NOT forward it,
   regardless of the TTL in the IPv4 header.

If dst=LL you must ARP for the destination is also in the
spec some place, no routing allowed.

Now if you had said dst != LL to any next-hop, that would
be true.

> -- 
> Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
> phk at FreeBSD.ORG         | TCP/IP since RFC 956
> FreeBSD committer       | BSD since 4.3-tahoe    
> Never attribute to malice what can adequately be explained by incompetence.
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
> 

-- 
Rod Grimes                                                 rgrimes at freebsd.org


More information about the freebsd-hackers mailing list