On a Rasberry Pi 4 I have Ubuntu 20.10 and I don't manage to connect it to the newtwork via ethernet cable. It says 'cable unplugged' on the Settings and none of what I tried on the command line works.
I've tried plugging the cable before and after boot.
There are not LED indicating the cable is plugged in, I don't know if this is normal.sudo ifconfig eth0 up didn't help
in /sys/class/net/eth0/carrier there is always a '0'
in /sys/class/net/eth0/operstat I see 'down'
ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether dc:a6:32:da:71:45 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 3821 bytes 378769 (378.7 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 3821 bytes 378769 (378.7 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0nmcli device status
DEVICE TYPE STATE CONNECTION
eth0 ethernet unavailable --
wlan0 wifi unavailable --
p2p-dev-wlan0 wifi-p2p unavailable --
lo loopback unmanaged -- nmcli device show eth0
GENERAL.DEVICE: eth0
GENERAL.TYPE: ethernet
GENERAL.HWADDR: DC:A6:32:DA:71:45
GENERAL.MTU: 1500
GENERAL.STATE: 20 (unavailable)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --
WIRED-PROPERTIES.CARRIER: offcat /etc/netplan/01-network-manager-all.yaml
# Let NetworkManager manage all devices on this system
network: version: 2 renderer: NetworkManager 2 Answers
There are not LED indicating the cable is plugged in, I don't know if this is normal.
It's not. Probably your cable or ethernet port in either end is broken. Try with a different cable, and verify that connection to a different computer works.
1So this was not an Ubuntu question. Sorry for having posted it here.
This was a Raspberry question and the answer is that the Pi 4 is strict regarding the cable. It has to be a Gigabit one (all the way from the router to the Pi). My test with the laptop PC was not 100% relevant or sufficient.
I've now plugged the Raspberry with a cat.5e Gigabit cable directly to the (Swisscom - I live in Switzerland) router and it works just fine. LEDs turn on, ifconfig displays the eth0 connection (ip etc), /sys/class/net/eth0/carrier has '1'. And for the records, same behavior with Raspberry Pi OS and Ubuntu.