• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Can I use DHCP for a Virtual IP subnet?

Scheduled Pinned Locked Moved DHCP and DNS
8 Posts 4 Posters 10.1k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    stramato
    last edited by Apr 13, 2011, 7:01 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?

    1 Reply Last reply Reply Quote 0
    • G
      GruensFroeschli
      last edited by Apr 13, 2011, 9:02 AM

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

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

      We do what we must, because we can.

      Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

      1 Reply Last reply Reply Quote 0
      • S
        stramato
        last edited by Apr 13, 2011, 10:29 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?

        1 Reply Last reply Reply Quote 0
        • J
          jimp Rebel Alliance Developer Netgate
          last edited by Apr 13, 2011, 1:44 PM

          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?

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • S
            stramato
            last edited by Apr 13, 2011, 2:45 PM

            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.

            1 Reply Last reply Reply Quote 0
            • J
              jimp Rebel Alliance Developer Netgate
              last edited by Apr 13, 2011, 3:03 PM

              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

              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              1 Reply Last reply Reply Quote 0
              • S
                spetnik
                last edited by Aug 16, 2011, 6:38 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

                1 Reply Last reply Reply Quote 0
                • J
                  jimp Rebel Alliance Developer Netgate
                  last edited by Aug 16, 2011, 8:59 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.

                  Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                    [[user:consent.lead]]
                    [[user:consent.not_received]]