Can I use DHCP for a Virtual IP subnet?
Hello, simple question:
My LAN's "real" IP is in 192.168.1.0/24
I created a Virtual IP in 192.168.2.0/24
Can I configure its DHCP to serve addresses within the Virtual IP's subnet?
GruensFroeschli last edited by
How would you distinguish requests for the different DHCP servers?
You can do this by using VLANs and a VLAN capable switch.
There will be only 1 DHCP in the network.
I just don't want the DHCP clients to use the same subnet of the "real" LAN IP of the pfSense box. Not really for security or anything serious. Just for convenience.
Perhaps i'll just use a separate DHCP box?
That isn't really possible in that way. If the DHCP clients are in a different subnet than the LAN IP, then they can't reach it for use as a gateway.
I'm not seeing how having two subnets in that way would be convenient, can you explain a little more about what you're hoping to gain with such a configuration?
hi jimp thanks for the reply.
Does it mean that for example:
pfSense LAN IP: 192.168.1.1
Virtual If: 192.168.100.1
Separate DHCP Server IP: 192.168.100.2
Default Gateway: 192.168.100.1
IP Range: 192.168.100.3 - 192.168.100.253
The DHCP clients will NOT be able to use the gateway?
For my motivation to do this non-best practice setup, there are a bunch of static IP clients/servers in 192.168.1.0/24 and the clients of 192.168.100.0/24 are windows domain members pointing to an IP in that subnet. I know not the ideal setup, but while we're going through the proper design on paper and red-tape (I arrived in here with this weird setup already in place hehe), this would be the least-intrusive way of getting the load-balancer integrated in the operations.
It depends on what you mean by "virtual if"
If that's an IP alias, it will work but it's exactly the same as using the LAN IP, it buys you nothing.
If you just need more IPs, use a /23 instead of a /24
spetnik last edited by
I know this is an old thread, but what about using DHCP leases? Would it be possible then to receive a virtual IP, if it is assigned in the lease table?
No, because there isn't a way to tell a static DHCP lease client to use a different gateway (in our GUI), so they wouldn't have a valid gateway.