I have setup an Ubuntu Server 18.04. There's no network manager active, so configuration is done in /etc/network/interfaces.
In the network there's a dhcp server active.
/etc/network/interfaces
content:
auto enp1s0
iface enp1s0 inet dhcp
auto enp2s0
iface enp2s0 inet static
address 0.0.0.0
up sysctl -w net.ipv6.conf.enp2s0.disable_ipv6=1
auto enp3s0
iface enp3s0 inet static
address 0.0.0.0
up sysctl -w net.ipv6.conf.enp3s0.disable_ipv6=1
The interface enp1s0 should be used by the ubuntu server to access the Lan and should acquire address automatically.
The interfaces enp2s0 and enp3s0 should be online, but the Ubuntu server should not be able to make any networking through them. There's a vm running as service with PfSense that uses the enp2s0 as Lan and enp3s0 as Wan interface.
My actual problem: the automatic configuration for the enp1s0 only works right after boot. If I unplug the Ethernet cable from enp1s0 and reconnect it, the Ubuntu server doesn't detect that there's a linkup event and contact the dhcp again. It just keeps the configuration it got after boot.
How can I tell my server to reset and reconfigure the interface after each linkup like it would be on a desktop installation by default?
/etc/network/interfaces
; it is handled by netplan. I don't know how to accomplish the exact thing you are trying to do here or I'd propose an answer.