add second IP addresss
# create new low priority config file
cat <<EOF > /etc/network/interfaces.d/100-cloud-init
iface eth0 inet static
address XXX.YY.ZZZ.AAA/24
challenges
test ifup
ifup --no-act eth0
The output:
/bin/run-parts --exit-on-error /etc/network/if-pre-up.d
/sbin/ip addr add AAA.BB.CCC.DDD/255.255.255.0 broadcast AAA.BB.CCC.255 dev eth0 label eth0
/sbin/ip link set dev eth0 up
/sbin/ip route add default via AAA.BB.CCC.DDD dev eth0 onlink
/bin/run-parts --exit-on-error /etc/network/if-up.d
flags
--force: Force configuration or deconfiguration of the interface. --ignore-errors: If any of the commands of scripts fails, continue --no-act: Don't configure any interfaces or run any "up" or "down" commands.