Assign Client IP based on their MAC Address



  • Good Day,

    I am new to PFsense and wondering how to assign an ip to client computer based on thier MAC.

    I tried: goto Services->DHCP Server and add the mac address to  DHCP Static Mappings table, but i get an error "The IP address must not be within the DHCP range for this interface."

    due to that error i tried to disable "DHCP server on LAN interface" and add again the MAC but the same error occured.

    Hope anyone can help/explain the right procedure.

    thanks,



  • ok i get it working, i just shrink the dhcp range in a half and the other half is for ip assignment.

    so in other word we cannot assign ip from thier mac if the dhcp service is disabled?



  • That would make complete sense as it's the DHCP service that supplies the IP address, either statically or from the pool.
    If DHCP is disabled then it cannot offer an IP address.



  • ok i get it working, i just shrink the dhcp range in a half and the other half is for ip assignment.

    Correct - make a DHCP range that is a part of the LAN subnet. Then allocate static-mapped entries to addresses outside the DHCP range.
    If you do not want to give out DHCP to unknown clients (ones that have no MAC-address entry) then there is a checkbox to deny unknown clients. When doing that, you could make the DHCP range really small, because nothing is allowed to use it anyway.


Log in to reply