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

    Assign Client IP based on their MAC Address

    Scheduled Pinned Locked Moved DHCP and DNS
    4 Posts 3 Posters 6.4k 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.
    • J
      jp26198926
      last edited by

      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,

      1 Reply Last reply Reply Quote 0
      • J
        jp26198926
        last edited by

        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?

        1 Reply Last reply Reply Quote 0
        • A
          astana
          last edited by

          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.

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

            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.

            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.