Package: ifupdown
Version: 0.7

I attempted to add multiple IP addresses via the up command specifying 
interface for the ip command argument as $IFACE:

up ip a a 172.32.0.1 dev $IFACE
up ip a a 172.32.0.2 dev $IFACE

and discovered that only one of the two (or more) addresses is added to an 
interface.

After some troubleshooting I figured out that if I replaced $IFACE with 
whatever was the interface device name, e.g. eth0, ifup would add multiple ip 
addresses just fine.

I tested this on Ubuntu Precise LTS (sorry, but I do not have a Debian system 
to test this and I believe Ubuntu didn't really change anything about ifupdown 
programs that would affect this bug report's applicability), by adding those up 
commands to an end of an auto stanza. 

For example:

auto eth0
iface eth0 inet static
        address 1.1.1.2
        netmask 255.255.255.0
        network 1.1.1.0
        broadcast 1.1.1.255
        gateway 1.1.1.1
        up iptables-restore < /etc/iptables/cmdalert-fw.rules
        up ip a a 172.32.0.1 dev $IFACE
        up ip a a 172.32.0.2 dev $IFACE

and then followed up immediately by rebooting OS. To iterate, replacing $IFACE 
with eth0 results in both IP addresses added to eth0. Otherwise, only one of 
them can be added.

This seems like a serious bug to me, and I don't know if it was fixed yet or 
not, but here it is for your attention.

Reply via email to