I have Ubuntu 18.04 Server guest, on Win10 Pro Host, on VM Player 15.5, I am in my home network. Need to setup public IP, went thru several threads etc - tried this: How to configure static IP address on Ubuntu 18.04 Bionic Beaver Linux

I had 50-cloud-init.yaml, instead of editing this file, created a new file /etc/netplan/01-netcfg.yaml (assuming this works ??) with suggested net plan:
network: version: 2 renderer: networkd ethernets: enp0s3: dhcp4: no addresses: [] gateway4: nameservers: addresses: [,]

sudo netplan apply

ip a

3: flannel.1: mtu 1450 qdisc noqueue state UNKNOWN mode DEFAULT group default link/ether ea:3b:a8:80:ec:63 brd ff:ff:ff:ff:ff:ff
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default link/ether 02:42:e6:74:3b:7b brd ff:ff:ff:ff:ff:ff inet brd scope global docker0 valid_lft forever preferred_lft forever

Per instructions I should have gotten enp0s3 for next steps - I did not get that - instead this docker0. Here is where I am stuck

Update 1
I have 3 files in etc/netplan
01-netcfg.yaml (new file I added - as above)
50-cloud-init.yaml (original file)

network: ethernets: ens33: dhcp4: true version: 2

sudo netplan --debug apply

** (generate:121337): DEBUG: 02:01:42.820: Processing input file /etc/netplan/01-netcfg.yaml..
** (generate:121337): DEBUG: 02:01:42.823: starting new processing pass
** (generate:121337): DEBUG: 02:01:42.824: Processing input file /etc/netplan/50-cloud-init.yaml..
** (generate:121337): DEBUG: 02:01:42.825: starting new processing pass
** (generate:121337): DEBUG: 02:01:42.826: enp0s3: setting default backend to 1
** (generate:121337): DEBUG: 02:01:42.826: Configuration is valid
** (generate:121337): DEBUG: 02:01:42.827: ens33: setting default backend to 1
** (generate:121337): DEBUG: 02:01:42.827: Configuration is valid
** (generate:121337): DEBUG: 02:01:42.827: Generating output files..
** (generate:121337): DEBUG: 02:01:42.828: NetworkManager: definition enp0s3 is not for us (backend 1)
** (generate:121337): DEBUG: 02:01:42.828: NetworkManager: definition ens33 is not for us (backend 1)
DEBUG:netplan generated networkd configuration changed, restarting networkd
DEBUG:no netplan generated NM configuration exists
DEBUG:enp0s3 not found in {}
DEBUG:ens33 not found in {'enp0s3': {'dhcp4': False, 'addresses': [''], 'gateway4': '', 'nameservers': {'addresses': ['', '']}}}
DEBUG:Merged config:
bonds: {}
bridges: {}
dhcp4: false
dhcp4: true
vlans: {}
wifis: {}

DEBUG:Skipping non-physical interface: lo
DEBUG:device ens33 operstate is up, not changing
DEBUG:Skipping non-physical interface: flannel.1
DEBUG:Skipping non-physical interface: docker0
DEBUG:netplan triggering .link rules for lo
DEBUG:netplan triggering .link rules for ens33
DEBUG:netplan triggering .link rules for flannel.1
DEBUG:netplan triggering .link rules for docker0

Update 2
sudo lshw -C network
description: Ethernet interface
product: 82545EM Gigabit Ethernet Controller (Copper)
vendor: Intel Corporation
physical id: 1
bus info: pci@0000:02:01.0
logical name: ens33
version: 01
serial: 00:0c:29:93:92:0c
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 66MHz
capabilities: pm pcix bus_master cap_list rom ethernet physical logical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000 driverversion=7.3.21-k8-NAPI duplex=full ip= latency=0 link=yes mingnt=255 multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:19 memory:fd5c0000-fd5dffff memory:fdff0000-fdffffff ioport:2000(size=64) memory:fd500000-fd50ffff
description: Ethernet interface
physical id: 2
logical name: docker0
serial: 02:42:e6:74:3b:7b
capabilities: ethernet physical
configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A ip= link=no multicast=yes
description: Ethernet interface
physical id: 3
logical name: flannel.1
serial: ea:3b:a8:80:ec:63
capabilities: ethernet physical
configuration: broadcast=yes driver=vxlan driverversion=0.1 ip= link=yes multicast=yes

Update 3
$ sudo netplan --debug generate
DEBUG:command generate: running ['/lib/netplan/generate']
** (generate:52920): DEBUG: 22:48:00.872: Processing input file /etc/netplan/01-netcfg.yaml..
** (generate:52920): DEBUG: 22:48:00.873: starting new processing pass
** (generate:52920): DEBUG: 22:48:00.873: ens33: setting default backend to 1
** (generate:52920): DEBUG: 22:48:00.874: Configuration is valid
** (generate:52920): DEBUG: 22:48:00.874: Generating output files..
** (generate:52920): DEBUG: 22:48:00.875: NetworkManager: definition ens33 is not for us (backend 1)

  • Are there other .yaml files in /etc/netplan? If so, show them all to me. Always do a sudo netplan --debug generate before your sudo netplan apply, otherwise you risk taking down a server if the generate fails. It gives you time to fix the error. I don't understand your items 3 and 4. And why is the MTU 1450? 1500 in docker? – heynnema Dec 17 '19 at 1:25
  • update the main post – Sam-T Dec 17 '19 at 2:12
  • Show me sudo lshw -C network. Start comments to me with @heynnema or I may miss them. – heynnema Dec 17 '19 at 15:23
  • @heynnema - added above – Sam-T Dec 17 '19 at 16:09
  • The only real difference between my .yaml and the 50-cloud-init.yaml is that mine uses the static IP that you were trying to set, instead of dhcp. As long as it was a valid unused IP, it should have been transparent. – heynnema Dec 18 '19 at 22:32

Your Answer

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

Browse other questions tagged or ask your own question.