Support DuplicateAddressDetection by default
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
netplan & networkd only use systemd-networkd's default of DuplicateAddres
From what I know RedHat based systems on the other hand use the arping tool during ifup in their ifcfg system (ARPCHECK=yes by default) to check for IP conflicts. In order to reach a similar result in Ubuntu, we would need to place an override configuration snippet in /etc/systemd/
This is probably even something that netplan should be doing by default, but it is not currently.
[0] https:/
Changed in netplan: | |
importance: | Undecided → Wishlist |
Changed in netplan: | |
status: | New → Triaged |
no longer affects: | netplan.io (Ubuntu) |
conf override still requires you to know the interface name, I'm using a solution where an interface is killed from the network dispatcher if a duplicate is detected. IP will be up for a short time so some packets might be lost, but it works universally, no metter how many interfaces are there or how they are called.
cat<<'EOF' >/etc/networkd- dispatcher/ routable. d/dad.sh dispatcher/ routable. d/dad.sh
#!/bin/bash
# check for duplicate IP and either kill the interface or proceed
if arping -0 -c 2 -w 2 $ADDR; then
ip link set $IFACE down
echo conflict detected on $IFACE for $ADDR, it has been shut down
else
echo no duplicate IPs detected on $IFACE addr $ADDR
fi
EOF
chmod +x /etc/networkd-