I'm trying to use two IP addresses on a single network device. The device is an onboard NIC and came up as "em0" after initially booting, something I hadn't seen Ubuntu do before.
I'm using a /etc/network/interfaces config file that has worked on previous setups:
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto em1:0
iface em1:0 inet dhcp
auto em1:1
iface em1:1 inet static
address 10.152.187.1
netmask 255.255.255.0
broadcast 10.152.187.255
network 10.152.187.0
The problem is that the machine comes up with just a "em1" address obtained from DHCP, no em1:0 or em1:1 addresses.
If I run:
sudo ifconfig em1:1 10.152.187.1 netmask 255.255.255.0
The em1:1 alias comes up just fine and does what I expect.