Score:0

Ethernet device disconnected and cannot reach router

ug flag

Im running 22.04 and just changed motherboard and cannot access my router any more. It did work for a brief moment when I swapped the device, to the current one, in the /etc/netplan/50-cloud-init.yaml. But after a reboot it did not work any longer. I should add that during the same time,I swapped the IP to the same as the previous machine used in my router settings. The router settings for this machine should now be restored to non-static ip.

Some strange things is this

# ip a

..
2: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_code1 state UP group default qlen 1000
link/ether 4c:cc:6a:67:XX:XX.XX.XX brd ff:ff:ff:ff...

Shouldnt there be any inet entries?

This is my /etc/netplan/50-cloud-init.yaml

network:
    ethernets:
        enp0s31f6:
            dhcp4: true
            match: 
                macaddress: 4c:cc:6a:67:XX:XX.XX.XX
            set-name: enp0s31f6
            routes:
                - on-link: true
                to: default
                via: 192.168.0.1   
    version: 2

I added routes because there was no default route otherwise and it was impossible to even try to ping anything.

#: nmcli device status
enp0s31f6 ethernet disconnected

Im lost and I dont know how to continue. Some other things I've tried is to manually upgrade the old network drivers for e1000e, which I've found to be a problematic driver for others aswell. But I could not install either of the two latest releases, compilation error..

#: ethtool -i enp0s31f6
driver: e1000e
version: 5.15.0.75-generic
firmware-version: 0.8-4
expansion-rom-version:
bus-info: 0000:00:1f.6
supports-statistics: yues
supports-test: yes
supports-eeprom-access: yes
supports.....
chili555 avatar
cn flag
Please see: `cat /usr/share/doc/netplan/examples/dhcp.yaml` Your netplan file needs no more than that. Then: `sudo netplan generate` and `sudo netplan apply` If this is a desktop installation, you are better off to revert all settings in favor of network Manager. Did you connect? Welcome to Ask Ubuntu.
Rasmus avatar
ug flag
Im more than happy to revert all settings. Do you know a simple way? Most examples i've found are using older verisons of netplan. My dhcp.yaml example only includes `renderer: networkd` aswell which I've now added, no success
chili555 avatar
cn flag
Is this a desktop using Network Manager?
Rasmus avatar
ug flag
Sorry, im not sure? It is a desktop but im not sure how I know if it is or should be using network manager? I dont have any service called network-manager
chili555 avatar
cn flag
What does: `sudo service NetworkManager status` tell us? You needn't post the whole thing, just tell us if it's active.
Rasmus avatar
ug flag
It is active, but there are warnings from my ethernet interface, `failure to add IPv4 route...: invalid argument` and `Activation failed for connection 'netplan-enp0s31f6`
Score:1
cn flag

First, let’s set aside your malformed netplan file:

sudo mv /etc/netplan/50-cloud-init.yaml /etc/netplan/50-cloud-init.bak

Now let’s write a new one:

sudo nano /etc/netplan/01-network-manager-all.yaml

Populate the new file with:

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

Netplan is very specific about spacing, indentation, etc., so proofread carefully twice. Save (Ctrl+o followed by Enter) and exit (Ctrl+x).

Follow with:

sudo netplan generate
sudo netplan apply

Next, I doubt that the pervious system connections will be useful, due to their UUID (Universal Unique Identifier). Let’s eliminate them and start fresh:

sudo rm /etc/NetworkManager/system-connections/*

Reboot.

Is there any improvement?

Rasmus avatar
ug flag
unfortunately no. Now I cant even begin to ping anything. `network is unreachable`. `Ip route` does not have a route to my gateway. There is probably something wrong with my router as most of my wifi units are dropped and cannot fully reconnect. Laptops cannot be connected through ethernet.
chili555 avatar
cn flag
"There is probably something wrong with my router as most of my wifi units are dropped and cannot fully reconnect." I agree. Sorry.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.