Joined: 24 Dec 2010
|Posted: Fri Dec 24, 2010 1:38 am Post subject: Gentoo doesn't set up route for newly added interface?
|When I don't have any Gentoo config for bnep0, plus have notplugging disabled (RC_PLUG_SERVICES="!net.*"), I can do following the interface (once it's upped by bluez):
# ifconfig bnep0 192.168.30.1
Expactably, that also creates a route so I could access devices on this network:
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.30.0 0.0.0.0 255.255.255.0 U 0 0 0 bnep0
However, when enabled hotplugging for bnep0, and set Gentoo config using:
config_bnep0=( "192.168.30.1" )
, I don't have such implied route created (IP is assigned of course), and really cannot use interface without further manual configuration.
After half an hour of googling, re-reading Gentoo network docs, and trial and error, I figured that additional
routes_bnep0=( "192.168.30.0/24" )
does the trick for me.
Hence the questions:
1. How it happens that Gentoo doesn't do what user expects from it - configure interface to the working state, like other well-known tools do?
2. How it happens that Gentoo network docs (http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4) not only don't mention requirement of explicit route config for static IPs, but don't describe routes_* config option at all (there're occurances in examples, nothing more).
3. How to do it better. I don't want to have extra config line, especially with dupped IP address. Is there a way to say something like
config_bnep0=( "192.168.30.1" "auto-route" )