1

Being reading about this on ServerFault but decided to open a new question, as I can't re-ask over existing threads.

2 computers, 2 nics: Computer A - 100.100.100.10 - 192.168.100.10 Computer B - 100.100.100.20 - 192.168.100.20

I need to set a windows route, so traffic on computer A targeting ip 100.100.100.20 use the secondary nic.

Been here: How do I route traffic to a specific site/IP-block through one nic, with other traffic through another nic? And here: DFS Replication on Lan (with multiple subnets)

I want to make sure I'm not setting the route the wrong way: route add 100.100.100.20 mask 255.255.255.255 192.168.100.10

I'm trying this so some processes can get to the second computer using the faster link. Which would also reduce load on the primary nic.
These processes (such as dfsr, backup, etc.) do not allow you to specify the IP address they are bound to, so they are using the public facing address, and the route approach makes sense.


My situation is pretty much like the second link I posted, DFSR does not let you to chose the IP it's bound to, it does so by resolving the computer name within a domain. Same with other processes we need to get flowing through secondary nic. So instead of having them going through the 100mb nic at 100.100.100.10, we want to route them through the 1000mb nic 192.168.100.10. At least that's the logic :)


Here is the link to the setup drawing

3
  • Hi, so am I right to assume that this doesn't work and your question is why? Jun 16, 2014 at 13:26
  • Trying to avoid the guess work and minimize the amount of tests. Want to see if my logic is OK, and if the syntax for the route is OK or it is missing something. Doing it the wrong way will cripple a server and need to minimize the downtime. Jun 16, 2014 at 13:55
  • Shouldn't that be route add 100.100.100.20 mask 255.255.255.255 192.168.100.20, i.e. try to reach B via B's secondary address? Jun 16, 2014 at 14:57

2 Answers 2

2

Set the IP on your second NIC to one on the same network as your second machine - i.e. 200.200.200.201 - and it will use that interface automatically. Don't use the 192.168.100.10, it adds unnecessary complications.

7
  • The second nic on the first machine is on the same lan network as the second machine, it's 192.168.100.10 on left and 192.168.100.20 on right. Even if I do what you suggest, setting it to 200.200.200.201 wouldn't work as traffic would keep flowing through nic 1 on 200.200.200.200. Jun 16, 2014 at 13:51
  • That doesn't add up right for me... can you maybe draw a picture of your network setup and post it somewhere we (I) can see what's going on?
    – John
    Jun 16, 2014 at 13:55
  • @AgustinGarzon - That doesn't make any sense. Where is the machine with ip address 200.200.200.200? Why are you creating a route to 200.200.200.200. if the traffic is destined for 192.168.100.20?
    – joeqwerty
    Jun 16, 2014 at 14:14
  • Added an image and corrected the IP addresses. Sorry for misleading you. Jun 16, 2014 at 14:49
  • Overall, this is way too much complication - if you need more bandwidth for this application, upgrade the network the primary NICs are attached to. Otherwise, you can use the hosts file to fool computer B, but that will eventually cause you other problems down the road.
    – John
    Jun 16, 2014 at 15:25
0

There is a missing element here which doesn't allow us to properly answer your question: where is your destination host (200.200.200.200) actually located? How can your network traffic reach it?

You said your first NIC is connected "for the internet", while the second one is connected "to a second computer". Based on your description, the destination address 200.200.200.200 is not directly reachable from any NIC, because it doesn't belong to any of their subnets; thus, you need a router to reach it. I'm assuming your default gateway is reachable via the first network, because you said it's used "for the internet"; so, let's assume your default gateway is 100.100.100.1, or something similar; let's also assume it can be used to reach your destination.

But do you have any router on the second network? If there isn't any and you only have another computer there, you can't use it to route traffic directed to a completely different destination like 200.200.200.200. If instead you have a second router there, let's call it f.e. 192.168.100.1, and if the destination address can be reached through it, then the command for adding your route would be:

route add 200.200.200.200 mask 255.255.255.255 192.168.100.1

That means, "send any traffic directed to 200.200.200.200 to 192.168.100.1 instead of sending it to the default gateway".

Again, this will only work if you actually have a router on the second network, and if it can be used to reach your destination address; if this is not the case, then you just can't use the second network to reach a destination which can't be reached from there.


Update:

Based on your drawing, what you want can't be done. There's no way to send a packet addressed for 100.100.100.20 to 192.168.100.20 and have it be accepted by computer B (unless you want to configure computer B as a router, but this would make things a lot more complex).

Alternative solution: use the hosts file on computer A to have it believe computer B's name resolves to 192.168.100.20.

5
  • Using 200.200.200.200 was my bad, I corrected the IP address I was using in my example and added a drawing in case that helps. Thanks for taking a look :) Jun 16, 2014 at 14:50
  • Ok, see edit then.
    – Massimo
    Jun 16, 2014 at 15:03
  • Did you try Evan's suggestion from the second link you posted? Jun 16, 2014 at 15:11
  • I took Evan's suggestion, which is the route-add syntax in my post, but I did not run it just yet, as I want to make sure I'm not doing it wrong. Massimo is saying this will not work so there it goes. Jun 16, 2014 at 15:16
  • Evan's answer says that he's almost sure a static route is not going to work, and I agree with that; the only way that could work is if the two servers are configured to perform routing between their two NICs (which on Windows systems requires installing RRAS), otherwise they will simply reject any packet which enters an interface but is addressed to another one. Ugly as it may be, the hosts file hack is the only solution here.
    – Massimo
    Jun 16, 2014 at 18:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .