On Arch Linux ARM (Raspberry Pi) Kernel 4.4.37, I created a macvlan e.g.
ip link add link eth0 mac0 type macvlan
The macvlan virtual NIC then appears in the list so I assign it an IP address, and set the link state to up. (By the way, I have tried with modes bridge
, vepa
and private
.)
I can then ping the IP from my Windows clients, but when I check the ARP cache (arp -a
) in Windows, they are showing the same MAC address as the main (physical) network adapter, not the newly created macvlan MAC address.
I made sure to clear the ARP cache try an IP address that the clients had not seen before, etc. but it always shows the wrong MAC.
When I created a static ARP entry to the Windows client for the macvlan MAC address, and ping the relevant IP address, tcpdump shows the echo request coming in on the macvlan interface, and it doesn't show anything on the main (physical) interface, and I get a ping response on my windows client (once I remembered to set up the iptables rule to allow the traffic!)
As soon as I clear the ARP cache on the client and ping again, I still get a ping response, but this time the ARP entry has reverted to that of the main physical network adapter on the Linux box.
Just wondered what I might be doing wrong?