Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to use multiple gateway

Posted on 2010-11-23
2
Medium Priority
?
731 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 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
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…
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…

722 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