Networking Forums

Networking Forums > Computer Networking > Windows Networking > Telling an app to use a particular NIC

Reply
Thread Tools Display Modes

Telling an app to use a particular NIC

 
 
Zyggy
Guest
Posts: n/a

 
      08-10-2006, 06:43 AM
Let's say there are two PCs where each has two NICs: NIC1 and NIC2. The NIC1
on both machines are connected to the same switch. These NICs are used for
Internet access. However, what if I want to use NIC2 on both machine as the
one to transfer lots of data continuously like in a data backup situation?
Can I tell an automatic backup program to use the "backdoor" NIC2 to
transfer the data and not the NIC1? I am pretty sure there is a registry
hack where I can tell a network aware program to associate itself to one NIC
and not the other.

Network cards are cheap these days. there is no reason nowadays not to have
multihomed PCs in a LAN to maximize data traffic instead of having one NIC
taking the full load of a multitudes of programs that use the network.


 
Reply With Quote
 
 
 
 
Miha Pihler [MVP]
Guest
Posts: n/a

 
      08-10-2006, 06:59 AM
Hi,

It might be possible if you can specify to which IP address program must
send data. Then you can use static routes.

For example, you have two NICs and IP addresses are 192.168.0.100 and
192.168.0.101 and you would like to communicate with server 192.168.0.200
over NIC 192.168.0.101.

Now what you have to do is add a route like this:

route add 192.168.0.200 mask 255.255.255.255 192.168.0.101

if you would like the route to persist after reboot you add -p switch like
this

route add -p 192.168.0.200 mask 255.255.255.255 192.168.0.101

This should do the trick.

Personally I use this on my laptop where most of the time I use WiFi
connection. WiFi can prove itself very slow when copying e.g. large image
files for virtual computers. On such occasion I add network cable connection
and add static route (above) to the server holding the image and communicate
with it over wired connection.

There are other options e.g. using cross over cables etc... Down side of
scenario that you use is that you did not lower the burden on network
switches - just NICs in the computers.

Note: I recommend you to set up IP address on second NIC manually (don't use
DHCP) and leave default gateway field empty (on second NIC).

I hope this helps you out.

--
Mike
Microsoft MVP - Windows Security

"Zyggy" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Let's say there are two PCs where each has two NICs: NIC1 and NIC2. The
> NIC1 on both machines are connected to the same switch. These NICs are
> used for Internet access. However, what if I want to use NIC2 on both
> machine as the one to transfer lots of data continuously like in a data
> backup situation? Can I tell an automatic backup program to use the
> "backdoor" NIC2 to transfer the data and not the NIC1? I am pretty sure
> there is a registry hack where I can tell a network aware program to
> associate itself to one NIC and not the other.
>
> Network cards are cheap these days. there is no reason nowadays not to
> have multihomed PCs in a LAN to maximize data traffic instead of having
> one NIC taking the full load of a multitudes of programs that use the
> network.
>



 
Reply With Quote
 
Zyggy
Guest
Posts: n/a

 
      08-10-2006, 10:25 AM
Well, it works... sort of.

Remember, both the client and the server have 2 NICs in them. Let's give the
2nd NIC on the server 192.168.0.201. This 2nd NIC is connected directly to
192.168.0.101 on the client via a crossover cable.

Client 192.168.0.100 ---(switch)--- 192.168.0.201 Server. The switch has
access to the Internet.
Client 192.168.0.101 ---(crossover)--- 192.168.0.200 Server

When I disable the 192.168.0.200 NIC on the server, the client is forced to
use the other 100NIC to communicate with the server at its 201NIC, breaking
the static route that I had put in the client and consequently flooding the
switch with huge amount of data which is what I have wanted to avoid in the
first place. When I re-enable the 200NIC on the server and re-transmit a lot
of data to to server, the client still uses the "switch" 100NIC to move the
data instead of the now perfectly working "crossover" 101NIC/200NIC path.
The good thing is after I restart the server, the client remembers the
static route command and resumes using the "crossover" NIC path to tranfer
the data.

What I want is to tell the client to use the "crossover" NIC to tranfer over
the data during backup, and never use the "switch" NIC even though the
"crossover" NIC is unavailable. In other words, I rather prefer the client
not being able to transfer the data to the server at all than flooding the
switch with the transfer. Basically I want only the "switch" NIC to share
Internet and the "crossover" NIC for the rest. Again, what I want is
whenever there is any data transfer between the client and the server, this
process has to use the "crossover" path without exception. The reason being
if there is an exception like the case of a failed "crossover" NIC, the
client and server will not remember and the revert back to the crossover NIC
path as observed. I rather to have an anomaly (no data tranfer error) so
that I will know there is a problem.

This is why I think the only solution is to explicitly tell the actual
program on the client that does the data transfer to use only the
"crossover" NIC. The reason being Windows itself cannot be told to use one
NIC or the other. It is programmed to be promiscuous, choosing whatever path
is available to it instead of only uses one NIC for some task and another
NIC for the others.


"Miha Pihler [MVP]" <mihap-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> It might be possible if you can specify to which IP address program must
> send data. Then you can use static routes.
>
> For example, you have two NICs and IP addresses are 192.168.0.100 and
> 192.168.0.101 and you would like to communicate with server 192.168.0.200
> over NIC 192.168.0.101.
>
> Now what you have to do is add a route like this:
>
> route add 192.168.0.200 mask 255.255.255.255 192.168.0.101
>
> if you would like the route to persist after reboot you add -p switch like
> this
>
> route add -p 192.168.0.200 mask 255.255.255.255 192.168.0.101
>
> This should do the trick.
>
> Personally I use this on my laptop where most of the time I use WiFi
> connection. WiFi can prove itself very slow when copying e.g. large image
> files for virtual computers. On such occasion I add network cable
> connection and add static route (above) to the server holding the image
> and communicate with it over wired connection.
>
> There are other options e.g. using cross over cables etc... Down side of
> scenario that you use is that you did not lower the burden on network
> switches - just NICs in the computers.
>
> Note: I recommend you to set up IP address on second NIC manually (don't
> use DHCP) and leave default gateway field empty (on second NIC).
>
> I hope this helps you out.
>
> --
> Mike
> Microsoft MVP - Windows Security
>
> "Zyggy" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> Let's say there are two PCs where each has two NICs: NIC1 and NIC2. The
>> NIC1 on both machines are connected to the same switch. These NICs are
>> used for Internet access. However, what if I want to use NIC2 on both
>> machine as the one to transfer lots of data continuously like in a data
>> backup situation? Can I tell an automatic backup program to use the
>> "backdoor" NIC2 to transfer the data and not the NIC1? I am pretty sure
>> there is a registry hack where I can tell a network aware program to
>> associate itself to one NIC and not the other.
>>
>> Network cards are cheap these days. there is no reason nowadays not to
>> have multihomed PCs in a LAN to maximize data traffic instead of having
>> one NIC taking the full load of a multitudes of programs that use the
>> network.
>>

>
>



 
Reply With Quote
 
Miha Pihler [MVP]
Guest
Posts: n/a

 
      08-10-2006, 12:22 PM
If you have two NICs in both computers (client and server) don't forget to
add appropriate route in the other direction... (from server to client).

Other comments in-line.

> Well, it works... sort of.
>
> Remember, both the client and the server have 2 NICs in them. Let's give
> the 2nd NIC on the server 192.168.0.201. This 2nd NIC is connected
> directly to 192.168.0.101 on the client via a crossover cable.
>
> Client 192.168.0.100 ---(switch)--- 192.168.0.201 Server. The switch has
> access to the Internet.
> Client 192.168.0.101 ---(crossover)--- 192.168.0.200 Server


Second option should be

Client 192.168.0.101 ---(crossover)--- 192.168.0.201 Server

Even better would be if you use another IP range here -- range that is not
used elsevare on the network for second NIC. E.g. you could use
192.168.250.0 with subnet mask 255.255.255.252. Now you tell your software
it should copy data to e.g. 192.168.250.2 while your client second NIC now
has IP address 192.168.250.1. If this connection fails there should be no
data transferred -- but it depends on the reason for the NIC failure...

<snip>

> This is why I think the only solution is to explicitly tell the actual
> program on the client that does the data transfer to use only the
> "crossover" NIC. The reason being Windows itself cannot be told to use one
> NIC or the other. It is programmed to be promiscuous, choosing whatever
> path is available to it instead of only uses one NIC for some task and
> another NIC for the others.


The program would have to be written in such a way to allow such setting --
and I must admit I haven't seen such program in a very long time
(pre-Windows 2000).
All new software that I know relies on NIC bind order, routes and other
TCP/IP related Windows configuration.

I hope this helps,

--
Mike
Microsoft MVP - Windows Security

> "Miha Pihler [MVP]" <mihap-(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Hi,
>>
>> It might be possible if you can specify to which IP address program must
>> send data. Then you can use static routes.
>>
>> For example, you have two NICs and IP addresses are 192.168.0.100 and
>> 192.168.0.101 and you would like to communicate with server 192.168.0.200
>> over NIC 192.168.0.101.
>>
>> Now what you have to do is add a route like this:
>>
>> route add 192.168.0.200 mask 255.255.255.255 192.168.0.101
>>
>> if you would like the route to persist after reboot you add -p switch
>> like this
>>
>> route add -p 192.168.0.200 mask 255.255.255.255 192.168.0.101
>>
>> This should do the trick.
>>
>> Personally I use this on my laptop where most of the time I use WiFi
>> connection. WiFi can prove itself very slow when copying e.g. large image
>> files for virtual computers. On such occasion I add network cable
>> connection and add static route (above) to the server holding the image
>> and communicate with it over wired connection.
>>
>> There are other options e.g. using cross over cables etc... Down side of
>> scenario that you use is that you did not lower the burden on network
>> switches - just NICs in the computers.
>>
>> Note: I recommend you to set up IP address on second NIC manually (don't
>> use DHCP) and leave default gateway field empty (on second NIC).
>>
>> I hope this helps you out.
>>
>> --
>> Mike
>> Microsoft MVP - Windows Security
>>
>> "Zyggy" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> Let's say there are two PCs where each has two NICs: NIC1 and NIC2. The
>>> NIC1 on both machines are connected to the same switch. These NICs are
>>> used for Internet access. However, what if I want to use NIC2 on both
>>> machine as the one to transfer lots of data continuously like in a data
>>> backup situation? Can I tell an automatic backup program to use the
>>> "backdoor" NIC2 to transfer the data and not the NIC1? I am pretty sure
>>> there is a registry hack where I can tell a network aware program to
>>> associate itself to one NIC and not the other.
>>>
>>> Network cards are cheap these days. there is no reason nowadays not to
>>> have multihomed PCs in a LAN to maximize data traffic instead of having
>>> one NIC taking the full load of a multitudes of programs that use the
>>> network.
>>>

>>
>>

>
>



 
Reply With Quote
 
Zyggy
Guest
Posts: n/a

 
      08-11-2006, 12:04 AM
I did just that. I assigned the IPs for the crossover NICs as a different
subnet and still although the client consistently uses the "crossover" path
to tranfer files, once that path was cut off, Windows automatically uses the
"switch" path to transfer data and resumes to do so even after the crossover
path was reinstated. Only a restart of either the client or server would the
transfer carried out with the crossover path.

It occurs to me with the absence of a way to tell the app to use one path or
the other, the solution is to assign the VLAN to the switch path. VLAN
routers are not expensive at this point, so it looks like that is how I
should do things if I want to do this project.

-------------

Let's start another project that uses similar concepts.

Let's discuss about how to use trunking to merge the bandwidth of multiple
NICs. Imagine I have a lot of data to transfer to another PC. What if I
could install 3 gigabit NICs on both PCs and use all three cards to tranfer
the data at the same time in a load balancing mode. This way, I would have 3
gigabit per seconds of b/w. I have also been looking for a program that
would do this in Windows. The trunking technology has been used in Dell
servers for a long time as I recall. It uses Dell's proprietary software
that is only available if I buy the entire server from them. Isn't there a
publically available software that does this?



"Miha Pihler [MVP]" <mihap-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> If you have two NICs in both computers (client and server) don't forget to
> add appropriate route in the other direction... (from server to client).
>
> Other comments in-line.
>
>> Well, it works... sort of.
>>
>> Remember, both the client and the server have 2 NICs in them. Let's give
>> the 2nd NIC on the server 192.168.0.201. This 2nd NIC is connected
>> directly to 192.168.0.101 on the client via a crossover cable.
>>
>> Client 192.168.0.100 ---(switch)--- 192.168.0.201 Server. The switch has
>> access to the Internet.
>> Client 192.168.0.101 ---(crossover)--- 192.168.0.200 Server

>
> Second option should be
>
> Client 192.168.0.101 ---(crossover)--- 192.168.0.201 Server
>
> Even better would be if you use another IP range here -- range that is not
> used elsevare on the network for second NIC. E.g. you could use
> 192.168.250.0 with subnet mask 255.255.255.252. Now you tell your software
> it should copy data to e.g. 192.168.250.2 while your client second NIC now
> has IP address 192.168.250.1. If this connection fails there should be no
> data transferred -- but it depends on the reason for the NIC failure...
>
> <snip>
>
>> This is why I think the only solution is to explicitly tell the actual
>> program on the client that does the data transfer to use only the
>> "crossover" NIC. The reason being Windows itself cannot be told to use
>> one NIC or the other. It is programmed to be promiscuous, choosing
>> whatever path is available to it instead of only uses one NIC for some
>> task and another NIC for the others.

>
> The program would have to be written in such a way to allow such
> setting -- and I must admit I haven't seen such program in a very long
> time (pre-Windows 2000).
> All new software that I know relies on NIC bind order, routes and other
> TCP/IP related Windows configuration.
>
> I hope this helps,


>>
>>

>
>



 
Reply With Quote
 
Ace Fekay [MVP]
Guest
Posts: n/a

 
      08-11-2006, 01:03 AM
In news:(E-Mail Removed),
Zyggy <(E-Mail Removed)> stated, which I commented on below:
> I did just that. I assigned the IPs for the crossover NICs as a
> different subnet and still although the client consistently uses the
> "crossover" path to tranfer files, once that path was cut off,
> Windows automatically uses the "switch" path to transfer data and
> resumes to do so even after the crossover path was reinstated. Only a
> restart of either the client or server would the transfer carried out
> with the crossover path.
> It occurs to me with the absence of a way to tell the app to use one
> path or the other, the solution is to assign the VLAN to the switch
> path. VLAN routers are not expensive at this point, so it looks like
> that is how I should do things if I want to do this project.
>
> -------------
>
> Let's start another project that uses similar concepts.
>
> Let's discuss about how to use trunking to merge the bandwidth of
> multiple NICs. Imagine I have a lot of data to transfer to another
> PC. What if I could install 3 gigabit NICs on both PCs and use all
> three cards to tranfer the data at the same time in a load balancing
> mode. This way, I would have 3 gigabit per seconds of b/w. I have
> also been looking for a program that would do this in Windows. The
> trunking technology has been used in Dell servers for a long time as
> I recall. It uses Dell's proprietary software that is only available
> if I buy the entire server from them. Isn't there a publically
> available software that does this?


Why not just use NIC Teaming?


--
Ace
Innovative IT Concepts, Inc
Willow Grove, PA

This posting is provided "AS-IS" with no warranties or guarantees and
confers no rights.

Ace Fekay, MCSE 2003 & 2000, MCSA 2003 & 2000, MCSE+I, MCT, MVP
Microsoft MVP - Directory Services
Microsoft Certified Trainer

Having difficulty reading or finding responses to your post?
Instead of the website you're using, I suggest to use OEx (Outlook Express
or any other newsreader), and configure a news account, pointing to
news.microsoft.com. This is a direct link to the Microsoft Public
Newsgroups. It is FREE and requires NO ISP's Usenet account. OEx allows you
to easily find, track threads, cross-post, sort by date, poster's name,
watched threads or subject.
It's easy:

How to Configure OEx for Internet News
http://support.microsoft.com/?id=171164

Infinite Diversities in Infinite Combinations
Assimilation Imminent. Resistance is Futile
"Very funny Scotty. Now, beam down my clothes."

The only constant in life is change...


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Telling your provider you're cancelling...... Mantorok Broadband 0 06-15-2007 09:43 AM
CHAP authentication failed - wotsit telling us? Frank Stacey Broadband 15 07-04-2005 01:55 PM
The utility keeps telling me the WEP key is incorrect BobH Broadband Hardware 1 03-18-2005 09:24 PM
NTL Telling Porkies to new customers. Gareth :-\\\) voom Broadband 10 02-08-2005 07:10 AM
So after years of telling my Dad he needs the Internet... Old Codger Broadband 16 09-01-2003 07:10 AM



1 2 3 4 5 6 7 8 9 10 11