Metainformationen zur Seite
  •  

netplan

As of Ubuntu 17.10 netplan replaces the if-up and if-down scripts. Configuration is done via /etc/netplan/01-netcfg.yaml. Because the configuration is delicate there is a script to test the yaml file:

sudo netplan --debug generate

The configuration can be activated for the next reboot with:

sudo netplan apply

A config file looks like that:

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    enp7s0:
      dhcp4: no
      dhcp6: no
      addresses: [192.168.1.79/24]
      gateway4: 192.168.1.1
      nameservers:
        addresses: [192.168.1.1]

Indentations are required and there is a difference between tab and space indentations.

I am looking forward to find some hints for iptable configuration and other things. There is an option to switch back to if-up and if-down by setting a GRUB parameter: https://wiki.ubuntuusers.de/Netplan/Deaktivieren/

Creating a bridge device:

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    enp8s0:
      dhcp4: yes
  bridges:
    br0:
      interfaces: [enp8s0]
      dhcp4: true
      parameters:
        stp: false
        forward-delay: 0

The bridge device can be used in KVM via the name br0

Resources:

https://wiki.ubuntuusers.de/Netplan

https://wiki.ubuntuusers.de/Netplan/Deaktivieren/

https://askubuntu.com/questions/971126/17-10-netplan-config-with-bridge

https://askubuntu.com/questions/967695/ubuntu-17-10-will-not-accept-static-ip

http://doc.nethence.com/server/ubuntu-server.html