No ethernet connection on ubuntu server 18.04 on DELL Power Edge T300
Networking in Ubuntu server edition, versions 17.10 and later, is handled by netplan.
In order to set up netplan, you’ll need to know the interface name for your ethernet connection; it will probably be ens140 or eno1 or enp3s0 or some such.
Check again:
ifconfig
Or else:
sudo lshw -C network
In the latter case, it will be shown opposite ‘logical name.’ Here is a sample from my machine:
*-network
description: Ethernet interface
product: Ethernet Connection I217-LM
vendor: Intel Corporation
physical id: 19
bus info: pci@0000:00:19.0
logical name: enp0s25
version: 04
serial: 68:f7:28:ae:83:47
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
<snip>
So, in my case, I would use the interface designation enp0s25.
Next, edit your netplan file:
sudo nano /etc/netplan/01-netcfg.yaml
Amend the file to read:
network:
version: 2
renderer: networkd
ethernets:
enp0s25:
addresses:
- 192.168.100.40/22
gateway4: 192.168.100.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]
Of course, substitute your exact details here. Spacing, indentation, etc. are crucial. Proofread carefully. Save (Ctrl+o followed by Enter) and close (Ctrl+x) the text editor.
Next:
sudo netplan apply
sudo ip link set enp0s25 down
sudo ip link set enp0s25 up
Did you get the requested IP address?
ip addr show
Can you ping?
ping -c3 8.8.8.8
ping -c3 www.ubuntu.com
If you get ping returns, you are all set.
Related videos on Youtube
41M3
Updated on September 18, 2022Comments
-
41M3 over 1 year
I have just installed ubuntu server 18.04 on DELL Power Edge T300 but Ethernet card isn't recognized. On
ifconfig
and/etc/network/interfaces
, I seelo
.server's display during boot : ip address, netmask and gateway. But on ubuntu (no graphical interface) nothing.
How can I configure my ethernet connection without reinstalling OS?
thanks!
-
chili555 almost 6 yearsAwesome! Glad it's working. If my answer has been helpful, please accept it: askubuntu.com/tour The searchers will appreciate it.
-
vinid223 about 5 yearsWhat is the /22 for the addresses? And when I use this I get an error for a yaml not valid "Values are not allowed in this context" but I have a space between each element ":" and the value
-
vinid223 about 5 yearsI found out the problem, the indentation in the answer is not right for the nameservers and addresses, but thank you for that. The network on my server was just not working after a reboot