[ydl-gen] default gateway on 6.1 - how?
Florin Andrei
florin at andrei.myip.org
Fri Feb 6 01:44:08 MST 2009
Florin Andrei wrote:
>
> I know I could just do a "route add -net default ..." in rc.local and
> thus patch it up, but I want to know what is the "official" way to
> define the default gateway on YDL 6.1, if it's different from the RH way.
I did some troubleshooting and it all seems to boil down to a command in
/etc/sysconfig/network-scripts/network-functions in the function called
find_gateway_dev()
ip route get to "${GATEWAY}"
Normally, this command works fine if I run it after the system has
finished booting up. But it doesn't seem to work correctly while the
system is still booting up, the ip utility throws an error at that time:
RTNETLINK answers: Network is unreachable
This is because at that time the interface is not yet configured - I
hacked the script and added an "ifconfig eth0" at that point and this is
the result:
eth0 Link encap:Ethernet HWaddr XXXXXXXXXXXXXXXX
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:852 errors:0 dropped:0 overruns:0 frame:0
TX packets:826 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:59474 (58.0 KiB) TX bytes:95893 (93.6 KiB)
Interrupt:52
I'll have to stop here because it's late and I need to go to sleep, but
this is quite puzzling. If these scripts were forklifted from Red Hat /
CentOS, I know they work fine on those distributions, then why they
don't on YDL?
Is it possible that the interface is still "settling" and will
eventually show the correct address? That means a delay is needed somewhere.
Or is it simply not configured yet at that time - but that means it's a
bug in the scripts. It's too late for me now to follow the logic of all
the network scripts.
BTW, I forgot to backup /etc/sysconfig/network-scripts/network-functions
and it's hacked pretty badly - I'll have to restore it from an RPM.
grrrrr :-(
--
Florin Andrei
http://florin.myip.org/
More information about the yellowdog-general
mailing list