Solved

How to use multiple gateway

Posted on 2010-11-23
2
724 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 3

Accepted Solution

by:
msimn earned 500 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SonicPoint N2 will not provision on SonicWall NSA220 4 56
Configuring NAT in ASA ver. 9.1 4 51
Determine Network Portion and Host portion of  IPV6 IP 8 67
Exchange 2016 4 64
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.
For many of us, the  holiday season kindles the natural urge to give back to our friends, family members and communities. While it's easy for friends to notice the impact of such deeds, understanding the contributions of businesses and enterprises i…
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

738 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