So I tried moving the GATEWAY clause into etc/sysconfig/network and out of the individual ifcfg-eth? files. It works.
So I guess that's the preferred solution, because it puts the information in a single place. There's no need to make sure two or more places are synchronized if anything changes.
Thanks to all!
Rick
On Jun 22, 2010, at 2:51 PM, Rick Thomas wrote:
Thanks! to all who replied.
I solved it by putting identical "GATEWAY=" clauses in each of
/etc/sysconfig/networking/devices/ifcfg-eth0 /etc/sysconfig/networking/devices/ifcfg-eth1
This works without error, even though the gateway IP address in question is not accessible from eth1.
I haven't tried taking the GATEWAY clause(s) out of the ifcfg files and moving it to the /etc/sysconfig/network file alone. Does anybody know if that's the preferred configuration option?
Thanks!
Rick
El lun, 21-06-2010 a las 19:57 -0400, Rick Thomas escribió:
I have a machine with two net interfaces.
it seems to always pick the wrong one (eth1) as the default route.
I can change it with
route del default route add default eth0
after it's up (or in rc.local, of course), but I'd like to figure out what I need to do this "the CentOS way" (e.g. edit some configuration file? Run some config utility, what?) once and for all.
Can somebody point me to the canonical documentation on the subject? I've searched /usr/share/doc and the man pages, but I can't find anything useful.
Googling for "default route centos" gives some interesting stuff, but nothing definitive.