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

Replacing MS DHCP with pfSense DHCP for /22 subnet question

Scheduled Pinned Locked Moved General pfSense Questions
17 Posts 5 Posters 1.3k 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
    SenseiNYC
    last edited by SenseiNYC Oct 8, 2019, 11:41 PM Oct 8, 2019, 10:17 PM

    Sorry if I over simplify it, I like being as concise as possible.

    Currently the network assigned on the LAN is 10.1.0.0/22 which covers
    10.1.0.0
    10.1.1.0
    10.1.2.0
    10.1.3.0

    The MS DHCP Server is handing out
    10.1.2.0 with a netmask of /24

    All static devices (servers, etc) are located on
    10.1.3.0 with a netmask of /24

    I recently attempted to move DHCP to pfSense. The problem is that pfSense is handing out 10.1.2.0 with a subnet of /22 and that value cannot be changed. I thought of exporting the config file XML, modifying the <netmask> tag to <netmask>255.255.255.0</netmask> in order to maintain the continuity within the network and not have to reconfigure all static device netmasks in the 10.1.3.0 subnet.

    Before I do so, I wanted to ask if pfSense will behave and allow this modification or will I end up in subnet hell?

    Thanks.

    D 1 Reply Last reply Oct 8, 2019, 11:15 PM Reply Quote 0
    • C
      chpalmer
      last edited by chpalmer Oct 8, 2019, 10:34 PM Oct 8, 2019, 10:32 PM

      Did you set your pfsense LAN interface for this range to a /22? I just tried on my local box on interface and have no problem setting a /22 on its DHCP server..

      Triggering snowflakes one by one..
      Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

      1 Reply Last reply Reply Quote 0
      • J
        johnpoz LAYER 8 Global Moderator
        last edited by johnpoz Oct 8, 2019, 10:40 PM Oct 8, 2019, 10:36 PM

        Huh? First you state your on a /22, then you say your MS dhcp is handing out /24??

        Do you mean you have 4 vlans, and you have setup scopes with dhcp relay to let your MS dhcp hand out the different /24s out of the /22 to your vlans?

        All static devices (servers, etc) are located on
        10.1.3.0 with a netmask of /24
        

        Pfsense dhcp can not do that - it has to have an interface in each vlan.. Or it can relay.. But if what you want to hand out is actually /22 then yeah it can do that just fine.

        Are you wanting to expand from /24 to /22 - and only hand out a portion of that range via dhcp say 10.1.2.10-250/22 to your clients?

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.7.2, 24.11

        1 Reply Last reply Reply Quote 0
        • D
          Derelict LAYER 8 Netgate @SenseiNYC
          last edited by Oct 8, 2019, 11:15 PM

          @SenseiNYC

          Replacing MS DHCP with pfSense DHCP for /22 subnet question

          Why?

          Chattanooga, Tennessee, USA
          A comprehensive network diagram is worth 10,000 words and 15 conference calls.
          DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
          Do Not Chat For Help! NO_WAN_EGRESS(TM)

          1 Reply Last reply Reply Quote 0
          • J
            johnpoz LAYER 8 Global Moderator
            last edited by Oct 8, 2019, 11:22 PM

            Yeah I would wonder that as well.. I think maybe he is wanting to grow from /24 to /22?? But if your MS shop, and have AD up and running - best to use MS for your dns and dhcp.

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.7.2, 24.11

            1 Reply Last reply Reply Quote 0
            • S
              SenseiNYC
              last edited by Oct 8, 2019, 11:46 PM

              I edited my original. The LAN INT has a /22. I only want DHCP for a single Class C, which is 10.1.2.0/24

              Yes MS DHCP is handing out a subnet of /24 because it is configurable on MS DHCP. It does not appear to be configurable on pfSense which is why I asked about altering the DHCP backup XML and restoring just the DHCP.

              Again, there are some machines on the 10.1.3.0 which have a static assignment with a /24 and they cannot communicate back with the clients on 10.1.2.0 when they request connectivity.

              I know all the comments out there "oh why are you doing this" and all, believe me, not my first choice (not my choice at all, just my job to get it to work).

              I can easily get this going with a Cisco router or even an ASA, but hell if I am going to use a Cisco over pfSense :-p

              1 Reply Last reply Reply Quote 0
              • S
                SenseiNYC
                last edited by Oct 8, 2019, 11:48 PM

                As far as the "why leave MS DHCP?" question.. Unstable server which we are waiting for the budget to replace and for now, we need a stable DHCP server.

                1 Reply Last reply Reply Quote 0
                • D
                  Derelict LAYER 8 Netgate
                  last edited by Oct 8, 2019, 11:49 PM

                  The subnet mask pfSense DHCP gives is the same as the interface subnet mask. To do otherwise is pretty much nonsensical.

                  You can easily set the pool to only give out addresses 10.1.2.1 through 10.1.2.254 but as far as a different subnet mask, I would reevaluate your network design first.

                  Chattanooga, Tennessee, USA
                  A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                  DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                  Do Not Chat For Help! NO_WAN_EGRESS(TM)

                  1 Reply Last reply Reply Quote 0
                  • S
                    SenseiNYC
                    last edited by Oct 9, 2019, 12:05 AM

                    Derelict, not my call. I am only in there to do as I was asked. I do agree but again, not my call. I know that DHCP gives out a subnet as defined by the Interface. I was only hoping to avoid changing the subnet masks of the devices in the 10.1.3.0 to /22 and initiate the change on pf instead.

                    J 1 Reply Last reply Oct 9, 2019, 12:53 AM Reply Quote 0
                    • J
                      johnpoz LAYER 8 Global Moderator
                      last edited by Oct 9, 2019, 12:11 AM

                      @SenseiNYC said in Replacing MS DHCP with pfSense DHCP for /22 subnet question:

                      Again, there are some machines on the 10.1.3.0 which have a static assignment with a /24 and they cannot communicate back with the clients on 10.1.2.0 when they request connectivity.

                      Well no shit.. They are on a different network... If you want to use /24's then you vlan your networks to be these different /24's and then route between them.

                      If you want them all on the same L2 and talk to each other then they would all need to have /22 to cover the range netblock you stated..

                      To make it work - if they are all on the same L2 then they all need a mask that is what that L2, L3 network is - ie /22

                      To be honest if you have servers and clients, etc. on different networks - then they should be on different vlans and you route - which pfsense can do for you easy.

                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                      If you get confused: Listen to the Music Play
                      Please don't Chat/PM me for help, unless mod related
                      SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                      S 1 Reply Last reply Oct 9, 2019, 1:58 AM Reply Quote 0
                      • J
                        JKnott @SenseiNYC
                        last edited by Oct 9, 2019, 12:53 AM

                        @SenseiNYC said in Replacing MS DHCP with pfSense DHCP for /22 subnet question:

                        Derelict, not my call. I am only in there to do as I was asked.

                        It sounds like the person asking for that might not know what he's talking about.

                        PfSense running on Qotom mini PC
                        i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                        UniFi AC-Lite access point

                        I haven't lost my mind. It's around here...somewhere...

                        1 Reply Last reply Reply Quote 0
                        • J
                          johnpoz LAYER 8 Global Moderator
                          last edited by johnpoz Oct 9, 2019, 1:36 AM Oct 9, 2019, 1:34 AM

                          I have to agree @JKnott here.. There seems to be a lack of understanding for sure.. If you want all your devices to talk to each other they need to be on the same network - that means the same mask be it /24 or /23 or /22... Do you actually have that many devices? /22 is 1000 devices.. Do you have that many? Will you get to that many say sometime in the next year or so?

                          To be honest, lets say you had that many - that is a pretty big broadcast domain.. If these are windows boxes its going to be a bit noisy ;) Windows out of the box just loves to put shit on the wire for no reason...

                          If you have different types of devices - say servers and users.. You should put them on different vlans and route.. They will all be able to talk to each other - but now you can have some control via firewall, and you also reduce the number of devices on the same broadcast domain.

                          So this person told you to make it work... So make it work correctly ;)

                          If you have questions on how to do that - there are lots of people here that love to help.

                          An intelligent man is sometimes forced to be drunk to spend time with his fools
                          If you get confused: Listen to the Music Play
                          Please don't Chat/PM me for help, unless mod related
                          SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                          1 Reply Last reply Reply Quote 0
                          • S
                            SenseiNYC @johnpoz
                            last edited by Oct 9, 2019, 1:58 AM

                            @johnpoz said in Replacing MS DHCP with pfSense DHCP for /22 subnet question:

                            Well no shit.. They are on a different network... If you want to use /24's then you vlan your networks to be these different /24's and then route between them.

                            If you want them all on the same L2 and talk to each other then they would all need to have /22 to cover the range netblock you stated..

                            As you said "well no shit". I am well aware of subnetting concepts. That's not the question. I think you all missed the point of the question so allow me to clarify. HOW can the DHCP server on pfSense be configured to distribute client info with a different subnet? Other DHCP servers can do it, but apparently pfSense is falling short here.

                            Again, thanks for the helpful responses. :-(

                            J 1 Reply Last reply Oct 9, 2019, 2:18 AM Reply Quote 0
                            • S
                              SenseiNYC
                              last edited by Oct 9, 2019, 2:15 AM

                              Ok so it seems that changing the config backup <netmask> tag from blank to 255.255.255.0 really doesn't change a thing. Now to discuss with the customer and explain the limitation of the system. Thanks again.

                              1 Reply Last reply Reply Quote 0
                              • D
                                Derelict LAYER 8 Netgate
                                last edited by Derelict Oct 9, 2019, 2:20 AM Oct 9, 2019, 2:17 AM

                                So spin up a Linux or FreeBSD VM running ISC DHCP or Kea and configure it exactly how you want it.

                                It's quite frustrating when people think an inability to overcome network maldesign is somehow a shortcoming in pfSense.

                                Chattanooga, Tennessee, USA
                                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                                Do Not Chat For Help! NO_WAN_EGRESS(TM)

                                1 Reply Last reply Reply Quote 0
                                • J
                                  JKnott @SenseiNYC
                                  last edited by Oct 9, 2019, 2:18 AM

                                  @SenseiNYC said in Replacing MS DHCP with pfSense DHCP for /22 subnet question:

                                  HOW can the DHCP server on pfSense be configured to distribute client info with a different subnet?

                                  The only way I can think of is with a DHCP relay. Otherwise, if the DHCP server is on the same network as the devices, it must have the same subnet. How do the other servers you mentioned do it?

                                  PfSense running on Qotom mini PC
                                  i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                                  UniFi AC-Lite access point

                                  I haven't lost my mind. It's around here...somewhere...

                                  1 Reply Last reply Reply Quote 0
                                  • J
                                    johnpoz LAYER 8 Global Moderator
                                    last edited by johnpoz Oct 9, 2019, 2:30 AM Oct 9, 2019, 2:27 AM

                                    So again.. as I stated before and Derelict is saying - pfsense can not handle scopes for other vlans that are handed to it via a relay. It has to have an interface in the L2 where it will see the dhcp discovers.

                                    And you sure can not hand out the wrong mask for what the interface is set to that dhcpd is listening on.

                                    Changing the mask on the clients so they can talk to other clients in some larger L2 is NOT the CORRECT solution anyway!!!! It would just be some borked up nonsense. Devices that reside on the same L2 all need to be in the same L3 network via proper sized mask for the L3 you want to run on that L2.

                                    If you want to have a dhcpd that can handle multiple scopes for different vlans - then your MS can do that now. Or as suggested fire up stand alone isc dhcpd.. But you would need relays to send the data to the dhcpd. Pfsense can be a relay from the different vlans that its connected to.

                                    But mixing masks on a large L2 is not a valid configuration.

                                    An intelligent man is sometimes forced to be drunk to spend time with his fools
                                    If you get confused: Listen to the Music Play
                                    Please don't Chat/PM me for help, unless mod related
                                    SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                                    1 Reply Last reply Reply Quote 0
                                    17 out of 17
                                    • First post
                                      17/17
                                      Last post
                                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                      This community forum collects and processes your personal information.
                                      consent.not_received