-   Linux - Server (
-   -   multiple gateways (

Laurkin 07-05-2007 05:22 AM

multiple gateways
I run Centos 4.5 and our network is laying new servers down my problem is that i need to change default gateways each time i need to access the new servers and back again to access the old ones if i keep it on the new gateway i can't get mail is there help out there i use one network interface

acid_kewpie 07-05-2007 05:33 AM

please explain your topology more effectively, how are we supposed to know what "old servers" and "new servers" mean in terms of a network architecture??

jschiwal 07-05-2007 07:12 AM

I'm guessing that the two sets of servers are on different subnets, and both subnets are different from your own. A default gateway is for IP addresses that don't match any route. Setup a route for each subnet.

So, imagine that the old servers are on the subnet, and the new ones are on the subnet.

Destination    Gateway        Genmask        Flags    *      U  UG  UG                     
loopback        *          U   
default        UG

Laurkin 07-06-2007 09:01 AM

we run a network with a certain IP range ie: (old)
we have started to rename our servers to
now for me to ping i use one gateway to ping the other i need to change my gateway
until we reach a point where all are the same

acid_kewpie 07-06-2007 09:14 AM

please help us to help you... how do these two networks relate to the client machine here?? what does your LAN look like?? please provide info you think is useful, not just short answer to each specific question that is asked.

Laurkin 07-06-2007 09:20 AM

I work in our headoffice
we have +- 30 branches
so if we work in the "old servers" our gateway must be
but to work in our "new servers"we must change our gateways to and visa versa which at this point in time takes time and we have more than one situation where two branches contact us with the same problem and to sort them out we need to change our gateways and people can understand but it looks like i have sorted it out

Laurkin 07-06-2007 09:48 AM

ok not working

tjyorkshire 07-07-2007 05:40 PM

i'm confused here, is it working or not now?

Laurkin 07-09-2007 01:50 AM

not working the way in need it to work
i can get into our servers like i want but then my email is not connecting

acid_kewpie 07-09-2007 03:09 AM

yeah you still seem to be refusing to give useful information about how these machines work,. why can't you just explain the topology? is it a secret? you can't just say "the gateway needs to be xyz" you need to explain why it needs to be that, is there a different router going against the default route towards the internet or what??

in general you should be able to just put in a more specfic route for a given subnet e.g. "route add -net gw" i.e. to get to network your netxt hop is actually

tjyorkshire 07-10-2007 08:10 AM

from what i can see at the moment, it should just be a case of changing the routing table . . . but like acid_kewpie said, a little more info on the topology would help a lot!

How about you give us your routing table when you're connected to each gateway? Then maybe we can figure out a new one for you to use that might work

Laurkin 07-11-2007 01:29 AM

Thanks guys got it sorted finally just added a new directory did a bit of fine tuning and she is now working

acid_kewpie 07-11-2007 03:47 AM

a new directory?? wtf? :confused:

tjyorkshire 07-11-2007 12:38 PM

what like a folder directory....???? i agree - wtf! :scratch:

Laurkin 07-12-2007 01:36 AM

first i had to create the directory as it was not there by:
touch /etc/sysconfig/network-scripts/route-eth0
then i edited by defining which gateway must be used for which ip range
and then she works very very nicely
and now i can work faster than before as i now don't need to change my gateways at all

acid_kewpie 07-12-2007 04:26 AM

so you just did what we advised. super.

All times are GMT -5. The time now is 03:11 AM.