In my device, the parent ports eth0 and eth1 are on br-lan
bridge name bridge id STP enabled interfaces
br-lan 7fff.7811dc47d35c no eth0
I want to create a macvlan port with eth0 as the parent port, but it is displayed RTNETLINK answers: Device or resource busy
ip link add link eth0 veth type macvlan
RTNETLINK answers: Device or resource busy
Is there a way to create the macvlan port when the parent port is on the bridge?
I don't think you can create a macvlan interface on an already "enslaved" port, but you can use
br-lan as the parent interface (if that suits you).
Thanks, I have solved this problem by modifying the kernel.
Hello, do you know how to set a mac for macvlan port instead of randomly generating it？
config device 'veth0'
option name 'veth0'
option type 'macvlan'
option ifname 'br-lan'
option macaddr 'aa:bb:cc:dd:ee:ff'
config interface 'virt0'
option proto 'static'
option device 'veth0'
root@OpenWrt:~# ip link show dev veth0
5: veth0@br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether aa:bb:cc:dd:ee:ff brd ff:ff:ff:ff:ff:ff
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.