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

    IP not shown when using static mapping

    Scheduled Pinned Locked Moved DHCP and DNS
    9 Posts 3 Posters 2.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
      sloppy
      last edited by

      Hi,

      when using static mapping for a server the ip address is not showing anymore on the status dhcp leases page. What i want to achive is that a server definitley get's always the same ip but i also want a page where i have an overview  which host has which ip. Is this not possible?

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

        huh??  If you go to dhcp leases - all the static entries are there

        huhdhcpleasesstatic.png
        huhdhcpleasesstatic.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
        • S
          sloppy
          last edited by

          For me it looks like that

          1 Reply Last reply Reply Quote 0
          • P
            phil.davis
            last edited by

            I just had a play with that at home. I deleted the IP address from the static mapping for Phil-Karbonn-A12 and saved - I was surprised that it let me save it. What does it mean to have a static mapping without an IP address? In what sense is that going to be static? I guess you can specify other special parameters (DNS servers, gateway…) and that particular MAC address will get those parameters but an IP from the pool.

            Anyway, I disconnected my phone from the WiFi and connected again. It got IP address 10.49.215.31 from my DHCP pool, the entry for android-nnnnnnnn

            Status DHCP Leases show the active lease from the pool, then the static entry with no IP address, then my other 2 static entries. Those top 2 entries have the same MAC address - it is the same phone!

            I notice your master01 appears twice in your screen shot and both have the same MAC address. I guess your static mapping entries do not actually have an IP address specified.

            DHCP-Leases-Status.png
            DHCP-Leases-Status.png_thumb

            As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
            If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

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

              Says on the notes for IP address under the static gui

              If an IPv4 address is entered, the address must be outside of the pool.
              If no IPv4 address is given, one will be dynamically allocated from the pool.

              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
              • P
                phil.davis
                last edited by

                Thanks for that info - I should read the text on the GUI more often!

                So that means it is just the leases status display that can be a bit confusing - the same MAC address can be listed twice in the table, for its dynamic IP from the pool and for the static entry that it has without an IP address.

                Also in that case the dynamic entry that has "online" "active" also has the "+" button displayed to "add a static mapping for this MAC address". That is not a relevant action, because it already has a static mapping entry, just one without an IP address. The edit button on the row for the static entry is the relevant/correct button there.

                If I care enough at the weekend I might think how to make that right - how to best display only a single merged row of data that works nicely. Redmine: https://redmine.pfsense.org/issues/4451 on low priority.

                As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

                1 Reply Last reply Reply Quote 0
                • S
                  sloppy
                  last edited by

                  Ok, so right now there is just a second entry for static but the first entry is showing me the current ip of the server.
                  Btw. is the edit link broken for static mappings? For me it points always to http://xy.xy.xy.xy/services_dhcp_edit.php?if=lan&id=0

                  Thx

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

                    Edit button works just fine for me, yeah that is the link, where the id would be different per static.

                    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
                    • P
                      phil.davis
                      last edited by

                      @sloppy:

                      Ok, so right now there is just a second entry for static but the first entry is showing me the current ip of the server.
                      Btw. is the edit link broken for static mappings? For me it points always to http://xy.xy.xy.xy/services_dhcp_edit.php?if=lan&id=0

                      Thx

                      Yes, if there are multiple static entries without IP address, the Edit points to "id=0" for all of them.
                      This fixes it for me: https://github.com/pfsense/pfsense/pull/1503
                      This is better, handles the case when there are static entries on multiple interfaces with the same MAC address: https://github.com/pfsense/pfsense/pull/1504

                      As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                      If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

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