1

I'm configuring a physical NIC and a virtual interface based on it as follows in /etc/network/interfaces:

auto eth0
iface eth0 inet dhcp

auto eth0:1
iface eth0:1 inet manual
    post-up ifconfig eth0:1 hw ether 00:22:22:ff:ff:ff && dhclient eth0:1

where the MAC address 00:22:22:ff:ff:ff is made up and doesn't occur in my LAN. As you can see I would like my DHCP server to manage the IP tricking it with the separate MAC address.

After a reboot I see in the output of ifconfig that eth0:1 is not configured and that eth0 has the IP which eth0:1 gets when I run sudo ifup eth0:1 manually after boot.

Configuring a static IP with interfaces stanza

auto eth0:1
iface eth0:1 inet static
    address 192.168.178.27
    netmask 255.255.255.0
    gateway 192.168.178.1

works.

I'm using Linux 4.0.1 on Ubuntu 15.04.

1
  • You can't have 2 different mac on a single physical interface...
    – ROunofF
    Apr 8, 2016 at 3:11

0

You must log in to answer this question.

Browse other questions tagged .