Allow specific MAC address to use DHCP relay

I have 2 networks linked together using WireGuard. Both on public IPs. All works fine.

[Site A] 50.50.50.50 ————————— [Site B] 150.150.150.150

Router LocalIP

      10.0.1.250 -------------- 192.168.1.1 

Network
     10.0.1.0/24 ------------- 192.168.0.0/24


Due to some reasons in Site B I need to assign to specific MAC address local IP from Site A → so for example 10.0.1.100 inluding gateway 10.0.1.250 and DHCP also 10.0.1.250.

Is there a simple way how to do it?

Yes. Create appropriate config on site B DHCP server (e.g. network part mirroring config from site A DHCP server) and then set a static lease for that particular device.

I doubt it'll work though ... because tunnel between both sites is L3 (routed) and device's gateway(s) have to be in tge same L2 subnet - i.e. directly accessible ... in your case 10.0.1.250 is not directly accessible for devices in site 2's LAN.

Tunnel is L3 and L2 (EoIP).

If the tunnel is L2 (as well), then beware of "stray" broadcasts (including DHCP discover messages) passing between both sites. In this case both DHCP servers will receive DHCP messages from both sides ... and the one answering faster will "push" its own settings to all clients. If both DHCP servers are configured to answer without delay, then tunnel latency will help local DHCP server to serve local requests ... but if that fails for any reason, you may see chaos in IP topology.
Another issue with L2 tunnels is amount of broadcast and multicast traffic, it might reach considerable portion of tunnel capacity.

The above are (among others) basic reasons to introduce LAN segmentation (and against L2 tunnels between two LANs unless there are specific reasons requiring L2 tunneling).

I’m blocking appropirate DHCP ports 67-68 on Bridge filtering already to avoid that.

1 Like