Switch – DHCP server on Switch or on Router

dhcprouterswitch

I have a DHCP server set up on a L3 24port switch that connects to multiple routers that different clients connect to (hotel room scenario). With the dhcp on the switch everyone can see who is connected to the entire network if they look.

I only want devices connected to the same router to be able to see each other. (Can/should it be done from the L3 dhcp switch) or is it best to have dhcp done from the router?

Best Answer

If all you want to achieve is separate users from each other you can try setting Private VLAN or port isolation. This way each port can only communicate with gateway (uplink port). With such setup it does not matter whether DHCP server is directly on switch or external, but for flexibility reasons it is better to be external and just configure dhcp relay on switch to forward all requests to dhcp server.

Also if switch support "gleaning" to see DHCP transactions or DHCP lease query (RFC4388) it can even block all attempts of users to use unathorized IP addresses. For example on Mikrotik equipment you can use embedded DHCP server to put all DHCP clients into ARP tables directly and by turnning off arp responses it can force clients to only use DHCP assigned addresses.

This is theory. In practice it all depends on the actual hardware and software involved. By giving more info we can give you better answers with examples.

Related Topic