Assign aliases to hw address for easier device identification with dynamic ip

Currently the only way to have named devices in statistics and log is to have static ip address and writing host files. That won't really do in my case it is not feasible to have static ip for me.

It would be cool to have hw address assigned names instead. Doing this has an added benefit of not requiring root access to alter hosts and in setups with dynamic ip having stats correctly associated with the device instead of mixing it each time different ip is assigned

Hardware address based naming is already implemented. Lookups are done using the Pi-hole network table (see dashboard). Do you see hostnames in this table?

I see ip adresses only, though my ISP provided router sees hostnames. Anyway hostnames is not enough, I need aliases. Not all devices report hostnames

From everything I read here names are not based on hw addresses but on ip addresses, but obviously I might have missed something.

also logs and statistics do not show any hw adtresses but ip adresses, but network overview clearly shows that pi-hole sees hw adress

Yes. Networking overall is concerned with IP addresses and IP addresses are what is connected with hostnames. You can get hardware addresses only on the network segment you are on, they are not universally valid.

In the absence of hostnames, Pi-hole also tries to derive hostnames from IP addresses known to be from the same device. For this, we use the hardware address.

This reads as if you want to setup conditional forwarding. This allows your router to be used as forwarding destination for name lookups and should immediately give you want you want.

1 Like

My ISP-provided router is not really open to config. But even this wouldn't give me nice results since some devices do not have hostnames, but hw address are universally available locally since this is a local network setup

I see this is a pi-hole setting, results are hilarious though now names are shown as

You can try editing the database manually, inserting hostnames. FTL should pick them up afterwards. For this, you would use something like

sudo sqlite3 /etc/pihole/pihole-FTL.db "UPDATE network_addresses SET name = 'somename' WHERE ip = '192.168.x.y';"

This is what your router tells the Pi-hole what the hostname is...

You will get the best, and most reliable, output when switching DHCP from your router to your Pi-hole.

Yes probaby, not exactly setup I go for, manual aliases would be so much simpler and work nice with dynamic ip

Main reason I do not like pi-hole DHCP is that I do not consider it reliably available. With router serving as DHCP and providing secondary external DNS if pi-hole device shuts down I am fine, but with DHCP on pi-hole I will have to somehow ensure it is reliably always on

I have had no instances where the router was running and pihole wasn't, unless the power went out at which case I would have had to properly restore power to both any ways for them to both work reliably. Pihole itself doesn't stop working if it is running on a clean environment void of any problems.

1 Like

Yes, that is exactly my case. It is not a clean environment

I would challenge you. If you get the time, try to establish a clean platform. Pihole has made tremendous improvements over the last 2 years. If you want to maintain a correspondence on here of any challenges or more Q/A, I would love to continue chat on things you have tried or things you are going to try. I can offer up suggestions from there. Idk if too many people will be able to provide the best answer for you because there may be numerous reasons why your client connections are not advertised adequately. On suggestion I could offer up is to take the time to identify your devices in pi-hole itself. Establish a host name in either /etc/host or using the local pihole gui options.

the question of establishing a clean platform amounts basically to buying a separate device for it that wouldn't be doing anything else, not gonna happen soon

You should not run a network vital service like DNS on your testing lab.

VM is isolated enough. It being a shared hw I find acceptable as well as partial unavailability

How is your router providng "secondary external DNS if Pi-hole shuts down"?

That is a very standard setting in routers

There is quite a bit of confusion regarding these terms. The router advertises primary DNS and secondary DNS, which implies they are used in strict order.

In actuality, to most clients these appear as this DNS and another DNS, and clients are free to use either at any time. Providing a DNS to clients that is not a Pi-hole leads to DNS traffic bypassing Pi-hole.

what matters is one that is available one would be used, from what I see pi-hole DNS is actually being preferred.

I'd say occasional use of cloudflare DNS is not much of a problem