Dhcp-host Option?
-
Hi,
I just want the name and MAC to be associated, but then assign an dynamic IP and let the name resolve - don't want to manually set all the IP addresses on the network.
This worked / works fine with dnsmask, just not dhcpd (likely me though).
Thanks!
-
Still a bit confused at what your after.. So my son's phone is android. And I have a fire around here somewhere I could turn on and check what it puts in the lease table
Ummm if your going to spend time putting in info to hand out name, why not just hand out an IP and create the dns record?
Can you not set the phone to register its name - I will take a look at my sons phone and see - notice how my phone registers its name in the dhcp leases. Still what exactly are you wanting to accomplish - why does it matter if phones have specific names. Can't you just look them up in the dhcp lease table by mac if need the IP of a phone? Why do they need to resolve via dns with some special name - notice the android resolves via dns with the name it registered.
I think android makes it a bit difficult to change the name, have to be rooted. But let me check my son's phone when he wakes up to see if can change it under settings, developer.
hmmm - trying to add attachments getting 500 internal error. Will try again latter to attach my examples showing what I see for devices..
-
NP, thanks for trying! And you're right - Android devices are difficult to change hostnames (as you say, have to be rooted).
I'll just hard-code an IP address - was trying to avoid that, but it's not a real big issue by any means.
Thanks again!
-
Finally getting back to this … :(
This is still quite a pain - as I have 20+ clients (family tablets, phones, PC's, WiFi AP's, etc.) ... and to assign an IP to each one, I need to find every one of them and reset them (as their new IP has to be outside of the pool).
Is there really no way to just have a mapping from MAC to hostname, and let DHCP hand out IP addresses as it wants?
Thanks!
-
"and to assign an IP to each one, I need to find every one of them and reset them"
What?? Reset them? Let them grab a lease.. Then just create a reservation for them from that lease, then use whatever name and IP you want.. So for example here is my sons phone.
I click that button - and next time it gets or renews it will use the new IP. And the name I create will be used for dns, etc..
-
Hi,
But the IP they currently have is from the pool, and the static IP has to be from outside the pool … so I have to change the IP on the pfSense end (to add the entry), but then it doesn't match the IP the client has ... no?
Thanks!
-
It will change when it goes to renew.. I am not understanding what your concern is?
See how my sons phone had .225 before - this is inside my scope.. I created a reservation calling it just android.. See it got the new IP .207 which is outside my scope and I can resolve it via the name I used.
Worse thing that happens if you have a stale lease that will just time out if client doesn't properly release the old one..
-
Makes sense. I guess my real issue is that I have a history of bandwidthd data (~ 3 months worth). By having to change the IP addresses (for the same client) I lose the legacy data. Just something I have to live with I guess. I admit, I'm used to dnsmasq, and it did have this capability (to just map a MAC to a hostname, and still run DHCP).
Thanks for the help!!!
-
who says you have to loose the data, just change the legacy data to reflect the new IP. I would think if you were wanting to track IPs bandwidth, and have been doing so for 3 months that you would of had reservations in for every device you wanted to track from the get go.
If you just let clients get a lease, there is nothing saying that couldn't change at some point in the future, etc. Only way to be sure a client maintains a IP is to create a reservation or static setup the IP on the box, etc..
-
Yep, agreed - likely easier to just purge the data, start again (as there are thousands of lines in the table, don't really want to change each line … ;)).
Thanks for all the help!