Static IP same host in different networks

Is there a simple solution for assigning different static IP for the same MAC host basing on network it is connected to?
For example there is a wlan and wlan2, I'd like the host to get static IP when connected to lan and when connected to lan2.

There probably could be two dhcp host entries, each using different 'instance' parameter to bound to specific dnsmasq. But this enforces 2nd dnsmasq instance which I don't need.

Is there any simpler way to classify which dhcp host entry to use?

Did you try this?

config host
	option dns '1'
	option name 'vocore'
	option mac 'b8:d8:12:xx:xx:xx'
	option ip ''
	option hostid '4'
	option leasetime '1d'

config host
	option mac 'B8:D8:12:xx:xx:xx'
	option name 'vocore-iot'
	option dns '1'
	option ip ''
1 Like

Well, it works, it was to easy to be true.

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.