Artix Linux Forum

Artix Linux => System => Topic started by: Nadir on 26 April 2019, 15:53:33

Title: Wifi then Ethernet -> no route
Post by: Nadir on 26 April 2019, 15:53:33
Hi
I have this behavior, that when I am connected on WIFI, and then I plug Ethernet cable, both are connected but I have to disconnect wifi to be able to browse internet.

On other distros, afaik you don't have to do that.

Does someone know how I can fix this?
Title: Re: Wifi then Ethernet -> no route
Post by: Dudemanguy on 26 April 2019, 19:48:46
Most likely this has to do with whatever you use to connect to networks. If you're using networkmanager, I would think it would do this for you, but I don't really know since I don't personally use it. What do you use to connect to networks exactly?
Title: Re: Wifi then Ethernet -> no route
Post by: Nadir on 26 April 2019, 22:16:52
Indeed. I use NetworkManager  - on KDE Plasma.
Title: Re: Wifi then Ethernet -> no route
Post by: nous on 26 April 2019, 23:36:29
NM probably keeps 2 default routes simultaneously. What's the output of route when both interfaces are connected?
Title: Re: Wifi then Ethernet -> no route
Post by: Nadir on 27 April 2019, 00:30:46
Wifi only:

$ ip a
...
2: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    inet 192.168.0.30/24 brd 192.168.0.255 scope global dynamic noprefixroute wlp1s0
...

$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.0.254   0.0.0.0         UG    600    0        0 wlp1s0
127.0.0.0       localhost       255.0.0.0       UG    0      0        0 lo
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
172.18.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-db8a7800fecc
192.168.0.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp1s0

After Ethernet plugged (via usb):

$ ip a
(all same except this added:)
28: enp0s20f0u2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:50:b6:c8:7d:91 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.16/24 brd 192.168.0.255 scope global dynamic noprefixroute enp0s20f0u2
       valid_lft 863985sec preferred_lft 863985sec
    inet6 fe80::c30:1b2a:6c74:3eb2/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.0.254   0.0.0.0         UG    600    0        0 wlp1s0
default         192.168.0.254   0.0.0.0         UG    20100  0        0 enp0s20f0u2
127.0.0.0       localhost       255.0.0.0       UG    0      0        0 lo
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
172.18.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-db8a7800fecc
192.168.0.0     0.0.0.0         255.255.255.0   U     100    0        0 enp0s20f0u2
192.168.0.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp1s0


So it seems my ADSL box has misconfiguration: it shall not put both cards in the same network ;-)
Nothing to do with Linux since it is DHCP.
Title: Re: Wifi then Ethernet -> no route
Post by: Nadir on 27 April 2019, 01:32:58
Confirmed.

I had configured that DSL Box somewhere in 2018 with static DHCP for the wlan (static meaning "based on mac address"). Now removed.
Now when I connect both, the config is same but for some reason it works.

$ ip a
2: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    inet 192.168.0.30/24 brd 192.168.0.255 scope global dynamic noprefixroute wlp1s0
..
30: enp0s20f0u2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    inet 192.168.0.16/24 brd 192.168.0.255 scope global dynamic noprefixroute enp0s20f0u2


$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.0.254   0.0.0.0         UG    100    0        0 enp0s20f0u2
default         192.168.0.254   0.0.0.0         UG    20600  0        0 wlp1s0
127.0.0.0       localhost       255.0.0.0       UG    0      0        0 lo
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
172.18.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-db8a7800fecc
192.168.0.0     0.0.0.0         255.255.255.0   U     100    0        0 enp0s20f0u2
192.168.0.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp1s0

First time I see  2 default gateways ;-)
Title: Re: Wifi then Ethernet -> no route
Post by: ####### on 27 April 2019, 02:32:25
nm-connection-editor
This is a config GUI for NetworkManager and it has a field to set the 'priority' of your connections to select the preferred one if more than one is available.
When installed it might be found under a Settings menu as Advanced Network Configuration or you can use nm-connection-editor in a terminal to start it too.
It's in the world repo and only depends on libnma so it looks independent of GTK or QT choices. There are lots of other settings too, including VPN, Bluetooth, IP tunnel, all sorts of stuff. You can set 'priority' other ways too, including commandline options. Well that's what some people say anyway, I haven't tried the priority feature, but nm-connection-editor did work to connect to wifi easily at least, just add SSID and pw.  ;D
Title: Re: Wifi then Ethernet -> no route
Post by: Nadir on 27 April 2019, 04:27:34
Hi, thanks. Today I learned something ;-)

NetworkManager's detailed network screen  looks very close to nm-connection-editor's: the order & position of the inputs are the same.
I wasn't aware of that option "Connect automatically with priority", Both have it.
Title: Re: Wifi then Ethernet -> no route
Post by: ####### on 27 April 2019, 16:05:32
Actually I was wrong and nm-connection-editor DOES depend on GTK, as libnma requires GTK3.

First I just installed these:
$ yay -S networkmanager-openrc
Packages (14) bluez-libs-5.50-6.1  gpm-1.20.7.r27.g1fd1941-1  libmm-glib-1.10.0-1  libndp-1.7-1  libnewt-0.52.20-2  libnm-1.18.0-1  libnm-glib-1.18.0-1  libpgm-5.2.122-3
              libsodium-1.0.17-1  libteam-1.28-2  networkmanager-1.18.0-1  slang-2.3.2-1  zeromq-4.3.1-2  networkmanager-openrc-20180428-1
But there didn't seem to be any GUI at all. So I removed those and started again:
$ yay -S network-manager-applet nm-connection-editor networkmanager-openrc
Packages (19) bluez-libs-5.50-6.1  gcr-3.28.1-1  gpm-1.20.7.r27.g1fd1941-1  libmm-glib-1.10.0-1  libndp-1.7-1  libnewt-0.52.20-2  libnm-1.18.0-1  libnm-glib-1.18.0-1
              libnma-1.8.21dev+3+gb4c365b1-1  libpgm-5.2.122-3  libsodium-1.0.17-1  libteam-1.28-2  mobile-broadband-provider-info-20190116-1  networkmanager-1.18.0-1
              slang-2.3.2-1  zeromq-4.3.1-2  network-manager-applet-1.8.21dev+3+gb4c365b1-1  networkmanager-openrc-20180428-1  nm-connection-editor-1.8.21dev+3+gb4c365b1-1
This worked after enabling the NetworkManager service and using the GUI. The applet looks like a bar graph and appears next to the power symbol although I did not notice it at first.
But where is your alternate GUI from?
Perhaps you have a QT GUI that performs the same function, possibly:
networkmanager-qt
so that would be the better choice for KDE or LXQT, although if you already had other GTK apps installed it might not matter too much.
Title: Re: Wifi then Ethernet -> no route
Post by: ####### on 27 April 2019, 22:54:09
After using NetworkManager a bit it's not so great, now the connection is a bit slow it kept losing connection, and putting a window onscreen asking for the wifi password, despite the fact it already had been configured with the password. So I kept closing that window then clicking 'reconnect' on the applet menu which worked. Then I got fed up so clicked disconnect and did some other things offline, but could not connect later as no networks at all were shown. So I had to reboot then. Perhaps it needs more config but it does seem a bit unreliable as installed.  :(
Title: Re: Wifi then Ethernet -> no route
Post by: mrbrklyn on 28 April 2019, 00:34:19
Wifi only:

$ ip a
...
2: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    inet 192.168.0.30/24 brd 192.168.0.255 scope global dynamic noprefixroute wlp1s0
...

$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.0.254   0.0.0.0         UG    600    0        0 wlp1s0
127.0.0.0       localhost       255.0.0.0       UG    0      0        0 lo
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
172.18.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-db8a7800fecc
192.168.0.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp1s0

After Ethernet plugged (via usb):

$ ip a
(all same except this added:)
28: enp0s20f0u2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:50:b6:c8:7d:91 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.16/24 brd 192.168.0.255 scope global dynamic noprefixroute enp0s20f0u2
       valid_lft 863985sec preferred_lft 863985sec
    inet6 fe80::c30:1b2a:6c74:3eb2/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.0.254   0.0.0.0         UG    600    0        0 wlp1s0
default         192.168.0.254   0.0.0.0         UG    20100  0        0 enp0s20f0u2
127.0.0.0       localhost       255.0.0.0       UG    0      0        0 lo
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
172.18.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-db8a7800fecc
192.168.0.0     0.0.0.0         255.255.255.0   U     100    0        0 enp0s20f0u2
192.168.0.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp1s0


So it seems my ADSL box has misconfiguration: it shall not put both cards in the same network ;-)
Nothing to do with Linux since it is DHCP.

the dhcpd is messed up - you have two routes going through 192.168.0.0

and BTW the default network is also duplicated to the network  gateway 192.168.0.254!  >>blink<< - Say what???
Title: Re: Wifi then Ethernet -> no route
Post by: mrbrklyn on 28 April 2019, 00:36:36
default         192.168.0.254   0.0.0.0         UG    20100  0        0 enp0s20f0u2

20100 ????
Title: Re: Wifi then Ethernet -> no route
Post by: ####### on 28 April 2019, 06:10:23
So having removed Network Manager and installing WICD instead, it shows me I have 2 wifi networks with the same SSID on different channels, because it's one of those newfangled dual band types - I think that was what must have been confusing Network Manager in my case,  when combined with a bit of distance and signal drop out. Possibly relevant to the double entries above? WICD has a check box under (arrow top right corner) preferences - always switch to a wired connection when available. I've only tried WICD for a few minutes so far though.
Title: Re: Wifi then Ethernet -> no route
Post by: mrbrklyn on 29 April 2019, 00:01:24
that is not likely the problem.  The problem is that the ethernet needs to take priority over the wifi and the wifi should drop even if they are on the same network.  There is not really easy way to solve this without using the command line.  Turn off the wifi

It would also help if your DHCP Server was set up correctly.
Title: Re: Wifi then Ethernet -> no route
Post by: ####### on 29 April 2019, 03:47:26
I think Nadir's problem could be resolved by GUI, reading more about this, using the priority settings, and configuring the dual band wireless better (if that is an issue). Say you have 2 wireless networks with the same SSID, this confuses network manager in itself. Disconnect from one then it connects to the other, as the standard ethernet priority is set  to the lowest, -999 and both wireless networks, even if they are identified separately will be 10 or whatever they were as default.  So do something about that. And also separate the two networks -  change the router settings (if it's possible), but it's worth noting that common ISP provided routers do seem to give both 2.4 and 5GHz bands the same SSID and passphrase as the standard setting so this is probably quite a common situation. The other way is not give the SSID to network manager but use the BSSID instead, so network manager can tell them apart instead of creating double entries and apparently suffering a logic breakdown.
There are some network manager guides online that might help.
Or use wicd, which can automatically tell there are 2 different networks but with the same SSID, without having to be told about this! That's what I'm using now and still without issues.
Can any of them use the 2 bands simultaneously I wonder - sadly my router doesn't support this so I couldn't say. I was actually surprised my wireless card could even see the second network, I didn't know it could do dual band.
Manual config is great to make a simple connection at home, but not in some instances if I need to connect quickly to someone elses unknown network. I've been using manual config of dhcpcd and wpa-supplicant but with the SSID and I think that was causing problems there too, occasionally getting a slow connection, probably due to randomly hooking up to the 'wrong' network, so this has revealed something useful there too.
Title: Re: Wifi then Ethernet -> no route
Post by: mrbrklyn on 29 April 2019, 09:05:10
or he can turn the wifi off and gui's generally suck....

he doesn't need the wifi because the ehternet cable is connected and they running the same route

Code: [Select]
ifconfig wlp1s0 down
Title: Re: Wifi then Ethernet -> no route
Post by: Nadir on 01 May 2019, 20:23:05
Thank you all for the hints, I checked it and can't configure my Box's DHCP.
It only allows me to set a DMZ. Poor settings.

When I was using Ubuntu Maté then Antergos, Same Box, I never had the problem. I mean I never noticed (in fact I never checked my routes).

I think if we want to consider Artix a decent Distro, it shall work without command line with this kind of common cases.

Next time I reboot I'll check if my NetworkManager's priority settings solve it
Title: Re: Wifi then Ethernet -> no route
Post by: mrbrklyn on 03 May 2019, 04:23:44

I think if we want to consider Artix a decent Distro, it shall work without command line with this kind of common cases.





I don't define a distro like that...
Title: Re: Wifi then Ethernet -> no route
Post by: Nadir on 03 May 2019, 05:55:57
You right, sure.
But we want Artix to get some audience. Do we?
Title: Re: Wifi then Ethernet -> no route
Post by: fungalnet on 03 May 2019, 06:35:20
Quote
When I was using Ubuntu Maté then Antergos, Same Box, I never had the problem. I mean I never noticed (in fact I never checked my routes).

 I think if we want to consider Artix a decent Distro, it shall work without command line

First you say you went to the router and disabled dhcp and it fixed the problem, then you say you shouldn't  have to use the command line, but you never had to check before with other distros.
Did you use connman or wicd on other distros?  Why don't you use it here to avoid the command line?  Because when in a gui you click to disable eth or wlan it does exactly the same thing as ifconfig wlan0 down.  I think net..man.. has some minimal gui thing that usually pops up in a panel with a 2 screen icon and you can point and click there too.

You come from distros with systemd, you use networkmanager and you measure decency by not having to use the terminal?  Why are you on Artix?  Is it because of the pretty desktop  themes?  I think this is a bigger problem than your nm crisis.   I condemn the practice of others in this thread of referring to you in third person (the us him mentality is not conducive to any community - c'mon mrbrklyn I thought you would know better) or having a personal conversation in an open forum.

Unless you convert your machine into a router the "box" is your router and defines the network for you.  It is most likely running some form of simple old linux in it, and least likely it has systemd in it.    Should your smart router distinguish you with a machine connected with ethernet and another machine connected with wifi, or should it be able to identify that this eth-card and this wifi-card belongs to the same machine?  Why?  How?

 If you are running just a personal PC to a home router, why use the long if names and not eth0 and wlan0?  If as you say it is some new type of wifi card it would be wlan0 wlan1.  If you don't know and don't care to learn why not use Mint or Windows 10?

Title: Re: Wifi then Ethernet -> no route
Post by: mrbrklyn on 03 May 2019, 12:11:00
You right, sure.
But we want Artix to get some audience. Do we?

You can't reproduce the ip command in a gui, and I am sick of OSs designed to make people stupid.

Code: [Select]
IP(8)                                Linux                               IP(8)

NAME
       ip - show / manipulate routing, network devices, interfaces and tunnels

SYNOPSIS
       ip [ OPTIONS ] OBJECT { COMMAND | help }

       ip [ -force ] -batch filename

       OBJECT := { link | address | addrlabel | route | rule | neigh | ntable
               | tunnel | tuntap | maddress | mroute | mrule | monitor | xfrm
               | netns | l2tp | tcp_metrics | token | macsec }

       OPTIONS := { -V[ersion] | -h[uman-readable] | -s[tatistics] |
               -d[etails] | -r[esolve] | -iec | -f[amily] { inet | inet6 |
               link } | -4 | -6 | -I | -D | -B | -0 | -l[oops] { maximum-addr-
               flush-attempts } | -o[neline] | -rc[vbuf] [size] | -t[imestamp]
               | -ts[hort] | -n[etns] name | -a[ll] | -c[olor] | -br[ief] |
               -j[son] | -p[retty] }

OPTIONS
       -V, -Version
              Print the version of the ip utility and exit.

       -h, -human, -human-readable
              output statistics with human readable values followed by suffix.

       -b, -batch <FILENAME>
              Read commands from provided file or standard input and invoke
              them.  First failure will cause termination of ip.

       -force Don't terminate ip on errors in batch mode.  If there were any
              errors during execution of the commands, the application return
              code will be non zero.

       -s, -stats, -statistics
              Output more information. If the option appears twice or more,
              the amount of information increases.  As a rule, the information
              is statistics or some time values.

       -d, -details
              Output more detailed information.

       -l, -loops <COUNT>
              Specify maximum number of loops the 'ip address flush' logic
              will attempt before giving up. The default is 10.  Zero (0)
              means loop until all addresses are removed.

       -f, -family <FAMILY>
              Specifies the protocol family to use. The protocol family iden‐
              tifier can be one of inet, inet6, bridge, mpls or link.  If this
              option is not present, the protocol family is guessed from other
              arguments. If the rest of the command line does not give enough
              information to guess the family, ip falls back to the default
              one, usually inet or any.  link is a special family identifier
              meaning that no networking protocol is involved.

       -4     shortcut for -family inet.

       -6     shortcut for -family inet6.

       -B     shortcut for -family bridge.

       -M     shortcut for -family mpls.

       -0     shortcut for -family link.

       -o, -oneline
              output each record on a single line, replacing line feeds with
              the '\' character. This is convenient when you want to count
              records with wc(1) or to grep(1) the output.

       -r, -resolve
              use the system's name resolver to print DNS names instead of
              host addresses.

       -n, -netns <NETNS>
              switches ip to the specified network namespace NETNS.  Actually
              it just simplifies executing of:

              ip netns exec NETNS ip [ OPTIONS ] OBJECT { COMMAND | help }

              to

              ip -n[etns] NETNS [ OPTIONS ] OBJECT { COMMAND | help }

       -a, -all
              executes specified command over all objects, it depends if com‐
              mand supports this option.

       -c[color][={always|auto|never}
              Configure color output. If parameter is omitted or always, color
              output is enabled regardless of stdout state. If parameter is
              auto, stdout is checked to be a terminal before enabling color
              output. If parameter is never, color output is disabled. If
              specified multiple times, the last one takes precedence. This
              flag is ignored if -json is also given.

              Used color palette can be influenced by COLORFGBG environment
              variable (see ENVIRONMENT).

       -t, -timestamp
              display current time when using monitor option.

       -ts, -tshort
              Like -timestamp, but use shorter format.

       -rc, -rcvbuf<SIZE>
              Set the netlink socket receive buffer size, defaults to 1MB.

       -iec   print human readable rates in IEC units (e.g. 1Ki = 1024).

       -br, -brief
              Print only basic information in a tabular format for better
              readability. This option is currently only supported by ip addr
              show and ip link show commands.

       -j, -json
              Output results in JavaScript Object Notation (JSON).

       -p, -pretty
              The default JSON format is compact and more efficient to parse
              but hard for most users to read.  This flag adds indentation for
              readability.

IP - COMMAND SYNTAX
   OBJECT
       address
              - protocol (IP or IPv6) address on a device.

       addrlabel
              - label configuration for protocol address selection.

       l2tp   - tunnel ethernet over IP (L2TPv3).

       link   - network device.

       maddress
              - multicast address.

       monitor
              - watch for netlink messages.

       mroute - multicast routing cache entry.

       mrule  - rule in multicast routing policy database.

       neighbour
              - manage ARP or NDISC cache entries.

       netns  - manage network namespaces.

       ntable - manage the neighbor cache's operation.

       route  - routing table entry.

       rule   - rule in routing policy database.

       tcp_metrics/tcpmetrics
              - manage TCP Metrics

       token  - manage tokenized interface identifiers.

       tunnel - tunnel over IP.

       tuntap - manage TUN/TAP devices.

       xfrm   - manage IPSec policies.

       The names of all objects may be written in full or abbreviated form,
       for example address can be abbreviated as addr or just a.

   COMMAND
       Specifies the action to perform on the object.  The set of possible ac‐
       tions depends on the object type.  As a rule, it is possible to add,
       delete and show (or list ) objects, but some objects do not allow all
       of these operations or have some additional commands. The help command
       is available for all objects. It prints out a list of available com‐
       mands and argument syntax conventions.

       If no command is given, some default command is assumed.  Usually it is
       list or, if the objects of this class cannot be listed, help.
ENVIRONMENT
       COLORFGBG
              If set, it's value is used for detection whether background is
              dark or light and use contrast colors for it.

              COLORFGBG environment variable usually contains either two or
              three values separated by semicolons; we want the last value in
              either case.  If this value is 0-6 or 8, chose colors suitable
              for dark background:

              COLORFGBG=";0" ip -c a

EXIT STATUS
       Exit status is 0 if command was successful, and 1 if there is a syntax
       error.  If an error was reported by the kernel exit status is 2.

EXAMPLES
       ip addr
           Shows addresses assigned to all network interfaces.

       ip neigh
           Shows the current neighbour table in kernel.

       ip link set x up
           Bring up interface x.

       ip link set x down
           Bring down interface x.

       ip route
           Show table routes.

HISTORY
       ip was written by Alexey N. Kuznetsov and added in Linux 2.2.

SEE ALSO
       ip-address(8), ip-addrlabel(8), ip-l2tp(8), ip-link(8), ip-maddress(8),
       ip-monitor(8), ip-mroute(8), ip-neighbour(8), ip-netns(8), ip-
       ntable(8), ip-route(8), ip-rule(8), ip-tcp_metrics(8), ip-token(8), ip-
       tunnel(8), ip-xfrm(8)
       IP Command reference ip-cref.ps

REPORTING BUGS
       Report any bugs to the Network Developers mailing list <net‐
       dev@vger.kernel.org> where the development and maintenance is primarily
       done.  You do not have to be subscribed to the list to send a message
       there.

AUTHOR
       Original Manpage by Michail Litvak <mci@owl.openwall.com>

iproute2                          20 Dec 2011                            IP(8)




And that is the tip of the iceburg.  When you run DHCP then you let DHCP make your settings.  If that is controlled by an idiot, or someone who treats you like an idiot, then it is screws up your end point work station, whether it is a laptop or a  tablet or whatever.

You are running two identical networks through two difference network devices.  It is FUNDEMENTALLY broken.
Title: Re: Wifi then Ethernet -> no route
Post by: mrbrklyn on 03 May 2019, 12:13:22
Quote
ARP(8)                                  Linux System Administrator's Manual                                 ARP(8)

NAME
       arp - manipulate the system ARP cache

SYNOPSIS
       arp [-vn] [-H type] [-i if] [-ae] [hostname]

       arp [-v] [-i if] -d hostname [pub]

       arp [-v] [-H type] [-i if] -s hostname hw_addr [temp]

       arp [-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pub

       arp [-v] [-H type] [-i if] -Ds hostname ifname [netmask nm] pub

       arp [-vnD] [-H type] [-i if] -f [filename]

DESCRIPTION
       Arp  manipulates  or  displays  the kernel's IPv4 network neighbour cache. It can add entries to the table,
       delete one or display the current content.

       ARP stands for Address Resolution Protocol, which is used to find the media access  control  address  of  a
       network neighbour for a given IPv4 Address.

MODES
       arp  with no mode specifier will print the current content of the table. It is possible to limit the number
       of entries printed, by specifying an hardware address type, interface name or host address.

       arp -d address will delete a ARP table entry. Root or netadmin privilege is required to do this. The  entry
       is  found by IP address. If a hostname is given, it will be resolved before looking up the entry in the ARP
       table.

       arp -s address hw_addr is used to set up a new table entry. The format of the hw_addr parameter  is  depen‐
       dent  on  the  hardware class, but for most classes one can assume that the usual presentation can be used.
       For the Ethernet class, this is 6 bytes in hexadecimal, separated by colons. When adding proxy arp  entries
       (that  is those with the publish flag set) a netmask may be specified to proxy arp for entire subnets. This
       is not good practice, but is supported by older kernels because it can be useful. If the temp flag  is  not
       supplied  entries  will  be  permanent stored into the ARP cache. To simplify setting up entries for one of
       your own network interfaces, you can use the arp -Ds address ifname form. In that case the hardware address
       is taken from the interface with the specified name.

Title: Re: Wifi then Ethernet -> no route
Post by: phoenix_king_rus on 03 May 2019, 12:46:10
It is most likely running some form of simple old linux in it, and least likely it has systemd in it.

I have once tried to create router upon systemd distro. That was a whole pain and i changed it to runit soon.

If you are running just a personal PC to a home router, why use the long if names and not eth0 and wlan0?

Udev takes care of that. I don't think it's easy to change such behavior. However, on Arch Linux ARM udev still keeps short names for network interfaces
Title: Re: Wifi then Ethernet -> no route
Post by: artoo on 03 May 2019, 13:01:31
I have once tried to create router upon systemd distro. That was a whole pain and i changed it to runit soon.

Udev takes care of that. I don't think it's easy to change such behavior. However, on Arch Linux ARM udev still keeps short names for network interfaces


Quote
Revert to traditional interface names

If you would prefer to retain traditional interface names such as eth0, Predictable Network Interface Names can be disabled by masking the udev rule:

Code: [Select]
# ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules

Alternatively, add net.ifnames=0 to the kernel parameters.
https://wiki.archlinux.org/index.php/Network_configuration#Change_interface_name

 ;)
Title: Re: Wifi then Ethernet -> no route
Post by: mrbrklyn on 03 May 2019, 16:08:11
Quote
Set device MTU and queue length

You can change the device MTU and queue length by defining manually with an udev-rule. For example:

/etc/udev/rules.d/10-network.rules

ACTION=="add", SUBSYSTEM=="net", KERNEL=="wl*", ATTR{mtu}="1500", ATTR{tx_queue_len}="2000"


ummm - don't do that...

At least don't set it over 1500 unless you want to kill the majority of hardware...
Title: Re: Wifi then Ethernet -> no route
Post by: ####### on 04 May 2019, 02:50:09
networkmanager is a package in world - it's an Artix package, so we should be concerned if it is broken, as it is an offence to the flawless perfection that is usually found in Artix. So Nadir, well done for testing it and letting everyone know it isn't working, also pointing out some other distros where it does work, as that may provide some hints as to what patches or versions might hold the solution. Clearly there are few others who wish to undertake this task.  ;D  It's also very helpful that others can point out how to get around the problem by a variety of other methods, and WICD is still working perfectly for me, but I'm dodging the issue there, not fixing the networkmanager package, and that could require even more expertise than command line config, so it depends how you look at things really.
Title: Re: Wifi then Ethernet -> no route
Post by: Nadir on 20 May 2019, 12:20:46
In the end, the problem is mainly not fixed.

The internet box does not have any option to put NIC & wifi in 2 separate networks.
Changing the priority seems worses in fact.

So I am still forced to manually disconnect wifi when plugging ethernet, but it not a problem with Artix.
Title: Re: Wifi then Ethernet -> no route
Post by: ####### on 20 May 2019, 15:55:32
Have you tried dhclient instead of dhcpcd? Debian based OS's use that with networkmanager. Also networkmanager-git is in the AUR, it's on version 1.19.x now so you could go a bit newer.
Title: Re: Wifi then Ethernet -> no route
Post by: mrbrklyn on 20 May 2019, 19:06:21
Have you tried dhclient instead of dhcpcd? Debian based OS's use that with networkmanager. Also networkmanager-git is in the AUR, it's on version 1.19.x now so you could go a bit newer.


how does that help with one network assigned to two devices?
Title: Re: Wifi then Ethernet -> no route
Post by: ####### on 21 May 2019, 15:44:23
Don't know! But trying dhclient with wicd instead of dhcpcd, it still worked OK. Then I spotted something odd with wicd too, looking at the wpa_supplicant conf file revealed by
Code: [Select]
$ ps -ef |ag wpa
it does NOT use the bssid, just the ssid, although "Use these settings for all networks sharing this essid" in the properties of the configured network is not ticked. So although wicd shows the 2 networks with the same SSID but different BSSID individually in the gui connection menu, the wpa_supplicant conf file it auto generates does not (apparently)  distinguish between them, unless it has found some other way to ensure it connects to the correct one, that I don't know about. But I thought wpa_supplicant makes the wireless connection and would only work with the information it's given. So wicd might be even worse than Network Manager in some respects but in less obvious ways, and doesn't behave as it's own documentation suggests it should.
Title: Re: Wifi then Ethernet -> no route
Post by: mrbrklyn on 22 May 2019, 16:55:28
https://sourcedaddy.com/networking/bssid-ssid-and-essid.html

that can not solve the problem your having.  That problem is at the routers dhcp which is allocating two devices for one network
Title: Re: Wifi then Ethernet -> no route
Post by: ####### on 22 May 2019, 22:00:32
Code: [Select]
$ sudo iw dev wlp12s0 scan

BSS aa:11:bb:22:cc:33(on wlpxxxxxxx)
...
        SSID: my-ap-name
...
                 * primary channel: 4


BSS aa:11:bb:22:cc:34(on wlpxxxxxxx)
...
        SSID: my-ap-name
...
                 * primary channel: 44


wpa_supplicant.conf
...
#ssid=my-ap-name < this would connect to either aa:11:bb:22:cc:33 or aa:11:bb:22:cc:34
bssid=aa:11:bb:22:cc:33
...

In my case I have a dual band wireless router, by default it has 2 channels with the same ssid. WICD sees them in it's gui but wrote a wpa_supplicant.conf using the ssid. wpa_supplicant makes the wireless connection for any method, gui or cli. Similar problems seemed to happen in Network Manager but it might have more config options to fix it.
I returned to a basic manual config for now without any gui to try this out, and it's working OK with the bssid field, with both dhcpcd and dhclient. The higher channel is slower so you need to specify which one, if that's temporarily stronger at startup then the connection might go to that.
So that's what I meant by using the bssid.
Title: Re: Wifi then Ethernet -> no route
Post by: mrbrklyn on 22 May 2019, 23:08:20
Code: [Select]
$ sudo iw dev wlp12s0 scan

BSS aa:11:bb:22:cc:33(on wlpxxxxxxx)
...
        SSID: my-ap-name
...
                 * primary channel: 4


BSS aa:11:bb:22:cc:34(on wlpxxxxxxx)
...
        SSID: my-ap-name
...
                 * primary channel: 44


wpa_supplicant.conf
...
#ssid=my-ap-name < this would connect to either aa:11:bb:22:cc:33 or aa:11:bb:22:cc:34
bssid=aa:11:bb:22:cc:33
...

In my case I have a dual band wireless router, by default it has 2 channels with the same ssid. WICD sees them in it's gui but wrote a wpa_supplicant.conf using the ssid. wpa_supplicant makes the wireless connection for any method, gui or cli. Similar problems seemed to happen in Network Manager but it might have more config options to fix it.
I returned to a basic manual config for now without any gui to try this out, and it's working OK with the bssid field, with both dhcpcd and dhclient. The higher channel is slower so you need to specify which one, if that's temporarily stronger at startup then the connection might go to that.
So that's what I meant by using the bssid.



ESSID and said derivitive have nothing to do with ethernet

there also might be a udev issue with wifi
Title: Re: Wifi then Ethernet -> no route
Post by: ####### on 23 May 2019, 03:30:53
Oh yes, there's no ssid field in the  wpa_supplicant.conf man page ethernet example, even if wpa_supplicant was used to connect to ethernet, you're right, that's a different issue. Thank you for explaining it.
Title: Re: Wifi then Ethernet -> no route
Post by: mrbrklyn on 23 May 2019, 06:00:30
ethernet, if not hard coded, is brought up by udev when a connection is sensed.  I am actually not sure how this works because I ripped it out of my OS, but if the ethernet connection goes down, udev takes down the eth0 or whatever UUID name it has.  ANd it likwise brings it up and calls either dhcpcd or whatever.

http://www.tldp.org/HOWTO/Ethernet-HOWTO.html for backgroung

https://linuxconfig.org/tutorial-on-how-to-write-basic-udev-rules-in-linux

https://www.linuxquestions.org/questions/linux-networking-3/ethernet-auto-connect-auto-sense-doesn't-work-860604/

https://www.linuxjournal.com/content/fun-ethtool

https://www.linuxquestions.org/questions/linux-networking-3/ethernet-auto-connect-auto-sense-doesn't-work-860604/

aside from the gentoo and arch networking howtos
https://wiki.archlinux.org/index.php/Wake-on-LAN


Fix the ethernet FIRST.  Then work on the wifi