0

Having some major issues with networking on Ubuntu 18.04 LTS. Fresh install. I set a static IP during install which worked for a couple days and remained set after multiple reboots. Now the interface shows no IP. It seems when I set that IP it did generate a netplan that appears correct however netplan apply does nothing.

This happened to me previously as well on the previous install. I had been messing with some DNS stuff so I figured I'd just reimage the machine and not touch any of the network utilities this time and I still am having the issue.

The issue occurs about a day and a half after install seemingly randomly. Was not using the machine when the issue began and the only thing I have done so far on this install is set up a couple docker containers with samba and SFTP.

Contents of my 50-cloud-init.yaml

# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    version: 2
    renderer: networkd
    ethernets:
        enp0s25:
            dhcp4: no
            addresses: [192.168.0.32/24]
            gateway4: 192.168.0.1
            nameservers:
                addresses: [1.1.1.1,8.8.8.8]

Terminal output from netplan --debug apply

** (generate:2227): DEBUG: 23:11:19.520: Processing input file /etc/netplan/50-cloud-init.yaml..
** (generate:2227): DEBUG: 23:11:19.520: starting new processing pass
** (generate:2227): DEBUG: 23:11:19.520: enp0s25: setting default backend to 1
** (generate:2227): DEBUG: 23:11:19.520: Generating output files..
** (generate:2227): DEBUG: 23:11:19.520: NetworkManager: definition enp0s25 is not for us (backend 1)
DEBUG:netplan generated networkd configuration exists, restarting networkd
DEBUG:no netplan generated NM configuration exists
DEBUG:enp0s25 not found in {}
DEBUG:Merged config:
network:
  bonds: {}
  bridges: {}
  ethernets:
    enp0s25:
      addresses:
      - 192.168.0.32/24
      dhcp4: false
      gateway4: 192.168.0.1
      nameservers:
        addresses:
        - 1.1.1.1
        - 8.8.8.8
  vlans: {}
  wifis: {}

DEBUG:Skipping non-physical interface: lo
DEBUG:Skipping non-physical interface: docker0
DEBUG:Skipping non-physical interface: br-98e8ea9c70cb
DEBUG:{}
DEBUG:netplan triggering .link rules for lo
DEBUG:netplan triggering .link rules for enp0s25
DEBUG:netplan triggering .link rules for docker0
DEBUG:netplan triggering .link rules for br-98e8ea9c70cb

My ifconfig

br-98e8ea9c70cb: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.18.0.1  netmask 255.255.0.0  broadcast 172.18.255.255
        ether 02:42:51:a6:a3:66  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:d5:d6:46:8e  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp0s25: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:24:7e:00:e0:30  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16  memory 0xfc500000-fc520000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 7926  bytes 592108 (592.1 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 7926  bytes 592108 (592.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


0

Have you configured the static IP in a correct manner? See This tutorial. Remeber, configuring static IP in 18.04 is different from 16.04.

Other than that i would recommend to see if any other host in the network has "stole" the IP, maybe try with an other static IP for the host. Make sure to ping the new static IP in order to make sure it is available.

Finally make sure you run sudo netplan apply, or sudo netplan --debug apply in order to run the new configurations.

My best guess is that /etc/netplan/50-cloud-init.yaml is configured wrong so go through it carefully one more time.

Good luck.

  • I will take a look that that tutorial when I have a minute and give it a go. The odd thing is that I didn't make the netplan config. Ubuntu did when I entered the static IP in the live install gui. – CNorlander Feb 14 at 22:48
  • Hmm, i bet somthing is wrong in your configuration as mentioned. I have followed that exact tuturials on several ubuntu 18.04 VMs, has worked for me all those times. – emilrn Feb 14 at 23:02
  • I have updated my post with netplan configs and debug outputs – CNorlander Feb 14 at 23:21
  • what are the output of ifconfig ? – emilrn Feb 14 at 23:30
  • I have added it to the original post now – CNorlander Feb 14 at 23:37

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.