How to add DHCP clients to router DNS

BosseSwede

Regular Contributor
I have two ASUS routers, one RT-AC68U and the other RT-AC86U.
They are used on different locations but are tied together using a VPN link over the Internet.
The answer to this post is probably really simple but I have not found a solution...

I am moving devices between the two LAN regularly and I would like the device to be added to the router's DNS so that the all devices on the LAN can connect to the others by using their hostnames.
Since this so far is not working I have to manually edit the hosts file of a device (like my laptop) every time another device has been attached to the network.
This is really tedious, so I hope there is a way to add the IP address of a new device to the local DNS table so the router knows how to route the call when a LAN device wants to connect to another by hostname, i.e "ping rpi-home" or similar.
Is this possible?
Most of my devices are Linux computers if that matters.
 

Justinh

Regular Contributor
Set the hostname on the device, in the OS. I hope I'm not missing something obvious here in what the issue really is...
 

ColinTaylor

Part of the Furniture
If the devices are configured as normal DHCP clients this should work automatically.
 

ColinTaylor

Part of the Furniture
Then your DNS is not setup correctly somewhere. If other DHCP clients are connecting to this network without issue then the problem must be with the network configuration on your device.
 

BosseSwede

Regular Contributor
Then your DNS is not setup correctly somewhere. If other DHCP clients are connecting to this network without issue then the problem must be with the network configuration on your device.
How does this forum work?
It seems like I cannot post anything sensible like a reply to your post. I am getting a strange message about something happening that could be seen in some browser window:
Oops! We ran into some problems. Please try again later. More error details may be in the browser console.
 
Last edited:

ColinTaylor

Part of the Furniture
How does this forum work?
It seems like I cannot post anything sensible like a reply to your post. I am getting a strange message about something happening that could be seen in some browser window:
Oops! We ran into some problems. Please try again later. More error details may be in the browser console.
It's a misleading error message. You typed in a banned word or phrase. That's usually "/etc /hosts" (without the space). Just replace it with something like "/etc//hosts".
 

BosseSwede

Regular Contributor
It's a misleading error message. You typed in a banned word or phrase. That's usually "/etc /hosts" (without the space). Just replace it with something like "/etc//hosts".
OK, below is the post I was trying to do and it does contain the "forbidden phrase" Is there a list of these forbidden words?

So I have several raspberry pi devices on the LAN and they all get their IP from the router (ASUS RT-AC68U). The IP addresses are reserved on the router so they stay the same.
If I ssh into one of these and ping the other by its hostname I get a message:
Code:
ping: unknown host xxxx

But if I put an entry for the other device into the hosts file then the ping and other commands targeting that device succeeds.

All of the devices have hostnames defined and these are presumably also sent to the DHCP server (the router) when they start up.

I do not understand what more I should do on the respective Linux device in this case...
 

ColinTaylor

Part of the Furniture
Post a screenshot of the Pi's network configuration.

Also post the complete output of this command:

Rich (BB code):
nslookup otherhost
where otherhost is the host name that fails.
 

Justinh

Regular Contributor
Could this be of help? Would this force a host name onto a device in DNS?
1644698331117.png
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top