DHCP, DNS and hostnames

Hello!

I’m having some problems with the DHCP server and name resolution with IPFire.

Here are the first three entries from the list of current dynamic DHCP leases:

192.168.10.101	78:3e:53:87:b2:42	   	            18/10/2024 14:29:48	
192.168.10.157	5c:47:5e:12:91:d1	RingDoorbell-d1	18/10/2024 14:33:26	
192.168.10.137	00:0c:c6:8a:6a:a2	demo-8a6aa2	    18/10/2024 14:39:28

192.168.10.101 hasn’t registered a hostname so I don’t know off the top of my head which machine on the network it is.

192.168.10.137 has registered a hostname but I can’t ping it by name from elsewhere on the network.

192.168.10.157 has registered a hostname and I can ping it by name from elsewhere on the network.

Is this down to a configuration issue with IPFire or with the network settings on individual devices?

Any ideas would be appreciated.

-Andy.

1 Like

I have done some random searching around the forums and discovered Must restart unbound and unbound-dhcp-leases-bridge to find host and running the following steps:

/etc/rc.d/init.d/unbound restart
/usr/sbin/unbound-dhcp-leases-bridge -d -vv

means that 192.168.10.137 can now be pinged across the network by name.

-Andy.

1 Like

Hi Andy,

Welcome to the IPFire community!

You’re already on the right track by using unbound, which is IPFire’s DNS server.

For the device without a hostname (192.168.10.101), you can manually define a hostname through the Edit Hosts section of the IPFire Web User Interface (WUI). This will ensure that IPFire replies to PTR requests with the hostname you set:

  1. Go to Network > Edit Hosts in the IPFire WUI.
  2. Enter the device’s IP address (e.g., 192.168.10.101).
  3. Set a hostname for the device. (Optionally, you can leave the domain name blank or enter a domain if you’re using one.)
  4. Make sure to check the box for “Generate PTR Record” to enable reverse DNS lookups.
  5. Click Add to save the changes and update Unbound’s configuration.

Hope this helps.

Thanks,
Adam

1 Like

It is then advisable to set up a static lease in the DHCP server to make sure the device always gets the same IP.

2 Likes

I would say yes, otherwise the host name would no longer belong to a new DHCP lease, unless the host linked the MAC and not the IP, which I cannot imagine.

2 Likes

check the dhcp client configuration:

  • dns name is not set/clear
  • configured dns name is invalid

ipfire :beetle:
you have found the topics :+1:
see the lease is older and the
sync-workaround-bound-bridge-thingy
failed :hole:
sad to read that it still does not work reliably. :crossed_fingers:

but the bridge-thingy works partially :carousel_horse:

on your nameless device it seems to be a
dhcp-client configuration issue.
and the bridge may be fixed one time :man_shrugging:

These host names are local host names that are set up inside these clients. These are a separate entity than the network. On old netbios systems like windows shares use this as “the computer name” and is not a dns name.
Now these days, its just used more to identify endpoint hosts quickly and some devices either do not have a netbios name set or don’t have the capability because it doesn’t support this legacy name method. This is why a DNS name server is used if names are required so that there is proper organisation and assignment to a local ip address.

1 Like