Mailinglist Archive: opensuse (1108 mails)

< Previous Next >
Re: [opensuse] Re: What would be the proper command to swtich off wlan?
On 2018-08-25 03:09, James Knott wrote:
On 08/24/2018 06:32 PM, Carlos E. R. wrote:
Also, what sort of problems are you having?  WiFi has a higher metric
than Ethernet, so it won't normally be used, when connected to the same
network.
See my nmb thread today, for instance. nmb did see both interfaces.

I wasn't following that thread.  However, that shouldn't change the fact
that the metric means that only the Ethernet connection is used when
availalble and WiFi when it's not.  Here's what mine shows:

Well, nmb sees both, on another computer:

<3.3> 2018-08-24T09:28:18.327828+02:00 Isengard nmbd 1916 - - [2018/08/24
09:28:18.325062, 0] ../source3/nmbd/nmbd_namequery.c:109(query_name_response)
<3.3> 2018-08-24T09:28:18.328270+02:00 Isengard nmbd 1916 - -
query_name_response: Multiple (6) responses received for a query on subnet
192.168.1.16 for name VALINOR<1d>.
<3.3> 2018-08-24T09:28:18.328682+02:00 Isengard nmbd 1916 - - This
response was from IP 192.168.1.133, reporting an IP address of 192.168.1.133.

192.168.1.133 is the wlan, and I'm connected using eth on 192.168.1.127.

Legolas:~ # ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.127 netmask 255.255.255.0 broadcast 192.168.1.255
...
wlan1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.133 netmask 255.255.255.0 broadcast 192.168.1.255


After disabling wlan on Legolas, Isengard changed the report a bit:

<3.3> 2018-08-24T10:13:48.255147+02:00 Isengard nmbd 1916 - - [2018/08/24
10:13:48.254873, 0] ../source3/nmbd/nmbd_namequery.c:109(query_name_response)
<3.3> 2018-08-24T10:13:48.256303+02:00 Isengard nmbd 1916 - -
query_name_response: Multiple (2) responses received for a query on subnet
192.168.1.16 for name VALINOR<1d>.
<3.3> 2018-08-24T10:13:48.256937+02:00 Isengard nmbd 1916 - - This
response was from IP 192.168.1.127, reporting an IP address of 192.168.1.127.



"Multiple (2)" instead of 6. Improvement.


Metrics notwithstanding, other computer's programs see both interfaces
sometimes for reasons I don't understand.




Then, I have a nm triggered script that edits hosts file to add an entry
there with the current (local network) IP. So, I get the file written
first with the eth0 IP, then overwritten with the wlan0 ip - which is
the wrong one when eth is active. When nm goes out, it writes:

Maybe the problem is with the script.  Why is it writing both addresses,
when using only Ethernet?

Because NM calls my script twice. There are two interfaces, thus one
call per interface. It is not my script, it is NM.

Yes, maybe I could improve my script to handle that double call, but so
far I'm out of ideas for that.

And I'm leaving on a trip, so I won't be doing that soon.


For the moment, manually disabling radio solves the issue.

Besides, it is possible that eventually I put both eth and wlan on the
same exact IP, as I do on my other laptop. Why? Because that way "ssh
Legolas" on other machines will work regardless of Legolas using cable
or radio.

--
Cheers / Saludos,

Carlos E. R.
(from 42.3 x86_64 "Malachite" at Telcontar)

< Previous Next >
Follow Ups