2

I've had the same setting for years in Ubuntu 16.04 LTS. This morning suddenly there was no internet access unless I shut off WiFi. I can only access with either WiFi or Ethernet turned off.

I've rebooted laptop numerous times, run sudo apt update && sudo apt upgrade, rebooted router and looked at the router configuration:

shaw router.png

The setting "DHCP-Reserved" for the WiFi card stands out. All my IP addresses are static:

$ cat /etc/hosts

127.0.0.1 localhost 127.0.1.1 alien

Add to router static IP address list

192.168.0.10 alien AW 17R3 WiFi 9c:b6:d0:10:37:f7 192.168.0.12 alien AW 17R3 Ethernet 28:f1:0e:2a:1a:ed 192.168.0.11 phone Moto E4 Plus d0:77:14:c8:bc:e5 192.168.0.13 dell Inspiron 17R-SE-7720 Ethernet 5c:f9:dd:5c:9c:53 192.168.0.14 dell Inspiron 17R-SE-7720 WiFi 60:6c:66:86:de:bd 192.168.0.15 hs100 Sony TV Wall Light 50:d4:f7:eb:41:35 192.168.0.16 android-47cdabb50f83a5ee Sony Bravia TV KBL 50W800C 192.168.0.17 hs103 Toshiba 32" TV 18:4F:32:8D:AA:97

The following lines are desirable for IPv6 capable hosts

::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters

Ethernet and Wifi cards:

$ lspci -v | grep -i net -A6
3b:00.0 Ethernet controller: Qualcomm Atheros Killer E2400 Gigabit Ethernet Controller (rev 10)
    Subsystem: Device 0707:2400
    Flags: bus master, fast devsel, latency 0, IRQ 16
    Memory at dd600000 (64-bit, non-prefetchable) [size=256K]
    I/O ports at d000 [size=128]
    Capabilities: <access denied>
    Kernel driver in use: alx
--
3c:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)
    Subsystem: Bigfoot Networks, Inc. QCA6174 802.11ac Wireless Network Adapter
    Flags: bus master, fast devsel, latency 0, IRQ 137
    Memory at dd200000 (64-bit, non-prefetchable) [size=2M]
    Capabilities: <access denied>
    Kernel driver in use: ath10k_pci
    Kernel modules: ath10k_pci

Not sure routing is relevant but here it is:

$ route -n

Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.0.1 0.0.0.0 UG 100 0 0 enp59s0 0.0.0.0 192.168.0.1 0.0.0.0 UG 600 0 0 wlp60s0 169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 enp59s0 192.168.0.0 0.0.0.0 255.255.255.0 U 100 0 0 enp59s0 192.168.0.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp60s0


Edit February 2, 2021

The issue is that DNS lookup doesn't function when both Ethernet and WiFi connected. Internet is available through direct IP addressing. Looking at the router when both Wifi and Ethernet are connected values appear to be changing?

shaw router client computers.png

So now I'll go down the DNS rabbit hole...

  • I do not know your router, so this might not matter. I use an Ubuntu server, still at 16.04, as my router/gateway/dhcp-server/local-dns... Anyway, I have to keep local static IP addresses outside of my DHCP servers pool allocation. I am suggesting that, maybe, your pool range should start at 192.168.0.30 instead of 192.168.0.10. Additionally, I have never been able to make multiple NICs from one computer on one sub-net work properly. – Doug Smythies Feb 01 '21 at 22:32
  • @DougSmythies It's been working fine for a couple of years though? Today I discovered IPv6 couldn't be turned off and I'm sure I had it turned off from the beginning so I'm exploring that now. – WinEunuuchs2Unix Feb 01 '21 at 23:22
  • The 169.254.0.0 in the routing table is normal. I don't see anything in your readings about IPv6 except the trivial settings in /etc/hosts. Why are you trying to connect both wifi and ethernet simultaneously? I doubt that Network Manager will routinely cooperate. – chili555 Feb 02 '21 at 02:37
  • @chili555 I wasn't trying to connect anything to anything else at any time. For years Ethernet was used to connect to the internet (it is faster) and WiFi connects to my TV, and AC plugs that control electricity. Suddenly today I have to turn off Ethernet or turn off WiFi in order to use the internet. 169.254.0.0 shows up in netstat for enp59s0 but not for wlp60s0 so I was just grasping at straws it was causing the conflict. I'll keep digging... – WinEunuuchs2Unix Feb 02 '21 at 05:35
  • Have you tried setting up /etc/network/interfaces instead of Network Manager? – chili555 Feb 02 '21 at 14:25
  • I'm still learning this black magic. I was thinking of making ethernet a managed device like wifi? – WinEunuuchs2Unix Feb 02 '21 at 21:00
  • Managed in Network Manager? Yes, please and the restart NM or reboot. – chili555 Feb 02 '21 at 22:50
  • @chili555 I tried this answer: https://askubuntu.com/a/893614/307523 and this answer: https://askubuntu.com/a/1169539/307523 which had no effect. I made a variation on the answers that allowed me to reboot / resume from suspend with no Ethernet at all which is a step up I guess. I'm wondering though since both Ethernet and WiFi have the same gateway 192.168.0.1 if I changed one of them to 192.168.0.2 it might stop a conflict? Again this is strange it's been working fine for a long time... – WinEunuuchs2Unix Feb 03 '21 at 00:14
  • @chili555 I also disabled IPv6 which had no effect. – WinEunuuchs2Unix Feb 03 '21 at 00:23
  • @chili555 Then I tried what I think you wanted me to try: https://askubuntu.com/a/1237469/307523 which had no effect. I still have to shut off WiFi or shut off Ethernet to use Chrome or Firefox. Note ping still works though, eg: sudo ping -c4 8.8.8.8 – WinEunuuchs2Unix Feb 03 '21 at 00:48

1 Answers1

0

Deactivate WiFi when Ethernet Connected

First I tried getting a new cable modem from the ISP.

Then I discovered a script that automatically disables WiFi when Ethernet (Network) is connected:

#!/bin/bash
export LC_ALL=C

enable_disable_wifi () { result=$(nmcli dev | grep "ethernet" | grep -w "connected") if [ -n "$result" ]; then nmcli radio wifi off else nmcli radio wifi on fi }

if [ "$2" = "up" ]; then enable_disable_wifi fi

if [ "$2" = "down" ]; then enable_disable_wifi fi

The script has to be created in a specific directory. After creation mark it executable:

chmod a+x /etc/NetworkManager/dispatcher.d/70-wifi-wired-exclusive.sh