DHCP Hostnames

  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.

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
 

ColinTaylor

Part of the Furniture
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:

AdrianH

Occasional Visitor
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:

ColinTaylor

Part of the Furniture
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.
 

AdrianH

Occasional Visitor
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.
 

ColinTaylor

Part of the Furniture
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:

john9527

Part of the Furniture
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
 

AdrianH

Occasional Visitor
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.
 

AdrianH

Occasional Visitor
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
 

AdrianH

Occasional Visitor
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:

Similar threads

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