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

    Static DHCP mapping with hostname instead of I.P.

    Scheduled Pinned Locked Moved DHCP and DNS
    4 Posts 2 Posters 1.9k 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.
    • T Offline
      terse_one
      last edited by

      Hello,

      Is it possible to use a hostname instead of an I.P. for setting up a DHCP static mapping?

      dhcpd.conf allows for the fixed-address option to assign an I.P. address or a name.
      I cannot seem to get this to work with pfSense 2.2.2 using the Web GUI.

      e.g.  Can the Web Gui add a fixed-address entry for a name like so?
      host aHost1 {
                      hardware ethernet a1:b1:c1:d1:e1:f1;
                      fixed-address aHost1;
              }

      instead of

      host aHost1 {
                      hardware ethernet a1:b1:c1:d1:e1:f1;
                      fixed-address 192.168.1.1;
              }

      Leaving the I.P. address empty omits the fixed-address option from the dhcpd.conf when using the
      Web GUI.

      Only entering a hostname does not appear to allow a static assignment of an I.P.
      Hostnames have been defined in the /etc/hosts and also in the DNS resolver.

      1 Reply Last reply Reply Quote 0
      • D Offline
        doktornotor Banned
        last edited by

        Huh? WTF. You do not set hostname via fixed-address. You can use option host-name but that's gonna have no effect if the hostname is already set on the machine. I.e, only usable for something like PXE boot or whatever.

        1 Reply Last reply Reply Quote 0
        • T Offline
          terse_one
          last edited by

          Thank you for your input.

          The fixed-address option can be an I.P or a name.
          The Web GUI does validation for an I.P. address so no name can ever be entered.

          Looks like modification of the Web PHP will be needed to disable the I.P. check,
          or to find other ways of loading dhcpd.conf that is created outside of the GUI.

          1 Reply Last reply Reply Quote 0
          • D Offline
            doktornotor Banned
            last edited by

            @terse_one:

            The fixed-address option can be an I.P or a name.

            No.

            Completely twisted logic here.

            • Go to Services - DNS Resolver
            • Tick this box:

            • Configure your static leases in DHCP server.
            • Done.

            Absolutely no need to mess with /etc/hosts. Not to mention there's Host Overrides in DNS Resolver if you want to add custom DNS records.
            Absolutely no need to mess with dhcpd.conf.
            Absolutely no need to disable any checks.

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