I recently upgraded my 16.04 server system to 18.04, and then tried to use netplan to set up networking. Unfortunately, now my network settings are broken and I don't know which files belong to which network configuration system.
The /etc/network/interfaces file still contains data, and there are a bunch of other files in /etc/network whose purpose I don't know.
What I want to do is start over with the following config:
network:
version: 2
renderer: networkd
ethernets:
enp4s0:
dhcp4: yes
dhcp6: yes
bridges:
br0:
interfaces: [enp4s0]
dhcp4: true
parameters:
stp: false
forward-delay: 0
Can anyone tell me what files I actually need and what's just cruft that should be deleted? This system is only supposed to have one bridged network device and have openssh-server, lxc, and docker running. This is what's currently there:
# tree network
network
├── fan
├── if-down.d
│ ├── resolvconf
│ └── ubuntu-fan
├── if-post-down.d
│ ├── bridge -> /lib/bridge-utils/ifupdown.sh
│ ├── ifenslave
│ ├── ubuntu-fan
│ ├── vlan
│ └── wireless-tools
├── if-pre-up.d
│ ├── bridge -> /lib/bridge-utils/ifupdown.sh
│ ├── ethtool
│ ├── ifenslave
│ ├── vlan
│ └── wireless-tools
├── if-up.d
│ ├── 000resolvconf
│ ├── avahi-daemon
│ ├── ethtool
│ ├── ifenslave
│ ├── ip
│ ├── openssh-server
│ └── ubuntu-fan
├── interfaces
└── interfaces.d
5 directories, 21 files
# tree netplan
netplan
└── 01-netcfg.yaml
0 directories, 1 file
# tree NetworkManager/
NetworkManager/
└── conf.d
└── 10-ubuntu-fan.conf
apt install netplan.io
. note the .io! I made the same mistake as you so I had toapt purge netplan
– kfix Feb 27 '19 at 05:33apt purge resolvconf
as discussed here – gerardw Jan 28 '21 at 10:40sudo netplan apply
one could usesudo netplan try
and make sure things work – ignacio May 09 '22 at 09:14eth0
and I wanted to name itens160
. That helped me: https://askubuntu.com/questions/1317036/how-to-rename-a-network-interface-in-20-04 – uav Aug 19 '22 at 15:15that shows error in yaml configuration
netplan --debug apply reboot
– Greg G May 25 '23 at 11:30