LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   multiple gateways (https://www.linuxquestions.org/questions/linux-server-73/multiple-gateways-566776/)

Laurkin 07-05-2007 04: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 04: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 06: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 192.168.1.0 subnet, and the new ones are on the 192.168.2.0 subnet.
Code:

Destination    Gateway        Genmask        Flags
192.168.0.0    *              255.255.255.0  U   
192.168.1.0    192.168.1.1    255.255.255.0  UG   
192.168.2.0    192.168.2.1    255.255.255.0  UG                     
loopback        *              255.0.0.0      U   
default        192.168.0.1    0.0.0.0        UG


Laurkin 07-06-2007 08:01 AM

we run a network with a certain IP range ie: 10.98.1.1 (old)
we have started to rename our servers to 10.9.1.1(new)
now for me to ping 10.98.1.1 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 08: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 08:20 AM

I work in our headoffice
we have +- 30 branches
so if we work in the "old servers" our gateway must be 10.98.1.1
but to work in our "new servers"we must change our gateways to 10.9.1.1 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 08:48 AM

ok not working

tjyorkshire 07-07-2007 04:40 PM

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

Laurkin 07-09-2007 12: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 02: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 192.168.1.0/24 gw 192.168.2.3" i.e. to get to network 192.168.0.1/24 your netxt hop is actually 192.168.2.3

tjyorkshire 07-10-2007 07: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 12: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 02:47 AM

a new directory?? wtf? :confused:

tjyorkshire 07-11-2007 11:38 AM

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

Laurkin 07-12-2007 12: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


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