Defining hostnames per mac?
-
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> -
How is it supposed to know what hostname to give what MAC address if you don't program either the DHCP server or the device itself?
You don't have to set a static IP address. You can just set the MAC address and the hostname.
-
I've no issue providing the name. I just didn't know if I could do it in the DHCP setting and not put an IP.
I'll give that a go.
thanks
-
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.
-
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?
-
On the line, in the DHCP lease page, show the name I create, not the one DHCP is putting in.
-
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.
-
"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..
-
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
-
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.
-
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.
-
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
-
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.
-
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
-
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.