Networking Forums

Networking Forums > Computer Networking > Linux Networking > forcing net use over two NICs, same machine

Reply
Thread Tools Display Modes

forcing net use over two NICs, same machine

 
 
Matt Garman
Guest
Posts: n/a

 
      12-08-2003, 01:53 PM
My motherboard has two on-board NICs. I'm trying to diagnose a network
performance problem. What I'd like to do is enable both NICs, put a
cross-over cable between them, and perform some speed benchmarking.

I got both NICs setup with IP addresses (eth0=192.168.1.1,
eth1=192.168.1.2).

Now how do I actual force data across the cable? I was using scp and
gkrellm and as far as I can tell, the system is smart enough to know
that it doesn't need to go out on the network to copy a file from eth0
to eth1. But can I change this?

Thanks,
Matt

--
Matt Garman
email at: http://raw-sewage.net/index.php?file=email
 
Reply With Quote
 
 
 
 
Neil Horman
Guest
Posts: n/a

 
      12-08-2003, 02:02 PM
Matt Garman wrote:
> My motherboard has two on-board NICs. I'm trying to diagnose a network
> performance problem. What I'd like to do is enable both NICs, put a
> cross-over cable between them, and perform some speed benchmarking.
>
> I got both NICs setup with IP addresses (eth0=192.168.1.1,
> eth1=192.168.1.2).
>
> Now how do I actual force data across the cable? I was using scp and
> gkrellm and as far as I can tell, the system is smart enough to know
> that it doesn't need to go out on the network to copy a file from eth0
> to eth1. But can I change this?
>
> Thanks,
> Matt
>

You can't in any easy, direct way. Most applications are written to
open sockets which are bound to and connect to ip addresses. Because
the linux kernel is smart enough to realize that you are connecting to
an ip address on a local interface it wont send data through one NIC to
the other, but instead forward it directly to the destination interface.
If you want to do this there are three methods:

1) Get a second pc with 2 NICS on it (use an identical motherboard if
you can) and measure performance between them.

2) Get (lease/rent) and network performance test tool (a smartbits or an
ixia device) and use that to bench your system network performance.

3) Write some code (or find some other application) that opens a
PF_PACKET socket and binds it to one interface. Then write the code to
spit raw data in the appropriate format out that socket so as to be
recognized as a packet destined for the other interface. This will
allow you to implement the test you wanted above, as the kernel won't do
any of its routing magic on this socket.

Each method has a few drawbacks (1 introduces another pc variable in the
test, 2 can be very expensive, and 3 can show degraded performance due
to other system bottlenecks besides the NIC). All however will give you
some idea of what your system can preform like.

--
/************************************************** *
*Neil Horman
*Software Engineer
*Red Hat, Inc., http://people.redhat.com/nhorman
*gpg keyid: 1024D / 0x92A74FA1
*http://www.keyserver.net
************************************************** */

 
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
Forcing dhclient to use 255.255.255.255 Thomas Rasmussen Linux Networking 7 02-24-2011 07:12 AM
forcing one connection Blacklab Wireless Networks 3 10-08-2005 01:21 AM
No NICs work on XP Pro Machine L Windows Networking 9 01-20-2005 12:49 AM
Can't See Server from Win2K Machine with 2 NICS Marc Bertrand Windows Networking 1 06-26-2004 08:15 PM
How to set up a linux machine with multiple NICs as a hub/swich? Asfand Yar Qazi Linux Networking 2 03-04-2004 11:42 PM



1 2 3 4 5 6 7 8 9 10 11