Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to use multiple gateway

Posted on 2010-11-23
2
Medium Priority
?
735 Views
Last Modified: 2012-08-13
Dear Sir,

I have server on which we want to run two application with different ip and different gatways.

One Lan Card Having IP 59.145.197.15 and defualt gateay 59.145.197.1 its application a and 2nd lan card having ip address 192.168.4.10 and df is 192.168.4.1 its run application b. is that possible to give two different ip to two lan card with two diffrerent df. is that work properly or other way do it properly.

Thanks
Manoj
0
Comment
Question by:Manojtanwar
  • 2
2 Comments
 
LVL 3

Accepted Solution

by:
msimn earned 2000 total points
ID: 34202924
You can make a static route for some specific networks.

----- Situation A -----
For example, I have 2 lan card. My server need a connection to the internet.
  - My first lan connects to 192.168.0.0/24 with default gateway 192.168.0.254
  - My second lan connects to 10.0.0.0/24 with no default gateway

Say I have application a and application b.
  - Application a connects to the internet via 192.168.0.254.
  - Application b connects to a server with an ip address of 172.16.0.20, which must be routed through 10.0.0.1.

I add a static route to my route table for application b, using the following command (windows):
     route -p add 172.16.0.20 255.255.255.255 10.0.0.1


----- Situation B -----
For example, I have 2 lan card. My server does not need a connection to the internet.
  - My first lan connects to 192.168.0.0/24 with no default gateway
  - My second lan connects to 10.0.0.0/16 with default gateway 10.0.254.254. (which is a router to an internal network)
  - My router (which connects to the internet)'s ip is 192.168.0.254

Say I have application a, application b and application c.
  - Application a must be connected to the internet.
  - Application b connects to an internal network with a subnet of 172.16.0.0/16, which must be routed through 10.0.254.254.

First, add a default gateway to the first interface, 192.168.0.0/24, with a gateway 192.168.0.254.
Second, remove the default gateway from the interface 10.0.0.0/16.
Finally, add "route -p 172.16.0.0 255.255.0.0 10.0.254.254"

0
 
LVL 3

Expert Comment

by:msimn
ID: 34202953
** never specify more than one default gateway on a server **
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Suggested Courses

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question