Two routers connected by macvlan interfaces:
Router1< macvlan 10.1.0.1/30 - macvlan 10.1.0.2/30 >Router2
- WAN1 to Internet
- macvlan1 10.1.0.1/30 ( wan zone)
- LAN1 192.168.101.1/24 (can access WAN1 & LAN2)
- Guest1 192.168.201.1/24 (can access only WAN1)
- DNS forward /lan2/10.1.0.2
- WAN2 to Internet
- macvlan2 10.1.0.2/30 (wan zone)
- LAN2 192.168.102.1/24 (can access WAN2 and LAN1)
- Guest2 192.168.202.1/24 (can access only WAN2)
- DNS forward /lan1/10.1.0.1
For a PC1 connecting to LAN1, ping Router1.lan1 will always got 192.168.101.1 address.
For a PC2 connecting to LAN2, ping Router2.lan2 will always return 192.168.102.1 address.
Now the question:
PC1, ping Router2.lan2, got IPs 192.168.102.1 and 192.168.202.1 in round-robin .
PC2, ping Router1.lan1, got IPs 192.168.101.1 and 192.168.201.1 in round-robin .
How can I configure dnsmasq, such that PC2 will always got 192.168.101.1 for Router1.lan1 , and correspondingly for PC1?