I am using Ubuntu 18.04 LTS as OS for an industrial control. (PLC) On my machine, I have two network cards. One network card is for programming, the other for the communication with my drives. (EtherCAT) To configure my drives there is also an ethernet communication over EtherCAT. (EoE)
This only as introduction.
My Problem is: I need a tap interface.
I did the following configuration in netplan:

Code:
network:
 version: 2
 renderer: networkd
 ethernets:
  enp1s0:
   dhcp4: true
   optional: true
  enp0s31f6:
   dhcp4: true
   optional: true
 bridges:
  br0:
   dhcp4: true
   dhcp6: false
   addresses: [192.168.100.100/24]
   interfaces: [enp0s31f6]
When I enable the tap interface:
Code:
sudo ip tuntap add tap0 mode tap
 sudo ip link set tap0 up
And connect it to my bridge interface:
Code:
  sudo brctl addif br0 tap0.
I can connect from enp0s31f6 to the drives over EoE.

The problem is after a restart the configuration of the tap interface is gone and Netplan does not support tap interfaces anymore.

Of corse I could write a script that executes the code above at startup. But I am searching the proper way.

I am thankful for every hint!