I have been working on this problem for 3 days now. FYI I have read all posts on this subject with no results. Always the same problem.
I am building an 18.04 LTS server with the Unity desktop as a media server, a new install. I'm trying to set a static IP for my media server. Never had a problem with 'INTERFACES'. However working with NETPLAN and YAML (50-cloud-init.yaml) is difficult. Always get the same repeating errors with the config, YAML file, for NETPLAN. Error most of the time returns indentation errors and what seems to be other parsing. I have written and re-written the file dozens of times. Triple checked indentation for too many spaces, not enough spaces, extra spaces spacing wrong. I get part of it worked out and then get a new or repeating error. Copied many so called working examples, pasted them in and replaced my data properly; still get those errors. Even checked the file in several YAML validators and it says the file is OK.
Tried to switch back to INTERFACES and IFUPDOWN but now I get systemd errors. Was able to switch back to NETPLAN but with DHCP. By no means an expert in linux and would appreciate any help in plain English with clear examples.
Please note I am disabled and have severe dyslexia and have worked through each iteration very carefully to make sure it correct.
Default 50-cloud-init.yaml -comments not included
network:
ethernets:
enp3s0:
dhcp4: true
version: 2
Desired config of 50-cloud-init.yaml
network:
version: 2
renderer: networkd
ethernets:
enp3s0:
dhcpv4: no
dhcpv6: no
addresses:.192.168.10.1/24
gateway4: 192.168.10.10
nameservers:
addresses: [8.8.8.8,8.8.4.4]
/etc/network$ cat interfaces file.
ifupdown is installed but nt in use at this time.
# ifupdown has been replaced by netplan(5) on this system. See
# /etc/netplan for current configuration.
# To re-enable ifupdown on this system, you can run:
# sudo apt install ifupdown
Generated errors. I recreated the file from scratch.
All using double spaces.
/etc/network$ sudo netplan --debug generate
DEBUG:command generate: running ['/lib/netplan/generate']
** (generate:27358): DEBUG: 10:35:10.506: Processing input file /etc/netplan/50-cloud-init.yaml..
/etc/netplan/50-cloud-init.yaml:15:18: Invalid YAML: inconsistent indentation:
nameservers:
user@server:/etc/network$ sudo lshw -C network
*-network DISABLED
description: Wireless interface
product: AR9485 Wireless Network Adapter
vendor: Qualcomm Atheros
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlp2s0
version: 01
serial: e0:06:e6:25:8a:23
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical wireless
configuration: broadcast=yes driver=ath9k driverversion=4.15.0-91-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11
resources: irq:16 memory:f7100000-f717ffff memory:f7180000-f718ffff
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:03:00.0
logical name: enp3s0
version: 07
serial: 5c:f9:dd:6c:fa:90
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168e-3_0.0.4 03/27/12 ip=192.168.10.10 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
resources: irq:19 ioport:d000(size=256) memory:f2104000-f2104fff memory:f2100000-f2103fff
/etc/network/interfaces
file, 3) the output ofsudo netplan --debug generate
command, 4)sudo lshw -C network
. Use copy/paste, not screenshots. Once you paste the text, select the pasted text, and then click the{}
icon to format it. Start comments to me with @heynnema or I may miss them. – heynnema Mar 26 '20 at 02:41