[CentOS] How to specify the default route?

Tue Jun 22 19:04:59 UTC 2010
Les Mikesell <lesmikesell at gmail.com>

On 6/22/2010 1: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?

It doesn't matter as long as there is only one.  You could just remove 
the GATEWAY line from ifcfg-eth1 and only specify it in ifcfg-eth0 since 
that is the only one that will work anyway.  The only reason to specify 
a GATEWAY on other interfaces would be if you sometimes have one active 
and sometimes another and each network has a router that will work as a 
default.

-- 
   Les Mikesell
     lesmikesell at gmail.com