steom
1
hello,
i created the macvlan Ethernet ports as follows:
ip link add link eth0 name veth0 type macvlan
ifconfig veth0 up
ip link add link eth0 name veth1 type macvlan
ifconfig veth1 up
The problem is that when reboot the router, these ports get deleted and have to recreate.
Is there a way to save them so they don't get deleted when power is lost or when the router is rebooted?
Hey there.
You can just add exactly this as startup script.
In LuCI, go to "System > Startup" and scroll to the bottom of the page.
But: What are you trying to do? I get the feeling you're holding it wrong :).
Regards,
Stephan.
1 Like
trismo
3
Or use hotplug script. "/etc/hotplug.d/iface/18-macvlan"
rc.local only execute once after boot.
azuwis
4
Add this to /etc/config/network:
config device 'veth0'
option name 'veth0'
option type 'macvlan'
option ifname 'eth0'
config device 'veth1'
option name 'veth1'
option type 'macvlan'
option ifname 'eth0'
And run /etc/init.d/network reload
or reboot
.
3 Likes