DHCP for Multiple Subnets
The initial steps in a DHCP client communicating with a DHCP server uses broadcast messages (to the physical layer broadcast address of FF-FF-FF-FF-FF-FF). Because these messages are broadcasts they are typically blocked/dropped at the network partition (a firewall, a layer 3 switch or a router that separates the client network from the server network). In order for DHCP clients on a network that's different from the server network to communicate with the DHCP server an intermediate host on the client network (usually the router, layer 3 switch or firewall) needs to act as a relay for these broadcast messages. The DHCP relay agent relays the client broadcast messages on behalf of the client to the server as unicast messages. The DHCP server then uses information in these unicast messages to determine what layer 3 network the client is on and assigns an ip address from the DHCP scope configured for that network.
So, long story short, here's what you need to do:
Remove the additional ip address from the server.
Configure a DHCP scope for the WLAN network.
Configure the Sonicwall to act as a DHCP relay agent.
![PnP](https://i.stack.imgur.com/iS47X.jpg?s=256&g=1)
PnP
Updated on September 18, 2022Comments
-
PnP almost 2 years
So this is the current setup - essentially I would like to get my DHCP server, serving DHCP requests for two seperate subnets.
Netgear DG834G acting as a modem connected to a Sonicwall Pro 2040.
X0 - LAN - 192.168.1.0/24
X1 - WAN - <WAN-IP>
X2 - WLAN - 192.168.10.0/24
At the moment, I have a 2008R2 server with DHCP installed, with an IP address on the 192.168.1.0/24 range handling DHCP fine for this subnet.
The Sonicwall is configured correctly - anything connected to the WLAN has Full Allow to anything in the LAN, and vice versa but it will not lease an IP from my Server.
I've also added another IP address to the server, so the physical NIC now has two IP's:
192.168.1.2
and192.168.10.2
with a DHCP scope configured for each.Still no luck!
Any ideas?
Thanks!
-
jscott over 11 yearsIs your Sonicwall acting as a DHCP server?
-
PnP over 11 yearsNope, I would like all my DHCP requests to be satisfied from the server.
-
jscott over 11 yearsTheD: I understand your desire for that, but as @joeqwerty says, if the Sonicwall is acting as the DHCP server, instead of relaying or providing the helper-address of the Windows server, the clients won't talk to the Windows DHCP service.
-
PnP over 11 yearsAt the moment - the DHCP server is turned off on the Sonic, so the only source for DHCP addresses is the 2008 box. My understanding of Helper-Addresses, just a way for broadcast traffic to be passed between two subnets?
-
-
joeqwerty over 11 yearsPut a packet capture program on the server, run it, filter it for DHCP, and look for DHCP messages originating from the Sonicwall. Any DHCP messages from the Sonicwall should have the originating network identified in the giaddr field (the network where the DHCP message originated). This field identifies to the server what DHCP scope it should assign an ip address from. Make sure this corresponds to the WLAN network. Make sure you have a scope that matches the WLAN network.