Mailinglist Archive: opensuse (1108 mails)

< Previous Next >
Re: [opensuse] Re: What would be the proper command to swtich off wlan?
On 08/25/2018 01:15 PM, Per Jessen wrote:
It's a little hypothetical for me, but if I wrote an app to broadcast
<something> I would default to using all available interfaces. Never
mind any routing.

Regardless, if the broadcasts are IP then they follow it IP rules.  This
includes the router function built into Linux.  It looks at the
interface metrics and sends it out via the lowest.  Applications don't
normally work directly with the interfaces.  They provide the data and
IP address and leave it to the OS to do the rest.  The only non IP
broadcasts you're likely to see these days are the ARP requests.

pinging isn't broadcast through. Or did you try that too? Ping the
broadcast address of all available interfaces.

If there's no entry in the ARP cache for the destination, then a ping
will trigger an ARP request.  When you first ping an address, the
computer has to use the subnet mask, to determine if the address is on
the local LAN or not.  If it is, then the MAC address has to be
determined.  I just ran a test, with both interfaces connected.  I then
pinged a non-existent IPv4 address, so as to generate a string of ARP
requests.  Wireshark, running on my desktop and filtering on Ethernet
broadcasts, shows several ARP requests from the Ethernet port, but not
WiFi.  When I disconnect the Ethernet cable, the requests come from the
WiFi address.  At no time to I see ARP requests coming from both
interfaces.  So, even though ARP is not IP, Linux still determines the
correct interface to use.

I bet that if Carlos used Wireshark to watch the traffic, he wouldn't
see it coming from WiFi, when Ethernet is connected.  What his scripts
do is another matter and I suspect that may be where the problem lies.

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >