Ubuntu is simply unable to connect to the internet with my ethernet cable only.
Right now, I'm using my Android's USB tethering to use internet on my PC (and my smartphone is connect to my home wi-fi, so I'm sure my ISP is working fine).
My /etc/network/interfaces/
looks like this:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto enp3s0
iface enp3s0 inet dhcp
Here's /etc/netplan/01-network-manager-all.yaml
:
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
I've also tried setting it up like this:
network:
version: 2
renderer: NetworkManager
ethernets:
enp3s0:
dhcp4: yes
Also, here is my ip a
's return:
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: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 4c:cc:6a:31:2a:54 brd ff:ff:ff:ff:ff:ff
inet6 fe80::7ac1:a722:308f:d5c9/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: br-0dd10757eac2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:c3:76:83:5c brd ff:ff:ff:ff:ff:ff
inet 192.168.16.1/20 brd 192.168.31.255 scope global br-0dd10757eac2
valid_lft forever preferred_lft forever
4: br-2602647a4bc8: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:ac:d0:79:4c brd ff:ff:ff:ff:ff:ff
inet 172.19.0.1/16 brd 172.19.255.255 scope global br-2602647a4bc8
valid_lft forever preferred_lft forever
5: br-67b2d0fec27c: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:a8:23:e6:a2 brd ff:ff:ff:ff:ff:ff
inet 172.30.0.1/16 brd 172.30.255.255 scope global br-67b2d0fec27c
valid_lft forever preferred_lft forever
inet6 fe80::42:a8ff:fe23:e6a2/64 scope link
valid_lft forever preferred_lft forever
6: br-7232e2406aa2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:98:1d:de:70 brd ff:ff:ff:ff:ff:ff
inet 172.20.0.1/16 brd 172.20.255.255 scope global br-7232e2406aa2
valid_lft forever preferred_lft forever
inet6 fe80::42:98ff:fe1d:de70/64 scope link
valid_lft forever preferred_lft forever
7: br-7b94585cbf79: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:24:13:e6:db brd ff:ff:ff:ff:ff:ff
inet 172.18.0.1/16 brd 172.18.255.255 scope global br-7b94585cbf79
valid_lft forever preferred_lft forever
inet6 fe80::42:24ff:fe13:e6db/64 scope link
valid_lft forever preferred_lft forever
8: br-e18e5fb77fd4: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:47:51:c5:9c brd ff:ff:ff:ff:ff:ff
inet 172.21.0.1/16 brd 172.21.255.255 scope global br-e18e5fb77fd4
valid_lft forever preferred_lft forever
9: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:a2:00:88:18 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever
11: veth7dfd7e8@if10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-67b2d0fec27c state UP group default
link/ether ba:51:fc:32:89:de brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet6 fe80::b851:fcff:fe32:89de/64 scope link
valid_lft forever preferred_lft forever
15: veth93f0960@if14: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-67b2d0fec27c state UP group default
link/ether 5a:4f:dc:00:89:bd brd ff:ff:ff:ff:ff:ff link-netnsid 1
inet6 fe80::584f:dcff:fe00:89bd/64 scope link
valid_lft forever preferred_lft forever
17: veth29e9415@if16: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-7232e2406aa2 state UP group default
link/ether da:4b:c8:5f:b8:6f brd ff:ff:ff:ff:ff:ff link-netnsid 2
inet6 fe80::d84b:c8ff:fe5f:b86f/64 scope link
valid_lft forever preferred_lft forever
25: enp0s20u10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
link/ether 4e:4a:37:e5:de:fa brd ff:ff:ff:ff:ff:ff
inet 192.168.42.140/24 brd 192.168.42.255 scope global dynamic noprefixroute enp0s20u10
valid_lft 3584sec preferred_lft 3584sec
inet6 fe80::92de:3476:9931:f126/64 scope link noprefixroute
valid_lft forever preferred_lft forever
➜ ~ sudo vim /etc/network/interfaces
[sudo] password for kio:
➜ ~ ip a
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: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 4c:cc:6a:31:2a:54 brd ff:ff:ff:ff:ff:ff
3: br-0dd10757eac2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:c3:76:83:5c brd ff:ff:ff:ff:ff:ff
inet 192.168.16.1/20 brd 192.168.31.255 scope global br-0dd10757eac2
valid_lft forever preferred_lft forever
4: br-2602647a4bc8: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:ac:d0:79:4c brd ff:ff:ff:ff:ff:ff
inet 172.19.0.1/16 brd 172.19.255.255 scope global br-2602647a4bc8
valid_lft forever preferred_lft forever
5: br-67b2d0fec27c: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:a8:23:e6:a2 brd ff:ff:ff:ff:ff:ff
inet 172.30.0.1/16 brd 172.30.255.255 scope global br-67b2d0fec27c
valid_lft forever preferred_lft forever
inet6 fe80::42:a8ff:fe23:e6a2/64 scope link
valid_lft forever preferred_lft forever
6: br-7232e2406aa2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:98:1d:de:70 brd ff:ff:ff:ff:ff:ff
inet 172.20.0.1/16 brd 172.20.255.255 scope global br-7232e2406aa2
valid_lft forever preferred_lft forever
inet6 fe80::42:98ff:fe1d:de70/64 scope link
valid_lft forever preferred_lft forever
7: br-7b94585cbf79: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:24:13:e6:db brd ff:ff:ff:ff:ff:ff
inet 172.18.0.1/16 brd 172.18.255.255 scope global br-7b94585cbf79
valid_lft forever preferred_lft forever
inet6 fe80::42:24ff:fe13:e6db/64 scope link
valid_lft forever preferred_lft forever
8: br-e18e5fb77fd4: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:47:51:c5:9c brd ff:ff:ff:ff:ff:ff
inet 172.21.0.1/16 brd 172.21.255.255 scope global br-e18e5fb77fd4
valid_lft forever preferred_lft forever
9: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:a2:00:88:18 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever
11: veth7dfd7e8@if10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-67b2d0fec27c state UP group default
link/ether ba:51:fc:32:89:de brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet6 fe80::b851:fcff:fe32:89de/64 scope link
valid_lft forever preferred_lft forever
15: veth93f0960@if14: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-67b2d0fec27c state UP group default
link/ether 5a:4f:dc:00:89:bd brd ff:ff:ff:ff:ff:ff link-netnsid 1
inet6 fe80::584f:dcff:fe00:89bd/64 scope link
valid_lft forever preferred_lft forever
17: veth29e9415@if16: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-7232e2406aa2 state UP group default
link/ether da:4b:c8:5f:b8:6f brd ff:ff:ff:ff:ff:ff link-netnsid 2
inet6 fe80::d84b:c8ff:fe5f:b86f/64 scope link
valid_lft forever preferred_lft forever
27: enp0s20u10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
link/ether 4e:4a:37:e5:de:fa brd ff:ff:ff:ff:ff:ff
inet 192.168.42.140/24 brd 192.168.42.255 scope global dynamic noprefixroute enp0s20u10
valid_lft 3353sec preferred_lft 3353sec
inet6 fe80::46a:56b4:3bcb:5368/64 scope link noprefixroute
valid_lft forever preferred_lft forever
The last device is my smartphone which I'm currently using to connect to the internet on Ubuntu.
If I unplug my smartphone, the network manager gets stuck in "connecting..."
I believe enp3s0
should be the one working properly, but it stopped working and I don't know why.
Wish Ubuntu had an easier way to deal with such problems (like performing a reinstall of such settings and leaving it as it would if I was actually installing Ubuntu for the 1st time).
Been trying to fix this for hours, help is much appreciated. I wouldn't like to format my PC just to solve this.
Thanks