DHCP on wifi only but not ethernet

On the same LAN, is there a way to broadcast DHCP only on WIFI but not on the Ethernet ports?

Thanks.

No, not without splitting ethernet and wireless into different networks (or very complex/ CPU intensive means).

1 Like

One option would be to limit the scope on DHCP - and the assign directly on the ethernet clients static IP's directly on the hosts...

Not really the best solution perhaps...

I think that the OP wants to outright prevent the DHCP server from offering any leases to ethernet connected devices. Limiting the scope only works if the pool size is exactly the same size as the number of wireless devices in use, and assumes that there will never be a situation where one of the wifi devices is offline when its lease expires (if that were to happen, an address would be available that would be offered to the next device that issues a DHCP lease request, regardless of the medium).

And assigning the IP addresses manually on the ethernet connected hosts obviously means they do not need to request leases, but it doesn't prevent a different ethernet connected host from requesting and obtaining a DHCP lease

A messy (and error prone/not bullet-proof) approach could be to use only DHCP reservations. That is to say, the pool itself would be of size zero, but then the wireless devices could be given DHCP reservations by means of their MAC address. That means, though, that the wireless devices need to be "pre-registered" and must not use MAC randomization. But, this doesn't stop an ethernet connected device from spoofing that MAC address and obtaining a DHCP lease.

But as @slh stated, from a practical perspective, the way too achieve this would be to have two independent subnets. One with a DHCP server, the other without.

set up two pools for DHCP?

VLAN's for both - one for WLAN, one for LAN, setting up the WLAN interfaces on the secondary VLAN.

Spitballing here... which goes back to @slh post above...

No.

If taking the VLAN/2 subnets approach, this would mean one network has a single DHCP pool, and the other would not have DHCP enabled at all.

Or, the other idea (which I do not suggest) is to set up a single network and a DHCP server with a pool of zero size. This simply enables the DHCP server in general, but doesn't actually allow it to issue any IPs dynamically. Then, create DHCP reservations (with the MAC address of the client and a fixed IP for said client). This is a single DHCP instance that will only issue leases to devices that have a pre-registered MAC (but again, that MAC can be easily spoofed, or it could change due to MAC randomization which is a common feature on modern OSs).

Exactly... I was referencing that comment.

I think we're in agreement - now the question to OP - what's the use case?

I can imagine a couple - mostly around things like hospitality where one offers wifi to coffee drinkers...

1 Like

Thanks for the replies and in depth explanations.

I found DHCP MAC filtering should be sufficient for what I need.