Hi, I ocassionally face the problem that the net.eth0 does not get IP address assigned. I know you move to new file format with iproute2. I don't use anything fancy, so I thought let's make the warnings quiet and use the new net.example as the template. However, I made something wrong (I don't use IPv6). vrapenec ~ # cp /etc/conf.d/net /etc/conf.d/net-ok vrapenec ~ # cp /etc/conf.d/net.example /etc/conf.d/net vrapenec ~ # vim /etc/conf.d/net vrapenec ~ # /etc/init.d/net.eth0 pause * Caching service dependencies ... [ ok ] * Stopping eth0 * Bringing down eth0 * Shutting down eth0 ... [ ok ] vrapenec ~ # rc * Starting eth0 * Bringing up eth0 * 192.168.0.2 [ ok ] * Adding routes * default via 192.168.0.1 ... [ ok ] * ::/0 ... RTNETLINK answers: Invalid argument [ !! ] vrapenec ~ # vrapenec ~ # grep -v "^#" /etc/conf.d/net config_eth0=( "192.168.0.2 netmask 255.255.255.0" ) routes_eth0=( "default via 192.168.0.1" "::/0" ) vrapenec ~ #
Commenting out the line with ` "::/0"' did indeed help for my IPv4 setup. Probably you want to add IPv4 prepared routing example as well and improve the error handling.
Well, baselayout version missing and I don't see why are you setting up IPv6 route if you are not using IPv6 at all...
There is only IPv6 example how to setup the route. I propose someone adds also the IPv4 example. I use sys-apps/baselayout-1.12.0_pre11-r3.
The example has two default routes - one for IPv4 and one for IPv6. Are you actually suggesting that we split this example into two examples and clearly label each? # Here's how todo routing if you need it - the below sets the default gateway # and eth0 to be the default route for IPv6 unicast addresses #routes_eth0=( # "default via 192.168.0.1" # "::/0" #) maybe if we changed it to # Here's how todo routing if you need it - the below sets the default IPv4 # gateway on eth0 and sets eth0 to be the default route for IPv6 unicast # addresses. #routes_eth0=( # "default via 192.168.0.1" # "::/0" #)
Hi Roy, just add another section and label it as being for IPv4. Or advise people to comment out the "::/0" if they use only IPv4 networks.
shouldn't there be an example of how to add extra, non-default routes?
# # WARNING :- some examples have a mixture of IPv4 (ie 192.168.0.1) and IPv6 # (ie 4321:0:1:2:3:4:567:89ab) internet addresses. They only work if you have # the relevant kernel option enabled. So if you don't have an IPv6 enabled # kernel then remove the IPv6 address from your config. # .... # Here's how todo routing if you need it #routes_eth0=( # "default via 192.168.0.1" # IPv4 default route # "10.0.0.0/8 via 192.168.0.1" # IPv4 subnet route # "::/0" # IPv6 unicast #) Happy with this?
I'd be happy with that if it states that I'm supposed to pickup only one of the three lines. Sorrry for my ignorance, but have never used IPv6. For dummies I'd recommend to split it into 3 distinct examples. But in any case it's a step forward! Thanks!
Fixed in baselayout-1.12.0_pre12