Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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??
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
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
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.
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
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
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
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.