I swapped motherboard in my ubuntu 22.04 server and I get no connection through ethernet.
I did try this No ethernet connection in Ubuntu 19.04 after changing motherboard
changing my /etc/netplan/50-cloud.init.yaml to use the new enp0s31f6 interface, and I got connection to the network. Then had to unplug the machine and the ethernet did not work after it booted up, redoing the suggested netplan reconfigure did not work a second time. ping: connect: Network is unreachable
Im not sure how I can provide all information as I cannot copy paste information and I have lots of docker containers running flooding the information.
lshw -C network
*-network
description: Ethernet interface
product: Ethernet Connection(2) I219-V
vendor: Intel Corporation
physical id: 1f.6
bus info: pci@000:00::1f.6
logical name: enp0s31f6
version: 31
serial:4c:cc:6a:67:f2:3c
size: 1Gbit/s
capacity: 1Gbit
configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=5.15.0-75-generic duplex=full firmware=0.8.4 latency=0 link=yes multicast=yes ...
....
/etc/netplan/50-cloud-init.yaml
network:
ethernets:
# enp3s0:
enp0s31f6:
dhcp4: true
version: 2
ip route
does not show my gateway, so I try to add it with
sudo ip route add 192.168.0.1 dev enp0s31f6
sudo ip route add default via 192.168.0.1
Now the network adapter seems to be alive, I can start to ping something but there is no response.
my /etc/resolv.conf
is looking strange
nameserver 127.0.0.53
options edns0 trust-ad
search.
Sorry for typos as all information is copied manually. I dont know what im doing and it feels like I've tried alot. Do you have any ideas what could be wrong?
edit I noticed that after adding the default route to my gateway, resetting the interface with ip link set enp0s31f6 down
and up, brings me back to ping: connect: Network is unreachable
edit removed /etc/network/interfaces content and posted /etc/netplan/50-cloud-init.yaml