It's especially important with IPv6 addresses to include the CIDR-style prefix length when assigning an IPv6 address to an interface. The net.example file contains: # You can also use IPv6 addresses #config_eth0=( # "192.168.0.2/24" # "4321:0:1:2:3:4:567:89ab" # "4321:0:1:2:3:4:567:89ac" #) This should look more like: # You can also use IPv6 addresses with prefix lengths #config_eth0=( # "192.168.0.2/24" # "4321:0:1:2:3:4:567:89ab/64" # "4321:0:1:2:3:4:567:89ac/64" #) If this isn't done, the prefix length will be assumed to be 0, which fubars ipv6 routing. The route table will contain a default route with a next hop of "::", a null address, and ipv6 packets won't get off of the box. Even if a default route is picked up by a route advertisement from the network gateway, this route will be appened to the routing table _after_ the bogus null route and won't be used until the bogus route is pulled from the routing table. It might be a good idea to defaut the prefix length to 128 in the network setup rather than 0 if no prefix length is specified in the spec in /etc/conf.d/net. I'm not sure, but I expect that this would solve the technical problem, although since IPv6 addresses generally require a prefix in their spec, it would probably be best to provide a hint by suggesting this usage in net.example. This bit my butt for several hours today until I noticed the zero-length prefix in the interface table.
I've updated the documentation accordingly. AFAIK IPv6 addresses without a prefix are valid as they default to /0 Will be in baselayout-1.12.0_pre9
(In reply to comment #1) > I've updated the documentation accordingly. This oughta solve the problem :-) > AFAIK IPv6 addresses without a prefix are valid as they default to /0 Yes, they default to /0. I'm no IPv6 expert, but this doesn't make a whole lot of sense to me. Under what conditions could any address on the Internet have a netmask or prefix length of 0? This means that there is no gateway for the address. A default prefix length of /128 might make more sense since this would spec a point-to-point address. The practical problem with having a default prefix length of 0 is the bogus null gateway that gets put into the routing table, which fubars routing. It took a bit of digging to find out where this bogus entry was coming from. IPv6 addresses without a prefix length are valid addresses, but they're basically an incomplete spec for almost all configuration purposes. If you're using the address as a target for a connection, that's another matter. > Will be in baselayout-1.12.0_pre9 Thanks!
(In reply to comment #2) > Yes, they default to /0. I'm no IPv6 expert, but this doesn't make a whole lot > of sense to me. Under what conditions could any address on the Internet have a > netmask or prefix length of 0? This means that there is no gateway for the > address. A default prefix length of /128 might make more sense since this would > spec a point-to-point address. If I'm reading IPv6 how-to's correctly /0 is localhost only - which some people may require. I'm also loath to change defaults unless really necessary.
That makes sense. IPv6 localhost addresses are added to the routing table at boot time. I'm not sure what component does this, but I assume it's the net startup script. These are given names by the default /etc/hosts file which is also set up by the base layout, so all is in order there. There may be RFC support for assuming a null prefix length if it's not specified in configuration, I don't know. Basically, changing the suggested usage is net.example will solve the problem about which I posted this bug originally :-) Thanks for your attention to this.
(In reply to comment #4) > That makes sense. IPv6 localhost addresses are added to the routing table at > boot time. I'm not sure what component does this, but I assume it's the net > startup script. Actually it's the kernel.
Fixed in pre9