What's new

DHCP Hostnames

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

AdrianH

Occasional Visitor
Hi All,

I know the stock Asus firmware does not "publish" out the configured client names for DHCP clients. I presume neither does Merlin FW?

I am waiting for the alpha builds to go to beta before installing on my RT-AX88U. Once I upgrade though, what is the easiest way to configure client names so that they are "published" for my DHCP clients. I have been reading up about configuring dnsmasq Custom config files · RMerl/asuswrt-merlin.ng Wiki · GitHub and by adding

Code:
/jffs/configs/dnsmasq.conf.add

I can add some entries like so to set the client name

Code:
dhcp-host=3C:8D:20:...,192.168.2.154,GHubKitchen


Question is, can I add a client name just by MAC address, or would I have to include a static IP? Ultimately I would just want to add client names to MAC address and let DHCP assign whatever IP it so wishes.

Thanks
 
I have no idea what you mean by "publish out". Also, are you talking about client names (which are just arbitrary names you can assign to clients in the Network Map) or host names (which can be resolved through DNS)?

Merlin's firmware allows you to assign a host name to a client when you create a DHCP IP reservation for it (LAN > DHCP Server > Manually Assigned IP...). Stock firmware does not have this feature.
 
Last edited:
I have no idea what you mean by "publish out". Also, are you talking about client names (which are just arbitrary names you can assign to clients in the Network Map) or host names (which can be resolved through DNS)?

Merlin's firmware allows you to assign a host name to a client when you create a DHCP IP reservation for it (LAN > DHCP Server > Manually Assigned IP...). Stock firmware does not have this feature.

Yes, I am talking about the arbitrary client names set in network map. But these names do not show up when scanning my network or in my AdGuard Home DNS server when using stock FW.

So looking for a solution where I wouldn't have to reserve an IP, but just assign a name for a client. Was hoping Merlin FW could do this, or possibly use dnsmasq to set these names based on MAC address.

Basically I want to see the names I set when looking at my network or in my AdGuard Home query log without having to reserve an IP. This is what I meant by publish.
 
Last edited:
I assume that your AdGuard Home query log does a reverse lookup on the client's IP address. If you inserted the client name into DNS that would be the same as defining a normal host name. I believe the problem with trying to use the client name in DNS is that it can contain characters that are not allowed in DNS host names. IMHO it's much better and simpler to not use client names at all and just use hosts names exclusively. That way the same names are used consistently everywhere, both on the router and on the LAN.
 
I assume that your AdGuard Home query log does a reverse lookup on the client's IP address. If you inserted the client name into DNS that would be the same as defining a normal host name. I believe the problem with trying to use the client name in DNS is that it can contain characters that are not allowed in DNS host names. IMHO it's much better and simpler to not use client names at all and just use hosts names exclusively. That way the same names are used consistently everywhere, both on the router and on the LAN.

Thanks for the prompt replies.

I believe AGHome does an ARP to get the client names. I used to have an Asus RT-N18U with FreshTomato installed. On this I could merely set a name for the client based on MAC without IP reservation. AGHome displayed there's names set in the router itself.

The issue with setting it up in AGHome is that it can't be set by MAC address, so if the client's IP changes, the set client name won't display.

I don't mind where I set the names to be honest, was just hoping I could assign names to a MAC address and not IP address.
 
I think you're making this more complicated than it is (unless I'm missing something). The names used by ARP, FreshTomato (AFAIK) and AGHome would just be regular DNS host names, not the arbitrary client names used by Asus' Network Map.

I don't know what you mean "setting it up in AGHome". I'm not suggesting any changes to AGHome.

You could indeed use a custom dnsmasq config to assign specific host names to MAC addresses. But that's just unnecessary complication. You would have to administer them manually by editing the file and make sure that they didn't conflict with anything setup in the GUI. Whether a MAC address has a reserved IP address or not is of no concern to you AFAICT. There is already a GUI page in Merlin's firmware that allows you to easily associate a host (DNS) name with a MAC address so I can't think why you could not use this.

Maybe if you install Merlin's firmware what I'm trying to describe will become more obvious.
 
Last edited:
I don't mind where I set the names to be honest, was just hoping I could assign names to a MAC address and not IP address.
make a /jffs/configs/dnsmasq.conf.add
with the following lines (use the dhcp-host directive and just leave out the ip address)
dhcp-host=mac_address,hostname

make sure you follow the rules for dhcp hostnames and not the 'take everything' network names
 
I think you're making this more complicated than it is (unless I'm missing something). The names used by ARP, FreshTomato (AFAIK) and AGHome would just be regular DNS host names, not the arbitrary client names used by Asus' Network Map.

I don't know what you mean "setting it up in AGHome". I'm not suggesting any changes to AGHome.

You could indeed use a custom dnsmasq config to assign specific host names to MAC addresses. But that's just unnecessary complication. You would have to administer them manually by editing the file and make sure that they didn't conflict with anything setup in the GUI. Whether a MAC address has a reserved IP address or not is of no concern to you AFAICT. There is already a GUI page in Merlin's firmware that allows you to easily associate a host (DNS) name with a MAC address so I can't think why you could not use this.

Maybe if you install Merlin's firmware what I'm trying to describe will become more obvious.

I'll give Merlin a shot once in beta. Thanks for all your insight.
 
make a /jffs/configs/dnsmasq.conf.add
with the following lines (use the dhcp-host directive and just leave out the ip address)
dhcp-host=mac_address,hostname

make sure you follow the rules for dhcp hostnames and not the 'take everything' network names

Thanks for the advice.

Will give Merlin a go first as Colin has suggested. I will bookmark your post though
 
make a /jffs/configs/dnsmasq.conf.add
with the following lines (use the dhcp-host directive and just leave out the ip address)
dhcp-host=mac_address,hostname

make sure you follow the rules for dhcp hostnames and not the 'take everything' network names
Hi

Thanks for the solution, working perfectly. All my non-static DHCP client's now have a name.
 
Last edited:

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