What's new

How does Asus or Asus Merlin source the device name under the System Log, Wireless Log Tab?

  • 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!

It doesn't. I wrote that code, and I never interfaced it with networkmap.


EDIT: I think I see where it might be coming from. I have the webui display any existing device nickname (which is defined by either Networkmap or the enduser) whenever the hostname is returned as <unknown>. This is done within the webpage itself rather than at the backend.

Code:
                        hostname = client[2];   // Name
                        if (nmapentry && (hostname == "*" || hostname == "<unknown>")) {
                                if (clientList[mac].nickName != "")
                                        hostname = clientList[mac].nickName;
                                else if (clientList[mac].name != "")
                                        hostname = clientList[mac].name;
                        }

This is only if there is no matching entry in the dnsmasq lease list.

See, you made it work and didn't even know it. I can confirm this behavior.

My blu-ray reports no hostname (* in DHCP leases and generic NIC vendor name in client list)
I've given it a custom name in client list, and that's what wireless log shows.

TV reports a generic name in DHCP. Gave it a more descriptive name in client list.
Wireless log shows the generic DHCP name.

Amazon fire stick, same situation and behavior as TV.

All my devices with manual DHCP reservations override the device reported hostname and the hostname given in the reservation shows up in DHCP leases, client list, and wireless log.

So as you've said, DNS (or DHCP lease name, same thing basically) preferred, if no DNS/DHCP then it grabs user defined name. I'm assuming for static IPs, it would grab user defined name if it is present, since obviously there is no DNS/DHCP name. If no DNS/DHCP or user defined name, I'm assuming it goes to "unknown".

DHCP Leases:
1695624500410.png


Client List:
1695624611855.png


Wireless Log:
1695624854960.png


NVRAM:
custom_clientlist=<FireTV4K>10:09:F9:2D:B2:48>0>9>><PanasonicTV>E0:CA:94:CA:5C:36>0>23>><BluRay>64:27:37:20:C8:24>0>0>>

DNS:
Name: amazon-e1ace0c8f.intra.xxxxxx.net
Address: 10.0.0.163

can't find 10.0.0.193: Non-existent domain

Name: COM-MID1.intra.xxxxxxxx.net
Address: 10.0.0.231
 
Last edited:
So as you've said, DNS preferred, if no DNS then it grabs user defined name. I'm assuming for static IPs, it would grab user defined name if it is present, since obviously there is no DNS name. If no DNS or user defined name, I'm assuming it goes to "unknown".
A little over my head but for my case, if it IS showing up in the Network Page/Client List (as my user defined name for that MAC Address for DHCP reservations), why doesn't it just use that name I reserved for that MAC (especially as my Static IP is the exact same address as the DHCP Reservation (for that MAC), in my case)?

Even though it is not strictly being assigned by DHCP, rather than saying unknown?
 
A little over my head but for my case, if it IS showing up in the Network Page/Client List (as my user defined name for that MAC Address for DHCP reservations), why doesn't it just use that name I reserved for that MAC (especially as my Static IP is the exact same address as the DHCP Reservation (for that MAC), in my case)?

Even though it is not strictly being assigned by DHCP, rather than saying unknown?

Because the code that @RMerlin wrote first looks at active DHCP leases, then at user defined names. It does not look at inactive leases or reservations, since that could cause problems as there would potentially be a duplicate in some scenarios. So if you want it to show up when your IPs are static, you need to put the name into client list manually.

From what I can see and what he confirmed, it follows this:
1. Pull name from DHCP active lease list
2. If not there, pull name from user defined name list
3. If not there, display <unknown>

The fact that it is showing in the client list as the name you defined is probably just left over, if you reboot the router it will probably go away, or maybe the Asus code (which nobody has access to for client list) does look at inactive DHCP reservations. But to force it to show up in wireless status (which does not look at those inactive reservations) you need to go into client list and type in your own custom name. Like I said, it can probably be the same name, just overwrite it.
 
The fact that it is showing in the client list as the name you defined is probably just left over, if you reboot the router it will probably go away
Thank you and understood, the order the name checks are made, makes sense.

So what I have done so far (all remotely) is:
  1. Removed the DNS Address (1.1.1.1) from both Wifi1 (Primary) and Wifi2 (Backup) on each of the Shelly Devices, via the WebGui
  2. Removed the Static IP Addressing completely from Wifi2 on the Shelly Devices, via the WebGui, but left the backup Wifi2 SSID available
  3. Enabled Intranet Access from GW2, where the IoT devices are on that GW2 SSID
  4. Changed the device names manually in Client List from ShellyMainHWC to ShellyMainHWC1 etc so as to test
  5. Rebooted the Router using button in WebGUI
Unfortunately none of these has had an effect on what is shown in the Wireless Log in terms of the missing names <not found>.

What I have not done is:
  • Manually reboot the Router, as I am not physically at the machine
  • Remotely rebooted the Shelly Devices (I am worried they will not reconnect in an ON state), I will do this when my brother gets there in a few days
  • Removed the Static IP addresses from the Shelly Devices via the Shelly WebGUI for the reasons previously noted i.e. I am concerned they will keep disconnecting
k.
 
Last edited:
Just an update, I removed the STATIC IP addresses from the Shelly admin and (presumabl) due to the DHCP reservations I am back to seeing the correct name in the Wireless as well as the Network Logs, with the exception as below.

However I am a bit confused that the System Log / Wireless log only shows the devices connected to the Guest Network, is this by design? The device that fell back to the backup Wi-Fi (my main wifI, a hidden Network) does not show up in the System Log / Wireless log (only the Network Map / Client List)?
 
Just an update, I removed the STATIC IP addresses from the Shelly admin and (presumabl) due to the DHCP reservations I am back to seeing the correct name in the Wireless as well as the Network Logs, with the exception as below.

However I am a bit confused that the System Log / Wireless log only shows the devices connected to the Guest Network, is this by design? The device that fell back to the backup Wi-Fi (my main wifI, a hidden Network) does not show up in the System Log / Wireless log (only the Network Map / Client List)?

All mine show up, main LAN, guest 1, and guest 2, but I'm not using a hidden SSID, may be somehow related.
 
Just an update, I removed the STATIC IP addresses from the Shelly admin and (presumabl) due to the DHCP reservations I am back to seeing the correct name in the Wireless as well as the Network Logs, with the exception as below.

However I am a bit confused that the System Log / Wireless log only shows the devices connected to the Guest Network, is this by design? The device that fell back to the backup Wi-Fi (my main wifI, a hidden Network) does not show up in the System Log / Wireless log (only the Network Map / Client List)?

Actually if you're using guest 1 (with LAN disabled) you'll end up with 2 DHCP leases, the inactive one will have a * (unknown) for hostname. That would probably cause some inconsistency. Do you mean the client shows up but says Unknown, or doesn't show up at all?

If not that, maybe just all the toying around, you can clear out the NVRAM variable for custom client names and reboot, see if that clears it up. Or maybe Merlin's code for that page relies on the network name not being hidden, though that would seem odd.
 
Actually if you're using guest 1 (with LAN disabled) you'll end up with 2 DHCP leases, the inactive one will have a * (unknown) for hostname.
Thanks for coming back on this, nope, not using GW1.
That would probably cause some inconsistency. Do you mean the client shows up but says Unknown, or doesn't show up at all?
Not at all, at least not in System Log/Wireless log; only Network/Client List.
If not that, maybe just all the toying around, you can clear out the NVRAM variable for custom client names and reboot, see if that clears it up.
ok, I can SSH in, do you have a command just for that variable, I did a search and

https://www.snbforums.com/threads/documentation-for-nvram-variables.74894/post-714919


cannot seem to locate a specific one to clear (not delete) these?

Or maybe Merlin's code for that page relies on the network name not being hidden, though that would seem odd.
I’ll let Merlin comment on that, he’s normally pretty accurate though!
 
Thanks for coming back on this, nope, not using GW1.

Not at all, at least not in System Log/Wireless log; only Network/Client List.

ok, I can SSH in, do you have a command just for that variable, I did a search and

https://www.snbforums.com/threads/documentation-for-nvram-variables.74894/post-714919


cannot seem to locate a specific one to clear (not delete) these?


I’ll let Merlin comment on that, he’s normally pretty accurate though!

If you're not using GW1 that's not the issue, was just a random thought since I've seen it on mine where I'll have 2 leases with the same MAC but different subnets, the inactive one having a *, figured it might interfere (this GW1 behavior is somewhat newer so figured merlin's html code for the replacement of unknown client names was written before that and maybe didn't account for it)

Unless something has changed, you should be able to see the names you set in client list by doing
nvram get custom_clientlist

To clear it, should be
nvram unset custom_clientlist
nvram commit
reboot
 
If you're not using GW1 that's not the issue, was just a random thought since I've seen it on mine where I'll have 2 leases with the same MAC but different subnets, the inactive one having a *, figured it might interfere (this GW1 behavior is somewhat newer so figured merlin's html code for the replacement of unknown client names was written before that and maybe didn't account for it)
OK
Unless something has changed, you should be able to see the names you set in client list by doing
nvram get custom_clientlist
Cheers; does the DHCP "Manually assigned IP around the DHCP List" Tab repopulate these or do I have to add them all back one by one?
To clear it, should be
nvram unset custom_clientlist
nvram commit
reboot

Thanks!
 
OK

Cheers; does the DHCP "Manually assigned IP around the DHCP List" Tab repopulate these or do I have to add them all back one by one?


Thanks!

Technically that variable will stay empty if you strictly use DHCP reservations (those are stored in a config file), the client list will then display the hostname you've put in the DHCP manual reservations instead. That's my preferred approach, nothing is static at that point, your DHCP reservation will populate client list, DNS, wireless log, etc all from that one place and everything is consistent.

I do have a couple manual client names for my TV and Blu-Ray player that I really didn't see the need to give DHCP reservations to, but there's been at least a couple times in the past where I've had to clear that entry and re-do them, it is not the most reliable thing.

One very annoying note on the client list is that if you just click a name in it (bringing up the ability to edit it) even if you do nothing and just click somewhere else to get out of it, it saves it to that NVRAM variable. So try to avoid doing that. If you do, just go back and do the nvram unset procedure. In theory, since it is the same host name as what you put for DHCP at that point, it will match, but if you ever change the DHCP hostname, then it will be out of synch, and it may confuse some other things. Basically once that edit field comes up, there seems to be no way to cancel it.

Even non reserved DHCP clients will populate that list, but it will be with whatever name they report when getting their lease. Some devices report no name, those are the ones where you'll see a generic NIC vendor or MAC address on client list and <unknown> on wireless log. So for those you either give them a manual reservation or edit the client list (like I said, preference to the first one, but I've broken that rule with a couple of things).
 
One very annoying note on the client list is that if you just click a name in it (bringing up the ability to edit it) even if you do nothing and just click somewhere else to get out of it, it saves it to that NVRAM variable. So try to avoid doing that. If you do, just go back and do the nvram unset procedure. In theory, since it is the same host name as what you put for DHCP at that point, it will match, but if you ever change the DHCP hostname, then it will be out of synch, and it may confuse some other things. Basically once that edit field comes up, there seems to be no way to cancel it.

This annoying quirk just happened to me (fat fingers), wonder if it is possible for ASUS or @RMerlin to prevent it somehow?
 
Last edited:
Consistency is key. No changes should ever be made until clicking an "apply". And to take it further, changes should be queued so that multiple changes in a session should not /need/ "apply"ing individually in succession. What a drag that is! I'd like to make changes in both general and professional wireless tabs, to the same damn radio, all at once instead of having to restart the radio twice. Who ever thought that was a good idea? Well, they never consulted me at any rate...
 

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