0

For some very specific reason, I need to create 4 virtual interfaces with different MAC address on each virtual interface, the frames from those interfaces will needs be sent over a single physical interface without any VLAN tags (the device on other ends will look at my PC and thinks my PC is a dumb switch because frames from different MAC address is being sent towards them)

I've tried this command ip link add link eth0 name untagged type vlan id 0 which managed to create an untagged virtual interface but when I tried to create another one and replace the 0 then it said RTNETLINK answers: File exists

Again, I'm not trying to create a trunk over the physical interface, a tagged frame being sent out the physical interface is not suitable for my purpose because the other end doesn't understand a VLAN tagged frame or a trunk interface for that matter.

How I could accomplish this?

2
  • 3
    Try a "macvlan", which you can see in man ip-link – LL3 Aug 17 '19 at 14:44
  • Nice, that works, thank you. – minhng99 Aug 18 '19 at 2:09
1

Thanks to LL3 I found out that this feature is called macvlan, for your reference I'll put the command here:

ip link add link eth0 address 00:cc:cc:cc:11:33 eth0mac2 type macvlan
ip link set eth0mac2 up

Source: https://serverfault.com/questions/576337/macvlan-interface-and-ppp-session

This can be used to create a L2 virtual interface for PPPoE

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.