Re: How to set interface for Multicast server ?
This has been an on going concern that has been voiced by many. Does any
one know of a way to portably support this feature? Normally to bind to a
specific NIC you use -B nic which results in a bind() call with that
address. However when you do a -B multicast-address that also results in a
bind() call but since it specifies a multicast address that is a valid
address on all NICs so that is what you get. Any insights? This feature
would not be difficult to add if I knew that it was possible and portable.
Kevin
On Thu, 26 Feb 2004, Jim Kaba wrote:
> Jacob,
> If I understand your question correctly, I think I ran into the same
> problem a few weeks back---i.e. there is currently not a good way to bind
> the iperf server to a multicast address on a specific network interface on
> machines that have more than one interface.
>
> ...the way I got around it was to create a static route whenever I needed
> to do it:
>
> route add 224.0.67.67 dev eth1 (this is assuming that "eth1" is the
> network device corresponding to the network interface whose hostname is
> "node2")
>
>
> ...by default mcast routes will be associated with an interface the kernel
> picks (usually the first to come up).
>
>
> Jim
>
>
> Jacob Teplitsky wrote:
> >
> > Hi,
> > Is therte a way to bind a server to an interface:
> >
> > node5> iperf -s -u -B 224.0.67.67 -i 1
> > ------------------------------------------------------------
> > Server listening on UDP port 5001
> > Binding to local address 224.0.67.67
> > Joining multicast group 224.0.67.67
> > Receiving 1470 byte datagrams
> > UDP buffer size: 32.0 KByte (default)
> >
> > I how it can be done for the client:
> >
> > /usr/local/bin/iperf -c 224.0.67.67 -u --ttl 5 -t 5 -B node2
> >
> > Thanks
> > - Jacob
>
>