How to change hostname of dynamic DNS
-
@netboy you use a dynamic DNS service like noip, freedns and there you can change the name.
But if you referring to a host that gets an IP from a DHCP server (which is not the same as dynamic DNS) then you can change the name of the host itself, on the host.
Setting only the name for a host based on the MAC address in the DHCP server without an IP doesn't work.
Thread
https://forum.netgate.com/topic/141647/dhcp-not-registering-hostnames-in-dns
... is about exactly that. -
@patient0 said in How to change hostname of dynamic DNS:
Setting only the name for a host based on the MAC address in the DHCP server without an IP doesn't work.
Yeah I am not talking about static mapping but the DHCP lease that generates random IP to a MAC address. I would like to edit the host name and description of such random IP - From your post it looks like this cannot be done. If so, this feature will be useful.
-
@netboy what are you wanting to change..
So you have some client that gets a IP of your dhcp server pool on pfsense? And its host name is bob, and you want to change it to robert?
I am not sure what your wanting to change exactly.
-
@johnpoz said in How to change hostname of dynamic DNS:
So you have some client that gets a IP of your dhcp server pool on pfsense? And its host name is bob, and you want to change it to robert?
yes - that is correct.
-
@netboy well why don't you just change its name to robert on the device? Or just create a static dhcp lease.. Clearly you want to resolve this device by name, just create a reservation with a name.. If you know you want to resolve this device by the name, why not just set its IP with a reservation as well? It takes all of 2 seconds extra put in the IP you want this mac to use.
This is why its common practice to leave IPs out of the pool, normally some on the front end and the backend - so you can either set static IPs on the device, or via reservation outside the pool.
All of my devices have reservations.. Any time I add a new device to my network that will be staying on the network I let it get an IP from the pool.. Then add a reservation for that mac - setting up the info I want for that reservation, the IP, the hostname.
-
@johnpoz OK. Looks like I need to make all static and rename host accordinlgy.
Right now I have the reservations as follows:
If I change the address pool
from
172.16.0.31 to 172.16.0.200
To
172.16.0.51 to 172.16.0.200Will the "existing" IP's in the range 172.16.0.31 to 172.16.0.50 "automatically" get reassigned with new IP?
The above change will free up static ip from 172.16.0.31 to 172.16.0.50 which I use.
-
@netboy if you change the pool, then yes the devices that had lease with say IP .40 would get a new lease.. But its not going happen instantly.. The client would need to release and renew.. Unless you kill off the old lease it would still be able to renew that .40 etc..
If for example this .40 IP you want to know get something in your new pool that starts at .50 - would be to make sure that device does a release of the lease, and then gets a new one. Or you make sure you remove the lease on pfsense, the client might still continue to use that .40 until the lease expires on the device and he does a new discover and gets an ip in the new .50 pool.. But he wouldn't be able to "renew" it because pfsense no longer has that lease to renew.
If your device that currently has .40 is one of the ones you want with a reservation of .40, it wouldn't really matter - just setup the reservation for the .40 mac and whatever name you want to call it.
-
Does the host not send the correct hostname?
-
@stephenw10 The host name does send but it is cryptic for example I have a kasa smartswitch and the host name that it sends is HS103. There is no way I can change the host name of kasa in their app!
-
You tried just adding a static mapping with no IP address set?
-
@netboy I have a bunch of iot devices, lightbulbs and even some of those Kasa HS switches (smart plug).. I just name them want I want when I set the reservation, but I also set a specific IP.
I have never actually tried to just set name and let the IP be in the pool - I personally just can't come up with a use case where that would make any sense to me. If I am going to go to the trouble of making a reservation, I just set the IP as well. Its an extra click to type in the IP you want.
But yeah those iot devices normally don't have a way to change the name - I think most of my lights all have a built in name of like iwp0 or something like that. And yeah the HS ones are all like HS103 or HS110, depending on the specific model you have.
I then in the reservation set their name to where they are like hall or island, or guestroom, chairlamp, etc.
-
Mmm, switches should be static IMO.
-
@stephenw10 not like a switch switch, a power on or off iot switch ;) yeah all my actual switches are static.
I really only use them during xmas when I setup xmas lights they are all plugged into those iot switches, so they all turn on at specific time or or I can just say alexa - christmas on ;) or off..
I have quite a few of these
https://www.kasasmart.com/us/products/smart-plugs/kasa-smart-wifi-plug-mini
Smart plug might be a better term to use than switch ;)
-
This post is deleted! -
@reberhar you should prob read the thread.. He is not talking about ddns service(s).. He is talking about the name for a dhcp client.
-
@johnpoz Yup
But this is the heading.
How to change hostname of dynamic DNS
I will delete the post however.
-
@reberhar yeah true - took a while to get what he was actually after ;)
-
@johnpoz Yeah sometimes they don't know. It is a challenge to write replies to these posts. I have tried a few.
What seems obvious to us is not always easy for the inexperienced. I have had my days as well. "Oh ... I get it now"
Thanks for your consistent support.
Roy
-
@reberhar Maybe the heading should be named as
"How to change hostname of non-static IP address"?I apologize for the confusion guys
-
@netboy Really not a problem.