Dual network interface control with systemd

On a debian machine, I have two network interfaces: eth1 and eth2.

Eth1 is static and eth2 is using dhcp. How to make so that when the eth1 interface is active, the eth2 interface is down and vice versa? Basically I want the two interfaces never to be active at the same time.
I’ve started to make a script with ifdown ifup in the crontab but obviously we should be able to do it with systemd.

Do you have any idea how to make this easy?

Go to Source
Author: Rig0L