On 12/9/2019 4:35 AM, jpb...@westvi.com wrote:
Hi -

How you want to incorporate IPv6 into LFS is your choice, of course - my goal was to provide a 'nudge' to actually incorporating it, as I think it needs to be included.

Nudge accepted. Thank you. :-)

For example, I agree that the /etc/sysconfig/network file is annoying and can be easily ignored. If someone runs into that need (which is highly unlikely) they can deal with it. I also agree that no specific DNS provider should be mentioned in any reference to resolv.conf - my note I emailed indicated what I, in particular, did.

My comment was in reference to the book, not your hint. We list Google's IPv4 addresses in a note box.


Having said that, I admit to confusion as to the suggestion to use an interface alias for the IPv6 configuration, because the concept no longer exists in iproute2.Interface aliases are a concept from net-tools, last updated (outside of BSD) in 2011, and the new Linux package, iproute2 (which is what LFS uses) doesn't provide such functionality, because it natively allows multiple addresses on a single interface, without needing the interface alias concept. In fact, supporting IPv6 requires this. (Yes, ipconfig is still used in BSD - but not Linux.)

It still exists, but it is only there for backwards compatibility. I had forgotten that as I hadn't used it in a long time. Thank you for bringing it to my attention. We should probably consider killing the ifup/ifdown dependency on the full name of the configuration file. Grab `for IFACE in $@; do ls /etc/sysconfig/ifconfig-${$IFACE}{,.*} | sort -u;....` or some such (and 'sort -ur' for ifdown), that way you can do something like 'ifup eth0 eth1' if desired (drop a continue in there for *.bak). I'll take a quick look at it in a couple of days unless you (and no pressure here, just offering if you'd like since it is already fresh in your memory), or somebody else has a quick suggestion.


So, the creation of 'ipv46-static' followed from a chain of requirements. There could definitely be a flaw in the chain of reasoning shown below, but I don't see that.

a) We use iproute2, not net-tools.
b) iproute2 doesn't have interface aliases - and the use of 'labels' to try to 'feel like it' is a very ugly concept and doesn't mesh well with the needs of /sbin/if[up,down] etc. c) the network configuration model of LFS is a directory of per-interface files named "ifconfig.<interfacename>' that are referenced by the 'network' script in /etc/init.d d) (b) and (c) combine to make it necessary that all of an interface's network configuration be in one file, such as ifconfig.eth0 e) The "networks" script used by 'ifup' and 'ifdown' reference a *single* service script. f) (d) and (e) combine to require a script combining both IPv4&IPv6 - ipv46-static.

All of the above is incorrect in that the functionality still exists, but again, I had no idea that it was only there for backwards compatibility. I had also forgotten that the ":x" get's dropped. I'm thinking we should use ifconfig-${1}{,.whatever_except.bak}.
I'll add one other reason: Some other packages that reference netfilter


I don't think that is valid as it drops the extension, but perhaps I'm misunderstanding. Either way, ifup and ifdown need a little TLC - good catch there.

The reason for changes in "/sbin/ifdown" can now be understood: /sbin/ifdown will bring the interface *down* if no non-local/non-link-local addresses exist on it after at the end of running the "service" script. I did this because this (in my mind) most approximates what a user would want to see if they type "ifdown eth0"

I hope this note better explains why I created ipv46-static.

Oh, it does. Thanks for the detailed explanation. I'm still of the mind that they should be separated, but your choice of having a separate dual-stack service file makes much more sense now. Again, for the additional text in the book, I'd use the private range fdxx::/8 (this is the closest equivalent to 10.0.0.0/8, private, not routable, don't inadvertently open to the outside world, etc.). Something like fd12:3456:789a:1::2/64. Regardless of whether the static example goes into the book, at very least, disabling RD should be mentioned (a potential security threat if your router is not setup correctly).

--DJ

--
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to