EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Fwd: Wrong beacon source IP address
From: Michael Davidsaver <[email protected]>
To: [email protected]
Cc: "[email protected]" <[email protected]>
Date: Sat, 19 Dec 2015 14:56:01 -0500
On 12/18/2015 05:39 PM, Andrew Johnson wrote:
> I mis-read Anze's original description, and it now sounds to me like
> there may be a bug in his network stack.

It seems the answer is no, or at least that the "bug" is the default.  I tested using a VM with 3 NICs and see the described behavior.

I should note that the VM host is behaving a little odd (I think) as a 'ping -I <ethX> <addr>' of the VM host using mismatched interface and address does succeed.  wireshark shows the echo request going out on the specified interface.

Note: For this test I use qemu w/ 3 NICs, 1 is the usermode stack and two taps.  No special IP routes, and forwarding is not enabled.

> Is it really possible to send
> out a broadcast UDP message that has a different IP source address than
> the address of the network interface you're sending it out from?

Seems a bit bizarre, but apparently possible.

> I would
> expect something like that to only be possible if you're running as root.

No root needed.

> Could this me something to do with the configuration of his virtual
> network ports, or with his Wireshark setup? I would like to see this
> experiment repeated on a machine that has multiple real interfaces,
> because it doesn't make sense to me.

I also tested with https://github.com/mdavidsaver/epics-base/tree/rsrvbindiface
which does things a little differently.  The new code shows consistent source and destination addresses.

So I suspect this is an artifact of using a connect()'d UDP socket vs. sendto().  In both cases an implicit bind() is done, and my guess would be that for connect() the bind selects a single interface while sendto() picks the wildcard.  (assuming such intuitive behavior for bsd sockets may not be a good idea on my part :P )

Attachment: signature.asc
Description: OpenPGP digital signature


References:
Fwd: Wrong beacon source IP address Ralph Lange
Re: Fwd: Wrong beacon source IP address Michael Davidsaver
Re: Fwd: Wrong beacon source IP address Andrew Johnson
Re: Fwd: Wrong beacon source IP address Michael Davidsaver
Re: Fwd: Wrong beacon source IP address Andrew Johnson

Navigate by Date:
Prev: Re: Wrong beacon source IP address Ralph Lange
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Wrong beacon source IP address Ralph Lange
Next: Fwd: Re: Wrong beacon source IP address Ralph Lange
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 19 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·