<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body dir="ltr" bgcolor="#ffffff" text="#000000">
<p style="margin-bottom: 0cm; margin-top: 0pt;">Daniel Feiglin wrote:<br>
</p>
<blockquote cite="mid:49BA5663.8090102@inter.net.il" type="cite">
<pre wrap="">For what it's worth, they can both be pinged
from the host and the ifconfig output looks fine.
</pre>
</blockquote>
I am sorry. "For what it's worth" is exactly nothing. The setup you are
trying to achieve is not possible as is.<br>
<br>
The problem is convincing the TCP/IP stack to route packets to an IP it
knows to be local through a physical network card. Truth be told, I'm
faced with a similar problem for a project I'm working on, and don't
have a great solution either.<br>
<br>
Do the following experiment. Connect the 100 card to a network, and
from another computer ping the 101 address while a sniffer is running.
You will see an ARP reply going out from the 100 card, carrying the 100
MAC address, and the ping will succeed despite the 101 card being
disconnected. Why? Because the computer says "I know how to reach 101 -
it's my IP, so if the ARP reached the 100 card, it's probably a good
MAC address to respond with".<br>
<br>
<br>
<blockquote cite="mid:49BA5663.8090102@inter.net.il" type="cite">
<pre wrap="">
Later, the crossed cable will be replaced by a radio link (which relates
to the purpose of all this).
To carry out the packet generation, I downloaded and built the iperf
program (<a class="moz-txt-link-freetext" href="http://sourceforge.net/forum/forum.php?forum_id=808751">http://sourceforge.net/forum/forum.php?forum_id=808751</a>).
</pre>
</blockquote>
>From the quick look I gave it, it seems that iperf does not force the
sending of the packets from a network interface (it can bind to
address, but that still goes through the machine's TCP/IP stack and
routing tables, so no solutions there).<br>
<br>
What you need is to partition the TCP/IP stack for the machine. You
need to have the 100 and 101 addresses belong to separate routing
tables. The most immediate solution is to run a virtual machine, and
give it exclusive access to one of the NICs. This way you can
configure, for example, the 100 address in the real machine and the 101
address in the virtual one.<br>
<br>
There is also a solution I've heard of once, but never had chance to
either try it or even look at it. Basically, it does this partitioning
inside one running kernel. It came as a patch to the Linux kernel. I
don't recall how its called or what are the details, so it may even not
be a solution at all.<br>
<blockquote cite="mid:49BA5663.8090102@inter.net.il" type="cite">
<pre wrap="">
Has anyone on the list done this (using iperf or something similar)
using a single box with two NICs?
</pre>
</blockquote>
Never done it, but maybe a packet based traffic generator, instead of a
traffic based one, will be able to be told "issue the packets through
this NIC". The problem is, of course, that I don't think a packet
generator checks what you are trying to check - TCP throughput. Either
way, give tcpreplay a go and see whether it is capable of testing what
you want tested (I doubt it).<br>
<br>
Shachar<br>
<br>
<pre class="moz-signature" cols="72">--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
<a class="moz-txt-link-freetext" href="http://www.lingnu.com">http://www.lingnu.com</a>
</pre>
</body>
</html>