Score:1

Internet connection is fully broken. Network is unreachable. Ubuntu Server via LAN

dk flag

my Ubuntu server lost its internet connection suddenly (I wasn't even ssh'd in). Now all pings with a hostname fail to resolve and a ping to 8.8.8.8 or 8.8.4.4 returns network is unreachable.

How can I fix this? I've attached a couple images of command that I think could help, as I can't use SSH:

resolv.conf

network/interfaces

ifconfig

ip route

I would really appreciate any help.

I've already searched for "ubuntu network unreachable" and tried everything on the first page of results. With no results except this page meant for arch: https://unix.stackexchange.com/questions/80493/arch-linux-connect-network-is-unreachable where the part with the modprobe e1000e allowed me to ping the gateway/router, but no more. However after rebooting even that didn't work anymore.

If you need anymore info, please just ask. I'm fairly new to Linux/Ubuntu.

Thanks in advance.

Edit: Networkctl says interface is degraded (configuring)

lshw -C network

cat /etc/netplan/*.yaml

ls -al /etc/resolv.conf

networkctl list

heynnema avatar
ru flag
Edit your question and show me `sudo lshw -C network` and `cat /etc/netplan/*.yaml` and `ls -al /etc/resolv.conf` and the failing networkctl command output. Start comments to me with @heynnema or I'll miss them.
Fischchen avatar
dk flag
Hey @heynnema I added the outputs you asked for. Thanks for trying to help me. I appreciate it.
heynnema avatar
ru flag
Edit /etc/netplan/*.yaml and change "yes" to "true", then `sudo netplan generate` and `sudo netplan apply`. Comment out everything in /etc/network/interfaces and reboot and see if it works. Report back.
Fischchen avatar
dk flag
@heynnema , I did what you suggested, nothing changed. The interfaces file stayed commented out. Im not sure if this was the expectation behavoir.
heynnema avatar
ru flag
Please describe your network cable all the way from the RJ45 port on the server, to the router/modem. Are you using cat 5e or cat 6 cables? Are there any other machines on the local LAN? Do they all work? Can you make yourself a Ubuntu **Desktop** Live USB and boot to it, and see if ethernet works then?
Score:1
dk flag

It turns out my dad unplugged the lan cable from the router, cleaned it (???) And plugged it back into an analog phone port. Anyway thanks everyone for trying to help me.

Score:0
ca flag

I think ubuntu server uses netplan by itself so it should be:

sudo nano /etc/netplan/01-netcfg.yaml 

or whatever .yaml resides in there.

Assuming you use DHCP to allocate IP to your server, then:

network:
  version: 2
  renderer: networkd
  ethernets:
    eno1:
      dhcp4: yes

Close and save and run from the terminal:

sudo netplan apply

then check your IP values again with

ip a

If for some reason network changes havent applied try

sudo systemctl restart networkmanager.service
ar flag
Welcome to Ask Ubuntu. Please use `Format as code` for pasted text. The icon above the edit window looks like {_}.
Fischchen avatar
dk flag
Thanks, i tried that and nothing changed. Also im using ubuntu server so there is no networkManager.
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.