0

I have recently installed Ubuntu Server 20.10 on Desktop PC, with 3 ethernet ports on that PC.
The problem is that:

  1. Whenever the server is rebooted, the ethernet ports do not automatically go up while it is connected.
  2. The Ethernet ports lose IP configuration that I have assigned to them.
  3. I have installed tasksel GUI to have graphical interface but it is not showing me any network cards information when I go to Settings>Network.

Your guidance would be appreciated. Thank you!

4
  • Ubuntu server uses Netplan for network configuration. It would be useful if you can find your netplan config file (it's in /etc/netplan and has a .yaml extension - the filename itself may vary) and post the contents of the configuration file. Also, have a look at netplan.io for config examples. – Artur Meinild Apr 7 at 12:34
  • Also, maybe it's the same problem as this? – Artur Meinild Apr 7 at 12:37
  • Hi @ArturMeinild. Thank you for your reply. The file contains the following configuration. I have added the last two by myself: #This is the network config written by 'subqiuity' network: ethernets: eno1: addresses: - 192.168.1.143/24 gateway4: 192.168.1.1 nameservers: addresses: - 8.8.8.8 enp3s0f0: addresses: - 10.10.10.99/24 gateway4: 10.10.10.1 enp3s0f1: addresses: - 10.10.10.100/24 gateway4: 10.10.10.1 version: 2 – Ali Khan Apr 8 at 9:08
  • Please post the contents in your original post, not in the comment. Thanks. – Artur Meinild Apr 8 at 9:14
0

Thank you for your reply. The file contains the following configuration. I have added the last two by myself:

#This is the network config written by 'subqiuity'
network: 
ethernets: 
    eno1: 
       addresses:
       - 192.168.1.143/24 
       gateway4: 192.168.1.1 
    nameservers: 
       addresses:
       - 8.8.8.8 
    enp3s0f0:
        addresses:
        - 10.10.10.99/24
        gateway4: 10.10.10.1
    enp3s0f1: 
        addresses:
        - 10.10.10.100/24 
        gateway4: 10.10.10.1
2
  • There are several errors in the yaml format in that file. The ethernets: section should be indented under network:. Also, I don't know if it's valid that the nameservers: section is "parallel" to the interfaces - normally the nameservers: are listed (and indented) under each interface. – Artur Meinild Apr 8 at 10:42
  • Also, test you config with this command to see if the config is valid: netplan -debug try – Artur Meinild Apr 8 at 10:46
0

Thank you so much for your guidance on this!! I can't believe that it is finally working now.

Here's what I did:

  • I tried the debug command sudo netplan --debug apply

I realized that I was not following the proper indention.

# This is the network config written by 'subiquity'
network:
  ethernets:
    eno1:
      dhcp4: no
      dhcp6: no
      addresses: [192.168.1.143/24]
      gateway4: 192.168.1.1
      nameservers:
        addresses: [8.8.8.8,8.8.4.4]
    enp3s0f0:
      dhcp4: no
      dhcp6: no
      addresses: [10.10.10.99/24]
      gateway4: 10.10.10.1
    enp3s0f1:
      dhcp4: no
      dhcp6: no
      addresses: [10.10.10.100/24]
      gateway4: 10.10.10.1
  version: 2

Now, the IPs are static and not being lost after reboot.

2
  • Erhm, I don't understand your last sentence - is it working or not? You say the IPs are lost after reboot? Or are they NOT lost after reboot? – Artur Meinild Apr 8 at 11:40
  • 1
    Haha, it is working now, Artur. Thank you! I missed the "Not" in excitement – Ali Khan Apr 9 at 11:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.