That's the default route for the system. If you get rid of it, the system doesn't know how to communicate with anything that's not on one of the subnets that it is directly connected to.
The only thing you can do is set up static routes for each subnet that you want to have go over a specific network. For example, we configure all of the possible backup network traffic (traffic to any of our backup servers) to go over a specific interface. All other traffic goes out over the "front" of the machine. We do this via a service that we install. Looking at the /etc/sysconfig/network-scripts/network-functions script, I found reference to setting up a /etc/default-routes file but I've never used that and it seems to remove that file after setting the routes so I'd be cautious about relying on it. Maarten Broekman Fidelity | Investment Management Technology Enterprise Platform Services Office: (617) 563-9756 Cell: (617) 590-8005 Skytel Pager PIN: 1062517 Email: [EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Thursday, July 24, 2008 12:19 PM To: [email protected] Subject: RE: [rhelv5-list] problem with multiple interfaces not a router 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 _______________________________________________ rhelv5-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/rhelv5-list
