IP not shown when using static mapping



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


  • Rebel Alliance Global Moderator

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




  • For me it looks like that



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



  • Rebel Alliance Global Moderator

    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.



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



  • 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


  • Rebel Alliance Global Moderator

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



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