Adding MACVLAN to VLAN not working with "failed to create device"

Hello,

I’m running RouterOS 7.15.2 on a RB5009UPr+S+.

When trying to add a MACVLAN to an existing VLAN

/interface/macvlan/add interface=vlan2 name=macvlan2

the MACVLAN interface is not created:

Couldn’t add New Interface - failed to create device (6)


on Webfig and Winbox
* ```text
failure: failed to create device

on terminal

Adding a MACVLAN to a physical interface does work.

I tried rebooting the router as well as trying to create a MACVLAN on a L009UiGS, but the problem persists.

Is this supposed to work or is this a problem with 7.15.2?

Thanks!

Adding MACVLAN to a VLAN does not make sense!
The MAC layer is a lower level than the VLAN layer.

Why? A VLAN interface looks MAC wise exactly like a physical interface.

Mikrotik specifies in the MACVLAN documentation (MACVLAN - RouterOS - MikroTik Documentation):
interface (name; Default: )
Name of the interface on top of which MACVLAN will work. MACVLAN interfaces can be created on Ethernet or VLAN interfaces, adding VLAN on MACVLAN is not supported.

73 Arnd DJ9PZ/AB2QP

Well, the MAC layer sits UNDER the VLAN layer, so the MAC address on a VLAN always has to be the same as the physical interface.
So it does not make sense, and apparently the documentation is wrong and indeed it does not work just as expected…

I have no idea about the actual use of macvlan, but we have at least an example of the interface being created on vlan interface:
http://forum.mikrotik.com/t/capsman-ip-from-bridge-before-take-from-vlan/176747/3

...
/interface vlan
add comment=Lan interface=BR-Capsman mtu=1480 name=100-Lan vlan-id=100
...

/interface macvlan
add interface=100-Lan mac-address=BA:C9:E8:55:EE:D8 mode=private mtu=1480 \
    name=macvlan100
...

so it should be possible.

Maybe the MAC needs to be specified on the same add line?

There is a difference between the VLANs on a physical interface and a “VLAN interface” in RouterOS:

  • A VLAN on a physical interface is encapsulated within ethernet frames and identified by its VLAN id
  • A “VLAN interface” is a virtual interface within RouterOS, which does not carry a VLAN id in ethernet frames (like an untagged bridge port) and is connected to a VLAN id on a bridge

Thanks for your suggestion, I tried to specify a MAC, but I still encounter the same error.

There is also another topic using MACVLAN interfaces on VLAN interfaces, so it should work:

I’ve created a ticket for this problem, Mikrotik could recreate it and will provide a fix in an upcoming release of RouterOS (no ETA given).