I'd like to assign two IP addresses to my OpenWrt router via DHCP. At some point I was able to give the router two unique MAC addresses and assign an IP to them, but that config has since been wiped out by a hardware failure. I can't for the life of me figure out how I ended up doing it. If I had to guess it's some combination of aliases and device configs, but nothing seems to work.
Has anyone tried to do this? Am I the only one? Thanks for any help at all.
First thing is you need to assign multiple interfaces with multiple unique mac addresses?
Are you using luci, editing config files or using uci from the command line?
I'm usually using a bridge and then creating virtual ethernet devices. Or it's using multiple ports on the bridge via vlans and bridge vlan filtering. I think macvlan might be what you want? I haven't done it by macvlan before.
Probably best to do uci show or cat your config. Plus a ubus call system board (Redacting PII of course) .
A block diagram of your network as well as 'why' you are trying to do this would be good? i.e. why do you need multiple IP's being served over DHCP.
config interface 'lan2'
option device '@lan'
option proto 'dhcp'
This is common (and useful) for a dual stack setup where an interface holds both a v4 and a v6 IP address. The question remains what is the usefulness of having two IPv4s on one physical or bridge device, especially when they are in the same subnet.