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

    DHCP reservation - GW

    Scheduled Pinned Locked Moved General pfSense Questions
    dhcp
    23 Posts 3 Posters 2.7k 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.
    • stephenw10S
      stephenw10 Netgate Administrator
      last edited by

      Maybe the value type there should be IP address. 🤔

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

        @andyrh ok just tried this on my windows pc.

        So I set it to dhcp, got a lease with gateway per dhcp scope, etc

        Then set up a reservation for 192.168.9.66, and set option 3 with nothing.. and released and renewed and got the .66 address, but no gateway..

        dhcp3.jpg

        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 1
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          Ah, nice!

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

            @stephenw10 yeah that seems to be a good option for sure when you don't want a client to have a gateway. I think that should work for @AndyRH

            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
            • AndyRHA
              AndyRH
              last edited by

              Something went wrong around 13:50 and DHCP became corrupted. Had to restore it. (remember kids, backups are for fun, restores are serious)

              I have a new weekend project...

              Lots of 89884 messages then a crash. A restart did not work so I went to the backup.

              Jan 3 13:59:06 dhcpd 89884 /etc/dhcpd.conf line 579: unexpected end of file
              Jan 3 13:59:06 dhcpd 89884 ^
              Jan 3 13:59:06 dhcpd 89884 }
              Jan 3 13:59:06 dhcpd 89884 /etc/dhcpd.conf line 577: semicolon expected.
              Jan 3 13:59:06 dhcpd 89884 For info, please visit https://www.isc.org/software/dhcp/
              Jan 3 13:59:06 dhcpd 89884 All rights reserved.
              Jan 3 13:59:06 dhcpd 89884 Copyright 2004-2021 Internet Systems Consortium.
              Jan 3 13:59:06 dhcpd 89884 Internet Systems Consortium DHCP Server 4.4.2-P1
              Jan 3 13:55:37 dhclient 18922 Creating resolv.conf
              Jan 3 13:55:37 dhclient 18587 RENEW
              Jan 3 13:50:37 dhclient 47334 Creating resolv.conf
              Jan 3 13:50:37 dhclient 47085 RENEW

              o||||o
              7100-1u

              1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                Hmm, just by adding the option value to a static mapping?

                AndyRHA 1 Reply Last reply Reply Quote 0
                • AndyRHA
                  AndyRH @stephenw10
                  last edited by

                  @stephenw10 That is my guess. I will test it this weekend.

                  o||||o
                  7100-1u

                  1 Reply Last reply Reply Quote 0
                  • AndyRHA
                    AndyRH
                    last edited by

                    I finally got back to this. I was not able to reproduce the problem. It is now working as expected.

                    o||||o
                    7100-1u

                    1 Reply Last reply Reply Quote 1
                    • AndyRHA
                      AndyRH
                      last edited by

                      Just in case someone wonders by...
                      If the DHCP scope has a GW value of "none", if you do not specify a GW in a static mapping the host will not get a GW.

                      o||||o
                      7100-1u

                      1 Reply Last reply Reply Quote 1
                      • stephenw10S
                        stephenw10 Netgate Administrator
                        last edited by

                        Ah, yes that would do it. The static values override whatever is in the main config. So leaving it empty there would not override 'none' set in the main config.

                        Steve

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