On /etc/network/interfaces I added this:
Code: Select all
# Primary interface
auto eth0
iface eth0 inet dhcp
up ip link set dev eth0 promisc on
# Macvlan interfaces
auto vir1
iface vir1 inet dhcp
pre-up ip link add link eth0 address 02:cd:ab:00:10:01 vir1 type macvlan
post-down ip link delete vir1
auto vir2
iface vir2 inet dhcp
pre-up ip link add link eth0 address 02:cd:ab:00:10:02 vir2 type macvlan
post-down ip link delete vir2
But I got no network after a reboot.
Can someone help me on this? I am trying to get 3 different IP addresses from DHCP on my ethernet adapter so I can bind 3 services that use the same ports to 3 different IPs.