One way to accomplish setting up the static routes is to create
/etc/sysconfig/network-scripts/route-eth2 as outlined in
/usr/share/doc/initscripts-<version>/sysconfig.txt. This will send all
traffic destined for the eth2 network out eth2. You can put the
GATEWAY= for the eth0 interface into /etc/sysconfig/network. So your
default would be to send traffic out eth0, except for traffic destined
for eth2's network. I try to avoid putting GATEWAY= into the
/etc/sysconfig/network-scripts/ifcfg-<interface> files precisely
because of the potential problem outlined below: the last interface up
becomes the default gateway.

Robert

On Thu, Jul 24, 2008 at 10:19 AM,  <[EMAIL PROTECTED]> wrote:
>
> Yes that is exactly what we are seeing.   How do you get rid of the interface 
> using the 0.0.0.0 as the gateway?  When we removed that the interface didn't 
> work at all.  If we left it in place it would ignore the additional gateway 
> and use the 0.0.0.0 instead, which of course ends up going out the default 
> interface gateway.
> Thanks
> Daniel
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Broekman, 
> Maarten
> Sent: Thursday, July 24, 2008 12:09 PM
> To: Red Hat Enterprise Linux 5 (Tikanga) discussion mailing-list
> Subject: RE: [rhelv5-list] problem with multiple interfaces not a router
>
> And you have "GATEWAY=" in each of the ifcfg-eth# files right?  If you
> do, then the problem is that when you bring up eth0, the system sets up
> the default route to point at the GATEWAY= entry in ifcfg-eth0.  Then,
> when the system brings up eth2, it sets the default route to point at
> the GATEWAY= entry in ifcfg-eth2.  The end result is that the default
> route for the system is set to the gateway for eth2.  If you want the
> default route to be different from the gateway for the last interface,
> you need to set the gateway in /etc/sysconfig/network.  Then, set up a
> separate init script that configures static routes appropriately for
> each interface.
>
> We've seen the same problem on RHEL3, RHEL4, and RHEL5 and this was the
> only way we have been able to get around it.
>
> -Maarten Broekman
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
> Sent: Thursday, July 24, 2008 12:02 PM
> To: [email protected]
> Subject: RE: [rhelv5-list] problem with multiple interfaces not a router
>
> Ok to stay consistent:
> Eth0 120.207.7.245
> Eth2 120.207.17.22
>
> I am testing from:
> 120.207.6.11
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Mark Watts
> Sent: Thursday, July 24, 2008 11:58 AM
> To: Red Hat Enterprise Linux 5 (Tikanga) discussion mailing-list
> Subject: Re: [rhelv5-list] problem with multiple interfaces not a router
>
>
> On Thursday 24 July 2008 16:54:55 [EMAIL PROTECTED] wrote:
>> This was not the case.  Traffic from eth0 tried to go out eth2
> traffic out
>> of eth2 went out eth2.  If I reversed the default gateway we saw the
>> reverse.  If I removed the default gateway it simply stopped talking.
> What
>> I want is to isolate the two interfaces.  I would like to set a
> gateway for
>> each interface.  Is this not possible in linux? Daniel
>
>> What IP Address are you testing _from_ ?
>
> Please answer this question first.
>
> Mark.
>
> --
> Mark Watts BSc RHCE MBCS
> Senior Systems Engineer
> QinetiQ Applied Technologies
> GPG Key: http://www.linux-corner.info/mwatts.gpg
>
> _______________________________________________
> rhelv5-list mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/rhelv5-list
>
>
> _______________________________________________
> rhelv5-list mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/rhelv5-list
>
> _______________________________________________
> rhelv5-list mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/rhelv5-list
>



-- 
----
Robert Wehner
[EMAIL PROTECTED]

_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to