Suppose you have the following in /etc/conf.d/net: config_eth0=( "192.168.52.147 netmask 255.255.255.248 brd 192.168.52.151" ) routes_eth0=(" default gw 192.168.52.145") Looks like a working config, doesn't it? The gateway is reachable and all. The routing table looks okay, too: [root@ganesha ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.52.144 0.0.0.0 255.255.255.248 U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 192.168.52.145 255.255.255.255 UG 0 0 0 eth0 Except: it isn't okay. The machine is not reachable from other nets and can't connect to anything outside its own net. The usual error is "Net unreachable". Note the slightly different routing table that makes things work: [root@ganesha ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 194.97.52.144 0.0.0.0 255.255.255.248 U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 194.97.52.145 0.0.0.0 UG 0 0 0 eth0 The ip/mask for the default route should be 0/0, not 0/32 (as above). Further investigation found that the culprit is the leading space on the default-route config line. Changing routes_eth0=(" default gw 192.168.52.145") to routes_eth0=("default gw 192.168.52.145") makes the init scripts create the correct route (0/0) instead of one that only looks correct at first sight (0/32). I think this should be corrected. Leading (and trailing) spaces on the config strings can be easily stripped and shouldn't result in different behaviour. In this case the result was very confusing to boot. (Note: route without -n would have helped finding it earlier. However, the DNS server wasn;'t reachable so it seemed the natural thing to do.)
Oops. please ignore the changing first two octets in my examples. I wanted to hide the original IPs. oh well.
Created attachment 117698 [details, diff] Trim leading spaces Does this patch fix things for you?
Yes, looks good. Can't reproduce the 0/32 "default route" problem with that patch applied to lib64/rcscripts/net/ifconfig.sh Thanks!