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

    Defining hostnames per mac?

    Scheduled Pinned Locked Moved General pfSense Questions
    15 Posts 6 Posters 4.8k 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.
    • L
      lovingHDTV
      last edited by

      Creating a static map without IP added an entry, but it doesn't map to the assigned IP address.  unless I did something wrong.

      I'll have to see if I can setup the hostname on the devices.

      1 Reply Last reply Reply Quote 0
      • DerelictD
        Derelict LAYER 8 Netgate
        last edited by

        If you don't set an IP address it will get an address out of the pool.

        What, exactly, do you want to see happen?

        Chattanooga, Tennessee, USA
        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
        Do Not Chat For Help! NO_WAN_EGRESS(TM)

        1 Reply Last reply Reply Quote 0
        • L
          lovingHDTV
          last edited by

          On the line, in the DHCP lease page, show the name I create, not the one DHCP is putting in.

          1 Reply Last reply Reply Quote 0
          • JKnottJ
            JKnott
            last edited by

            @lovingHDTV:

            Is there a way to alias a mac address with a hostname?  I don't want to statically assign every device, but it would be nice to see a nice hostname in the dhcp leases table instead of android- <random>I know how to do it which a static DHCP, but didn't know if you can just assign a hostname.

            thanks,
            david</random>

            No, you cannot.  Host names refer to IP addresses, not MAC.

            Just stop for a minute and consider a device on the other side of a router trying to reach that host name.  It cannot use just the MAC address to pass through a router, only an IP address will do.

            PfSense running on Qotom mini PC
            i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
            UniFi AC-Lite access point

            I haven't lost my mind. It's around here...somewhere...

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

              "On the line, in the DHCP lease page, show the name I create, not the one DHCP is putting in."

              Post a picture so this makes sense..

              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
              • L
                lovingHDTV
                last edited by

                Picture posted.

                A hostname is already provided, I just want to control it.  I tried changing the device name on the device itself, but it did not change what the DHCP server uses.

                thanks

                dhcp_hostnam.png_thumb
                dhcp_hostnam.png

                1 Reply Last reply Reply Quote 0
                • ?
                  Guest
                  last edited by

                  if you mean the androidxxxxxx, good luck, most android devices do not allow you to change that.

                  However, if it's a samsung you may be able to change it by changing the device name, then remove any static entries you have for the device and then reboot the device, whilst it's rebooting - delete any leases already given to it.

                  1 Reply Last reply Reply Quote 0
                  • JKnottJ
                    JKnott
                    last edited by

                    @lovingHDTV:

                    Picture posted.

                    A hostname is already provided, I just want to control it.  I tried changing the device name on the device itself, but it did not change what the DHCP server uses.

                    thanks

                    Once you've configured a static DHCP address for the phone, you can create another host name that points to the same address.

                    PfSense running on Qotom mini PC
                    i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                    UniFi AC-Lite access point

                    I haven't lost my mind. It's around here...somewhere...

                    1 Reply Last reply Reply Quote 0
                    • C
                      Chrismallia
                      last edited by

                      I think what the guy wants is to give the original hostname a friendly name in pfsense,  without changing the hostname from the device itself  or without giving static IPs to the devices, in pfsense I do not think there is a way of giving a device a friendly name without giving a static IP

                      1 Reply Last reply Reply Quote 0
                      • JKnottJ
                        JKnott
                        last edited by

                        @Chrismallia:

                        I think what the guy wants is to give the original hostname a friendly name in pfsense,  without changing the hostname from the device itself  or without giving static IPs to the devices, in pfsense I do not think there is a way of giving a device a friendly name without giving a static IP

                        Quite so and any device making a DNS query will expect an IP, not MAC, address back.  So, his only option is to map a DHCP address to the MAC address and then add a DNS entry with the desired host name pointing to that address.

                        PfSense running on Qotom mini PC
                        i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                        UniFi AC-Lite access point

                        I haven't lost my mind. It's around here...somewhere...

                        1 Reply Last reply Reply Quote 0
                        • C
                          Chrismallia
                          last edited by

                          He is not trying to eliminate a IP address, just leave it to DHCP not static but in the Firewall  he renames a device to a friendlier  name, 1  example if viewing flows in ntong it will not show up as android something but as tim mobile phone (infact in ntongng you can rename the device just for ntong )this can be done for sure in some firewalls as I did it myself using other firewall it gives you the option to edit the hostname to your  liking, but Note if you give a friendly name its just for your viewing/reports in the firewall you cant use the friendly name to resolve or ping the device, I think that is what is confused here

                          1 Reply Last reply Reply Quote 0
                          • JKnottJ
                            JKnott
                            last edited by

                            Does pfSense support a CNAME alias?  If so, he could create an alias for the Android-* name.  I do that with my firewall WAN address.  It's host name is dependent on the computer & modem MAC addresses.  So, I created an alias for it on my public DNS.

                            PfSense running on Qotom mini PC
                            i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                            UniFi AC-Lite access point

                            I haven't lost my mind. It's around here...somewhere...

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