I have a server with 4 different IPs over one real NIC. Now i try to setup different virtual network adapter in debian with this IPs. The Problem is, that each IP needs also a specific MAC. Otherwise the connection over the IP will not working.

So first a created a new virtual NIC with a specific MAC:

ip link add link eth0 mac1 address 00:11:22:33:44:55 type macvlan mode bridge

This works very well. After this I set the IP and and the netmask with.

ifconfig mac1 netmask broadcast

Then I turned the new virtual NIC on with:

ifconfig mac1 up.

Now I can see the virtual NIC over ifconfig with my set settings.

But if I try now to ping a website over this interface with:

ping -I mac1 google.de

I get no response.

I don't know why.

What is my mistake or is there a different way to create a virtual NIC with own MAC and IP ?


You used a netmask of (also known as /32), which may mean that this address isn't part of a local network with your default gateway. Try using a netmask that extends to more addresses in order to include the gateway address in the local network.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.