You are not logged in.

#1 2022-04-17 14:36:45

Strangiato
Member
Registered: 2020-01-10
Posts: 382

[Solved] Ethernet without connectivity to internet. Wi-Fi works.

Hi
I follow these steps:

1. I connect to wi-fi network
2. while the laptop is connected to wi-fi, I connect a network cable to ethernet adapter

After these steps, the ethernet cable is detected, airplaine mode of the laptop
is activated, but I can't load any website and ping command fails.
However, local network has connectivity, I can mount samba shares.

I connect to wi-fi using network manager + iwd + dns client of iwd.
I also use network manager to connect to wired network.

My wired network has connectivity to internet if airplaine mode is activated
before ethernet cable is connected.

I use this dispacher to automatically toggle wireless depending on LAN cable being plugged in

https://wiki.archlinux.org/title/Networ … plugged_in

How to fix the lack of connectivity to internet when the ethernet cable is connected while my laptop is connected to wi-fi?

Thanks for reading.

Last edited by Strangiato (2022-04-17 17:47:46)

Offline

#2 2022-04-17 15:23:34

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: [Solved] Ethernet without connectivity to internet. Wi-Fi works.

What are the output of ip route with WiFi, With non-working wired, and with working  wired?  Also, for context, what are the output of ip addr for those states?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2022-04-17 15:45:55

Strangiato
Member
Registered: 2020-01-10
Posts: 382

Re: [Solved] Ethernet without connectivity to internet. Wi-Fi works.

ip route with wi-fi:

default via 192.168.0.1 dev wlan0 proto dhcp metric 304 
default via 192.168.0.1 dev wlan0 proto dhcp metric 600 
192.168.0.0/24 dev wlan0 proto dhcp scope link src 192.168.0.14 
192.168.0.0/24 dev wlan0 proto kernel scope link src 192.168.0.14 metric 600

ip addr with wi-fi:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp1s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 64:1c:67:62:de:27 brd ff:ff:ff:ff:ff:ff
4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 0c:d2:92:b5:4e:33 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.14/24 scope global dynamic noprefixroute wlan0
       valid_lft 2423sec preferred_lft 2423sec

ip route with non-working wired:

default via 192.168.0.1 dev enp1s0 proto dhcp metric 100 
192.168.0.0/24 dev enp1s0 proto kernel scope link src 192.168.0.15 metric 100 

ip addr with non-working wired:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 64:1c:67:62:de:27 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.15/24 brd 192.168.0.255 scope global dynamic noprefixroute enp1s0
       valid_lft 3460sec preferred_lft 3460sec
4: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 0c:d2:92:b5:4e:33 brd ff:ff:ff:ff:ff:ff
 

ip route with working wired:

 default via 192.168.0.1 dev enp1s0 proto dhcp metric 100 
192.168.0.0/24 dev enp1s0 proto kernel scope link src 192.168.0.15 metric 100 

ip addr with working wired:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 64:1c:67:62:de:27 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.15/24 brd 192.168.0.255 scope global dynamic noprefixroute enp1s0
       valid_lft 3541sec preferred_lft 3541sec
4: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 0c:d2:92:b5:4e:33 brd ff:ff:ff:ff:ff:ff

Offline

#4 2022-04-17 16:09:02

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: [Solved] Ethernet without connectivity to internet. Wi-Fi works.

Not what I thought it was.
When you have a non-working wired, can you ping 8.8.8.8 ?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2022-04-17 16:24:25

Strangiato
Member
Registered: 2020-01-10
Posts: 382

Re: [Solved] Ethernet without connectivity to internet. Wi-Fi works.

ewaller wrote:

Not what I thought it was.
When you have a non-working wired, can you ping 8.8.8.8 ?

yes, I can.

Offline

#6 2022-04-17 16:33:49

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: [Solved] Ethernet without connectivity to internet. Wi-Fi works.

So, it is a DNS problem.   Your IP address and routes are getting set up.

I am not your man for DNS issues, I hope others will pop in here.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2022-04-17 16:42:21

-thc
Member
Registered: 2017-03-15
Posts: 497

Re: [Solved] Ethernet without connectivity to internet. Wi-Fi works.

*Popping in*

iwd uses systemd-resolved by default (if not configured) or resolvconf (if configured to do so).

NetworkManager can be configured to cooperate with both of them.

In case of systemd-resolved make sure that it is running properly (using resolvectl)
and that /etc/resolv.conf is a symlink to /run/systemd/resolve/stub-resolv.conf.

Offline

#8 2022-04-17 16:52:15

Strangiato
Member
Registered: 2020-01-10
Posts: 382

Re: [Solved] Ethernet without connectivity to internet. Wi-Fi works.

Thank you all for the help. Here is my /etc/iwd/main.conf file:

[General]
EnableNetworkConfiguration=true
[Network]
NameResolvingService=resolvconf

Offline

#9 2022-04-17 17:24:46

-thc
Member
Registered: 2017-03-15
Posts: 497

Re: [Solved] Ethernet without connectivity to internet. Wi-Fi works.

In case of openresolv/resolvconf add a configuration file to NetworkManager:

/etc/NetworkManager/conf.d/rc-manager.conf

with this statement:

[main]
rc-manager=resolvconf

Offline

#10 2022-04-17 17:47:24

Strangiato
Member
Registered: 2020-01-10
Posts: 382

Re: [Solved] Ethernet without connectivity to internet. Wi-Fi works.

-thc wrote:

In case of openresolv/resolvconf add a configuration file to NetworkManager:

/etc/NetworkManager/conf.d/rc-manager.conf

with this statement:

[main]
rc-manager=resolvconf

Followed your instructions, restarted NetworkManager service, now the problem is solved! Thank you very much.

Offline

Board footer

Powered by FluxBB