Solved

How to use multiple gateway

Posted on 2010-11-23
2
727 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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

617 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