[CentOS] How to specify the default route?

Tue Jun 22 18:51:28 UTC 2010
Rick Thomas <rbthomas at pobox.com>

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.