Jump to content

No network connnection on ubuntu server

Go to solution Solved by Thunderzzu,
5 minutes ago, akio123008 said:

Yes I saw some stuff online about that, but when I access the config file it tells me the network configuration is handled by Netplan (basically telling me "this file is useless") which is used in newer versions of ubuntu instead of ifupdown. 

You need to use netplan in ubuntu 18.x+

 

It's not hard. Edit the only file in /etc/netplan/xxxxxx.yaml accordingly (look up a guide), then type sudo netplan generate and sudo netplan apply and you should be fine.

 

cheers

I've just set up an ubuntu server system and everything works, except for the network connection. At first, the network connection wouldn't work at all,

which I fixed by doing:

 

sudo ifconfig enp2s0 192.168.1.90 netmask 255.255.255.0

 

the main network interface turns out to be called enp2s0, which I found out using ifconfig -a

 

the command above made the connection work, but there's a problem: every time the system reboots, it returns to the old state and I have to run the command again to get my network interface to work. Does anybody know how to fix this? 

Link to comment
https://linustechtips.com/topic/961115-no-network-connnection-on-ubuntu-server/
Share on other sites

Link to post
Share on other sites

You need to manually configure it in /etc/network/interfaces (I forget of this changed in 18.x)

The config, at least from what I saw last, varies greatly from 16.04 to 18.04 so depending on which version will depend on how exactly you go about doing that.

Current Network Layout:

Current Build Log/PC:

Prior Build Log/PC:

Link to post
Share on other sites

Yes I saw some stuff online about that, but when I access the config file it tells me the network configuration is handled by Netplan (basically telling me "this file is useless") which is used in newer versions of ubuntu instead of ifupdown. 

Link to post
Share on other sites

5 minutes ago, akio123008 said:

Yes I saw some stuff online about that, but when I access the config file it tells me the network configuration is handled by Netplan (basically telling me "this file is useless") which is used in newer versions of ubuntu instead of ifupdown. 

You need to use netplan in ubuntu 18.x+

 

It's not hard. Edit the only file in /etc/netplan/xxxxxx.yaml accordingly (look up a guide), then type sudo netplan generate and sudo netplan apply and you should be fine.

 

cheers

Don't forget to quote when replying to me

Link to post
Share on other sites

43 minutes ago, Thunderzzu said:

You need to use netplan in ubuntu 18.x+

 

It's not hard. Edit the only file in /etc/netplan/xxxxxx.yaml accordingly (look up a guide), then type sudo netplan generate and sudo netplan apply and you should be fine.

 

cheers

Netplan was a bit of a pain to deal with but the machine is now fully operational. Thanks for the help!

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×