Operating System - Linux
1753959 Members
7345 Online
108811 Solutions
New Discussion юеВ

Re: connect two servers which are in different networks

 
SOLVED
Go to solution
John CLARK_5
Frequent Advisor

connect two servers which are in different networks

Hi,

I have two Aix servers,everyone is on a network,these networks are connected by a router(WAN).
Every Aix server has one network card.
I install a database in one of these servers,and that users in network A and B to be connected to
this database.
I had search in the net and found these three informations :

1-So as to realize that,i must have 2 network cards.
2-I must just run "ip route" command in my router.
3-I must run "route add..." command in both servers.

Did someone has any idea about these informations,are they true?


Best regards.
6 REPLIES 6
John CLARK_5
Frequent Advisor

Re: connect two servers which are in different networks

sorry,i have linux redhat AS,not Aix.
Steven E. Protter
Exalted Contributor
Solution

Re: connect two servers which are in different networks

Pretty much the same thing either way, though Linux makes more sense, based on where you posted.

You can set up a default route in your network configuration if you wish.

1) Yes, you can use a little Linksys router to connect the two networks and thereby negate the need for a second network card.

2) Sounds like router configuration which is beyond my current skill set.

3) Yes, this will be necessary. Its laid out pretty well in the route man page.

If you provide details, me or others can give you the necessary commands.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Dave Falloon
Trusted Contributor

Re: connect two servers which are in different networks

What are you using for a router?

You will need to add a route at the gateway so traffic can flow between the networks. Say you have a network like this:

network 1: 192.168.1.0/24
network 2: 172.16.1.0/24

router connected to internet, network 1, and network 2 like so:

interface 1: 192.168.1.1
interface 2: 172.16.1.1
internet iface: real ip from your ISP

As long as the route table on your gateway device is correct it will see that traffic for network1 is connected to interface 1 and vice versa. Everything else goes out the internet interface.

Then on your DNS servers you add an entry the database server, the entries will be exactly the same on each network. Say the database machine is on address 172.16.1.200, clients in the 192.168.1.0 network will still use the 172.16.1.200 address to connect.

--Dave
Clothes make the man, Naked people have little to no effect on society
John CLARK_5
Frequent Advisor

Re: connect two servers which are in different networks

Hi,

I made a serach in the net and i find "ip aliasing".Can you tell me if that resolve my problem, and how can i use it?

Regards.
Dave Falloon
Trusted Contributor

Re: connect two servers which are in different networks

Are you using VLANs or any similar network technology?

Is the router the physical link between the two networks, or is it a flat space with multiple networks on the same physical switches/hubs?

If you are just running a flat network space with traffic in 2 networks I guess you could run an IP alias on a single adapter with one address in each of your networks but I have a feeling there is a limitation with this setup. You would need to have your routes set, and I'm not sure if the ip_alias code can handle aliases on different subnets.

I'll see what I can dig up.

--Dave
Clothes make the man, Naked people have little to no effect on society
Suraj Singh_1
Trusted Contributor

Re: connect two servers which are in different networks

John,
You said users would connect to the database on AIX from n/w A and n/w B. I am assuming here that your AIX is in a different n/w from n/w A & n/w B.

1. Machines on N/w A & B must have a gateway configured so that they may route the packet to the n/w in which AIX resides.
2. Similarly AIX machine also must have a route defined so that it can route packet to n/w A as well as n/w B.

Once these configurations are done, you may test the connectivity (using ping/traceroute).

I do not see any reason why do we need 2 cards here...
What we cannot speak about we must pass over in silence.