DHCP Interface with fixed IP address, Part 2

Continuing the discussion from DHCP Interface with fixed IP-Address until lease received:

I was searching for the same idea and came across the previous post above. But it occurred to me that I could do the same kind of setup but instead of using an alias, I used a macvlan to have the benefit of a different mac address associated with the second IP address. Though I can't figure how this will help in the long term, are there any drawbacks or could there be any difference in the experience between alias vs macvlan?

The below is my final setup on two dummy WiFi APs on Netgear WAC104 and it seems to be working fine. As a summary my goal is to allow the dummy WiFi AP to obtain a dynamic IP address for itself so I could access it using it's hostname, while having a static IP address for "failsafe" or "backup" access purposes. Eventually the WiFi AP has two IP addresses but only one of them is configured as the default route, the macvlan DHCP will automatically have a gateway IP to be able to access the internet for updates and such, while the main br-lan/LAN interface will only be meant for switching packets within the lan network/subnet.

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.1.10'

config device
        option type 'macvlan'
        option ifname 'br-lan'
        option mode 'bridge'
        option name 'br-lanmac0'
        option acceptlocal '1'

config interface 'macvlan'
        option proto 'dhcp'
        option device 'br-lanmac0'
1 Like