Welcome, Guest. Please login or register.
Did you miss your activation email?
+  pfSense Forum
|-+  pfSense English Support» DHCP and DNS» Can I use DHCP for a Virtual IP subnet?
Username:
Password:
 
 

Pages: [1]   Go Down
  Print  
Author Topic: Can I use DHCP for a Virtual IP subnet?  (Read 2134 times)
0 Members and 1 Guest are viewing this topic.
stramato
Full Member
***
Offline Offline

Posts: 119


View Profile
« on: April 13, 2011, 02:01:55 am »

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?
Logged
GruensFroeschli
Global Moderator
Hero Member
*****
Offline Offline

Posts: 4901


No i will not fix your computer!


View Profile WWW
« Reply #1 on: April 13, 2011, 04:02:56 am »

No.
How would you distinguish requests for the different DHCP servers?

You can do this by using VLANs and a VLAN capable switch.
Logged

We do what we must, because we can.
(Except when you PM me to help you directly - DONT: keep your issues in the forum)
stramato
Full Member
***
Offline Offline

Posts: 119


View Profile
« Reply #2 on: April 13, 2011, 05:29:37 am »

Thanks Gruens.

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?
Logged
jimp
Administrator
Hero Member
*****
Offline Offline

Posts: 12865



View Profile
« Reply #3 on: April 13, 2011, 08:44:04 am »

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?
Logged

Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Donate to the project | My Wish List
stramato
Full Member
***
Offline Offline

Posts: 119


View Profile
« Reply #4 on: April 13, 2011, 09:45:22 am »

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.
Logged
jimp
Administrator
Hero Member
*****
Offline Offline

Posts: 12865



View Profile
« Reply #5 on: April 13, 2011, 10:03:46 am »

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
Logged

Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Donate to the project | My Wish List
spetnik
Newbie
*
Offline Offline

Posts: 9


View Profile
« Reply #6 on: August 16, 2011, 01:38:17 pm »

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?

Thanks
Logged
jimp
Administrator
Hero Member
*****
Offline Offline

Posts: 12865



View Profile
« Reply #7 on: August 16, 2011, 03:59:56 pm »

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.
Logged

Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Donate to the project | My Wish List
Pages: [1]   Go Up
  Print  
 
Jump to:  

 

Page created in 0.027 seconds with 20 queries.