iperf multicast & multi-interface operation


This is really a message meant for the developers (but I didn't see an
iperf-devel list)...It is feedback about the iperf capabilities relating to
multicasting on machines with multiple network interfaces, with a
suggestion about how the code might be modified to support this operation
more flexibly.

On the client side, you can specify transmission of packets to a multicast
address using "-c mcastAddr" and on a machine with multiple network
interfaces you can specify which interface the packets should go out on
using "-B ifaceAddr".  This is straight forward and completely flexible.

On the server side, however, the server defaults to listening for packets
from any ipaddr on any interface.  If you want to limit the server to
receive packets for a specific multicast address, the current mode of
operation is to use "-B mcastAddr" to "bind" to that aIPddress.  The
problem is that in server operation there is no way to bind the socket to a
specific network interface---the server side code uses "ANY" and the kernel
picks which interface to use.  On a multi-interface system, this may not be
the interface you're really interested in using!  The only to ways to over
ride this are 1) modify the code to do things differently, or 2) set up a
static route to map the multicast address you want specify to the network
interface you'd like to use.

I'm currently doing 2) to make iperf work the way I need it to, but I
suggest a permanent change to the operation.  (I'd do it and send a patch,
but I'm really strapped for time right now...)

Right now the -B flag is used differently for client vs. server operation. 
I'd suggest this syntax:
iperf <-B ifaceAddr> -c IPaddr
iperf <-B ifaceAddr> -s <IPaddr>

In both cases the -c/-s would specify which mode to be in (client/server). 
In server mode, the optional IPaddr argument could be used to bind a socket
to receive pkts for a specific IP addr.  The -B flag would now be used the
same way in client or server mode:  to bind the socket to a specific
interface address on the machine.

This change would allow complete flexibility with specifying the ip addr
AND the interface if desired.

(There is the possibility to maintain backward compatibility here....if no
IPaddr is specified with -s but the -B flag is specified, you *could* use
the ifaceAddr as the IP addr----the way it is used now.  Alternately, the
new syntax could be used to specify the mode of accepting pkts for ANY IP
addr but on the specific interface.)

Hope this suggestion is useful in general---I know it would be useful for
me, and it would mean that users wouldn't have to mess with routing tables
and static routes and such...

Thanks,
Jim

-- 
----------------------------------------------------------------------
James T. Kaba                   
Sarnoff Corporation   There are 10 kinds of people in the world:
jkaba --at-- sarnoff.com     those who understand binary, and those who don't.
609-734-2246



Other Mailing lists | Author Index | Date Index | Subject Index | Thread Index