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

    DHCP IPV4 Subnet configuration

    Scheduled Pinned Locked Moved DHCP and DNS
    8 Posts 5 Posters 791 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.
    • M
      mjsengineer
      last edited by

      This may be a dumb question, but I can't track the answer down.

      How do you change the subnet which is used by the DHCP server for a given interface?
      Is it automatically determined/set by considering the static IP which is defined?

      My new netgate device has a static IP of 192.168.0.254

      However, the DHCP subnet is on 192.168.1.  The manual states the subnet listing
      on the configuration page is "for reference only."

      Thanks

      1 Reply Last reply Reply Quote 0
      • JKnottJ
        JKnott
        last edited by

        Try changing the interface settings to reflect the network addresses you want to use.  Then set the DHCP range, within that network, on the DHCP server tab.

        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
        • M
          mjsengineer
          last edited by

          I did that.  I'll add that this a new device.  The static IP was changed from the
          default 192.168.1.1 to 192.168.0.254,  It took a few tries of the Setup Wizard
          and a hard reboot to get the initial setup working.

          The interface is set to the correct static IP for the the network (ie 192.168.0.254).
          Clients on that network have no issues connecting thru the firewall device. Everything
          seems to work, yet the DHCP server is reporting a different (the default) subnet.

          1 Reply Last reply Reply Quote 0
          • G
            gjaltemba
            last edited by

            Is there another dhcp server running? Will you share your dhcp log entries?

            1 Reply Last reply Reply Quote 0
            • johnpozJ
              johnpoz LAYER 8 Global Moderator
              last edited by

              Also screen shots of your interface settings and your dhcp server showing this wrong default network..  Been running pfsense for a very long time and have never seen that happen.

              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.8, 24.11

              1 Reply Last reply Reply Quote 0
              • SammyWooS
                SammyWoo
                last edited by

                U may have to stop the DHCP service, re-subnet it, re-start, or if unable, remove service and re-create form scratch.

                1 Reply Last reply Reply Quote 0
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator
                  last edited by

                  Here I took an interface not really using currently because my downstream router is offline.

                  So see its original network was 172.31.0/30

                  Changed it to 172.31.2/30, see the notice when I do that not to forget the dhcp server range.  I even got a alert when I applied that my range was invalid for the new network.

                  Went to dhcp server for that interface - changed the range to be within the netblock of the mask I put on the interface and all is good.

                  changeinterfaceIP.png
                  changeinterfaceIP.png_thumb

                  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.8, 24.11

                  1 Reply Last reply Reply Quote 0
                  • M
                    mjsengineer
                    last edited by

                    For whatever reason, after I set the IP for the LAN interface and rebooted the first time, the DHCP server still seemed to be looking at the old subnet.  However, when I looked at the logs, it seemed to be trying to use the correct subnet.

                    I rebooted the server a 2nd time and when it came back up, the DHCP server was
                    using the subnet which corresponded with the IP address of the interface.

                    I guess in answer to one of my original questions, it appears the subnet is automatically set based on the IP address which is assigned to the corresponding interface.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.