?
Solved

How can I route traffic from one NIC to a specific gateway?

Posted on 2009-02-23
7
Medium Priority
?
447 Views
Last Modified: 2012-05-06
I am currently running Windows 2000 Server and have two NICs installed. I would like to have traffic that originates on NIC #2 be sent to a different gateway than that of NIC #1. I tried setting up the NICs with the two different default gateways. It works, but results in network timeout issues on already established connections. (For example, RDP will timeout from time to time) I read that you cannot set two different default gateways (also a warning pops up when setting the second gateway) Is there a way to have Windows direct traffic on NIC #2 to a specific gateway?
0
Comment
Question by:ChrisB3127
  • 4
  • 2
6 Comments
 
LVL 7

Expert Comment

by:crokeefe28
ID: 23717218
you would handle this via routes:

route add "network" mask "subnetmask" "gateway"

change the quoted words to your ip addresses.  if you want to delete it:

route delete "network" mask "subnetmask"
0
 

Author Comment

by:ChrisB3127
ID: 23717258
Thanks for your response! Would I leave the default gateway blank in the TCP/IP configuration screen? Also would this correct the issue where I had the two gateways set (via the TCP/IP properties) and then NAT traffic would get interrupted and resulted in timeouts?
0
 
LVL 7

Expert Comment

by:crokeefe28
ID: 23717771
Can you explain you situation a little more?  Is this a scenario where you are sitting on the web and you have a "front side" and "back side"?  Or is this something such as a backup network?  How many networks do you need to route for?  What are the IP schemes?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 

Author Comment

by:ChrisB3127
ID: 23718017
I think I might've found a solution that works, let me know if this is workable.

I have a server with 2 NICs. There are 2 routers present. NIC1 goes to Router1, NIC2 goes to Router2. The local IP addresses on the NICs are 192.168.1.x with a subnet of 255.255.255.0 NIC1 has a gateway of 192.168.1.1 and NIC2's gateway is 192.168.1.2. The server is used for Email, and the Email software can "bind" itself to an IP address in the operating system. This way, when mail is from NIC1, it goes out of NIC1's gateway, and when traffic is for NIC2's IP, it goes out of NIC2's gateway. I set an "interface metric" on NIC2 to 25, so that "normal" traffic goes out of NIC1, and NIC2 would only be accessed by the Email software due to the binding setting. I ran a test, and it seems to work, and the network doesn't timeout like before, which I think is due to changing the metric on NIC2.

Please let me know if this makes sense and if you need further details.
0
 
LVL 7

Expert Comment

by:crokeefe28
ID: 23718068
Hmmmmm...

Well, both of your NICs are on the Same subnet, as well as your routers.....that is a problem.  You can specify multiple IP addresses to one interface (too many to count).  If you took out the second router (which as far as I can see from the brief information, is not needed at all), and you took out the second NIC, added a second IP address to the original NIC, and configured your mail server to listen on that IP with the default gateway of 192.168.1.1...your problems would be solved.  Unless that second router is doing something else other than what is explained....even if it is, you can control routing via the "router" and not Windows.  If you had to have the second router in place, you could use the above described setup, and massage the traffic via your router.....

ie:  send all traffic to the first router and place a static route to 192.168.1.2 for the traffic that you wish.  That is the way that I would go.
0
 
LVL 7

Accepted Solution

by:
crokeefe28 earned 2000 total points
ID: 23718072
Hmmmmm...

Well, both of your NICs are on the Same subnet, as well as your routers.....that is a problem.  You can specify multiple IP addresses to one interface (too many to count).  If you took out the second router (which as far as I can see from the brief information, is not needed at all), and you took out the second NIC, added a second IP address to the original NIC, and configured your mail server to listen on that IP with the default gateway of 192.168.1.1...your problems would be solved.  Unless that second router is doing something else other than what is explained....even if it is, you can control routing via the "router" and not Windows.  If you had to have the second router in place, you could use the above described setup, and massage the traffic via your router.....

ie:  send all traffic to the first router and place a static route to 192.168.1.2 for the traffic that you wish.  That is the way that I would go.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Creating an OSPF network that automatically (dynamically) reroutes network traffic over other connections to prevent network downtime.
Getting hacked is no longer a matter or "if you get hacked" — the 2016 cyber threat landscape is now titled "when you get hacked." When it happens — will you be proactive, or reactive?
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…

589 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