DHCP IPV4 Subnet configuration



  • 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



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



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



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


  • LAYER 8 Global Moderator

    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.



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


  • LAYER 8 Global Moderator

    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.




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


Log in to reply