Discussion Locked

Routing traffic to a specific nic

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I'm replicating 3GB of data between 2 servers and have installed a private network between these two servers so that I can pull this traffic off of our production network. The copy was taking several hours and I needed a quicker solution. So I have installed a seperate nic in each server and use a crossover cable between them. I'm using a batch file in which I map a drive and then robocopy its contents. I want to be able to specify that this traffic only use the new private network. How can I do this?

7 replies

by ruturaj

Okay not that hard you say you 2 NIC's on each boxes say the servers are called SERVER1 & SERVER2, with the config as you mentioned on a seperate subnet than the prod network

SERVER1
IP: 192.168.1.2
SM: 255.255.255.0
DGW: 192.168.1.2 (has tobe it self on the sec. NIC for this purpose)
SERVER2
IP: 192.168.1.3
SM: 255.255.255.0
DGW: 192.168.1.3

Then on SERVER1 type the command in the shell

route ADD 192.168.1.3 MASK 255.255.255.0 192.168.1.2

route ADD 192.168.1.2 MASK 255.255.255.0 192.168.1.3

After this map a drive using the Second NIC IP Address of the server i.e
net use f: 192.168.1.2\Share_Name (Imp. do not use the NETBios name since that will default to the Prod Network thereby defeating the purpose)
Then proceed to copy through the mapped drive letter.

Regards.

by ruturaj

I FORGOT A STATEMENT ABOVE PLEASE LOOK BELOW FOR CORRECTION:

Then on SERVER1 type the command in the shell

route ADD 192.168.1.3 MASK 255.255.255.0 192.168.1.2

Then on SERVER2 type the command in the shell

route ADD 192.168.1.2 MASK 255.255.255.0 192.168.1.3

by jaystar

First, I assume you have already set private IP's for the second NIC cards to the same private network (i.e. 192.168.1.XXX) with a 255.255.255.0 subnet mask. Make sure you do not specifiy a default gateway, or you can get routing issues. by putting a default gateway into your second nic card you can cause two 0.0.0.0 routes in your routing table. This would be a Bad Thing (TM). As above you can map the drive then by using the IP address, but if you like names better, add a second name to eachservers hosts file. This way if you ever change your IP address scheme, you will not need to change your scripts, just the hosts file.

Note the previous post will work, but the routes he creates will be created by adding the second network card already.

Hope this helps out.

Jay

This discussion is closed to new replies.