0

I'm unable to get an IP address assigned through DHCP during system boot.

I was unable to get either IPV4 or IPv6 working for my NIC enp5s0 (details below) during my vanilla, single disk install of Ubuntu 18.04 Server, so I proceeded without the Network. Unfortunately, I'm unable to configure it properly post installation.

My 01-netcfg.yaml file is below and I did remember to run:

sudo netplan generate
sudo netplan apply

I'm able to get an IP address with this command:

sudo dhclient -v enp5s0

so I updated the installation, but the problem persists. It must be a configuration problem but I can't figure out what it is. Troubleshooting pointers appreciated!

enp5s0

enp5s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.24.1.222  netmask 255.255.255.0  broadcast 172.24.1.255
        inet6 fe80::dacb:8aff:fea3:460e  prefixlen 64  scopeid 0x20<link>
        ether a2:bc:3b:b7:92:3c  txqueuelen 1000  (Ethernet)
        RX packets 9240  bytes 852219 (852.2 KB)
        RX errors 0  dropped 215  overruns 0  frame 0
        TX packets 731  bytes 126544 (126.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 18

01-netcfg.yaml

network:
    version: 2
    renderer: networkd
    ethernets:
        enp5s0:
            dhcp4: true
latentcode
  • 121
  • 2
  • 10
  • This might seem like a silly question, but did you restart afterwards? I've had issues with `netplan` when I haven't done a restart. – Kurankat Apr 17 '20 at 04:28
  • I think I am missing what you are asking because your output shows an IP address: `inet 172.24.1.222 netmask 255.255.255.0 broadcast 172.24.1.255` Please clarify your question explaining why you think it is not receiving an IP address. – Terrance Apr 17 '20 at 04:35
  • @Terrance - I can get an IP address by issuing this command: **sudo dhclient -v enp5s0** but it’s temporary. I’d like to have the IP addressed assigned when the system boots. – latentcode Apr 17 '20 at 05:09
  • @Kurankat - Yes I rebooted. An IP address doesn't get assigned when the system boots. – latentcode Apr 17 '20 at 05:10
  • 1
    Does this answer your question? [Netplan does not apply at startup](https://askubuntu.com/questions/1019146/netplan-does-not-apply-at-startup) – Terrance Apr 17 '20 at 16:56

0 Answers0