Solved

How to use multiple gateway

Posted on 2010-11-23
2
718 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 500 total points
Comment Utility
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
Comment Utility
** never specify more than one default gateway on a server **
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Configuring network clients can be a chore, especially if there are a large number of them or a lot of itinerant users.  DHCP dynamically manages this process, much to the relief of users and administrators alike!
Don’t let your business fall victim to the coming apocalypse – use our Survival Guide for the Fax Apocalypse to identify the risks and signs of zombie fax activities at your business.
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…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now