On 12/11/2019 10:31 PM, Bruce Dubbs via lfs-dev wrote:
Recently Joel Bion sent us a hint that addresses setting static
ipv6 addresses in LFS.
http://www.linuxfromscratch.org/hints/downloads/files/IPv6-in-LFS.txt
Okay, I'm not subbed to hints, but I finally got a chance to take a look.
Short of the proposed changes in the ifup/ifdown, and the previously
mentioned use of /etc/sysconfig/network, I only found one little wrinkle
-- the hosts entries:
2001:DB8:1234::123:150 example.com
2001:DB8:1234::123:150 www.example.com (maybe)
::1 localhost ip6-localhost ip6-loopback ourserver
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Those should change to the following (assuming that example.com is both
the local and internal domain name):
2001:DB8:1234::123:150 ourserver.example.com www.example.com example.com
ourserver www
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
For the duplicate line:
man 5 hosts
Specifically read: IP_address canonical_hostname [aliases...]
Note also about the "ourserver" entry: I might be a little heavy handed
here, but this absolutely should not be placed on the loopback line for
IPv4 - While I haven't found this explicitly prohibited in RFC or any
official documentation (there really isn't any, it's implementation
specific), I also cannot find documentation that this is the case for v6
-- there is not an equivalent for 127.0.1.1 (loopback is a single
address rather than a /8). Even if you do not have an IPv4 address
available for the local network, you can still setup the IPv4 loopback
interface, so just use the v4 lookup if you need to separate the
hostname from the aliases (at least for now).This is not likely to
change. It's been brought up before, but went nowhere (every existing
implementation would have to change). See here for one attempt:
https://tools.ietf.org/html/draft-smith-v6ops-larger-ipv6-loopback-prefix-04
For the two removed entries review the RFC and the IANA Namespace:
https://tools.ietf.org/html/rfc4291and its update to the multicast
scopes at https://tools.ietf.org/html/rfc7346
and
https://www.iana.org/assignments/ipv6-multicast-addresses/ipv6-multicast-addresses.xhtml#ipv6-scope
^^ ff01:: is now reserved and ff02::3 unassigned. Yes, I know Debian has
these entries -- they need to remove them.
As to the scripts, I'm still mulling over how to address the single
interface configuration with multiple services and keep it backwards
compatible (Note: I'm actually ok with a single ip-service for both, but
service order and your concern about separating 2/3 is what I'm
referring to, as well as possibly the sysctl changes). I'm currently
using a subset of your changes on a fresh build, bash arrays are sloppy
and so is wrapping the whole of the if* scripts in a for loop. I'm being
super picky as I don't want to mess with it again for at least another
10 years! :-) I'm also studying for a vendor cert that my company needs,
so time is limited (I needed a break from the course work so chose this
- thanks for the goal).
Anyway, pick it apart, make it better. I hope this helps.
--DJ
--
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page