What's new

YazFi hostname and ip address UNKNOWN for all guest network devices

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

palo857

Occasional Visitor
Hi, first time poster. I've been using YazFi for several years, no troubles so far. But at some point, not sure when exactly, all the devices connected to the guest network appear with "Unknown" hostname and IP address. Any ideas where to start troubleshooting this?

I have a single YazFi guest network enabled, for IoT devices.

Configuration
----------------
Asus RT-AC68U
Asus-Merlin 386.9
YazFi 4.4.3

Network is Apple routers and Netgear switch wired to the four Asus ethernet slots. The Apple routers create a separate wireless network but that should be irrelevant. I have the Asus 5Ghz radio turned off, because the only devices that connect to the Asus wifi network connect to the 2.4 GHz YazFi guest network.

I reserve IP addresses for all devices in /jffs/configs/dnsmasq.conf.add rather than in the Asus-Merlin LAN -> LAN -> DHCP screen.

Screenshot 2023-09-10 at 2.03.55 PM.png

There are more devices but you get the idea.

Relevant dnsmasq.conf.add contents:

########
# tags and options
########

dhcp-option=tag:cloudflare,option:dns-server,1.1.1.1
dhcp-option=tag:known,option:dns-server,192.168.1.29
dhcp-ignore=tag:laa,tag:!multicast

...

########################
## GUEST NETWORK
########################

# DNS
dhcp-host=XX:XX:XX:XX:XX:XX,pi3bplus-wifi,192.168.101.4

# amazon devices
dhcp-host=XX:XX:XX:XX:XX:XX,echo-input,192.168.101.10,60m
dhcp-host=XX:XX:XX:XX:XX:XX,kindle-paperwhite,192.168.101.11,60m
dhcp-host=XX:XX:XX:XX:XX:XX,echo-dot3-blk1,192.168.101.12,60m
dhcp-host=XX:XX:XX:XX:XX:XX,echo-dot3-blk2,192.168.101.13,60m
dhcp-host=XX:XX:XX:XX:XX:XX,echo-dot3-gray,192.168.101.14,60m
dhcp-host=XX:XX:XX:XX:XX:XX,kindle,192.168.101.15,60m

# components
dhcp-host=XX:XX:XX:XX:XX:XX,bluray-eth,192.168.101.20,60m
dhcp-host=XX:XX:XX:XX:XX:XX,bluray-wifi,192.168.101.21,60m

# bulbs and sockets
dhcp-host=XX:XX:XX:XX:XX:XX,lvgrm-lamp1,192.168.101.30,60m
dhcp-host=XX:XX:XX:XX:XX:XX,lvgrm-lamp2,192.168.101.31,60m
dhcp-host=XX:XX:XX:XX:XX:XX,lvgrm-lamp3,192.168.101.32,60m
dhcp-host=XX:XX:XX:XX:XX:XX,lvgrm-lamp4,192.168.101.33,60m
dhcp-host=XX:XX:XX:XX:XX:XX,lvgrm-lamp5,192.168.101.34,60m

dhcp-host=XX:XX:XX:XX:XX:XX,gos1,192.168.101.36,60m
dhcp-host=XX:XX:XX:XX:XX:XX,gos2,192.168.101.37,60m
dhcp-host=XX:XX:XX:XX:XX:XX,gos3,192.168.101.38,60m

# cameras
dhcp-host=XX:XX:XX:XX:XX:XX,cam-lvgrm,192.168.101.50,60m
dhcp-host=XX:XX:XX:XX:XX:XX,cam-door,192.168.101.51,60m
dhcp-host=XX:XX:XX:XX:XX:XX,cam-garage,192.168.101.53,60m

# misc IoT devices
dhcp-host=XX:XX:XX:XX:XX:XX,garage-door,192.168.101.60,60m
dhcp-host=XX:XX:XX:XX:XX:XX,ecobee,192.168.101.61,60m
dhcp-host=XX:XX:XX:XX:XX:XX,levoit-purifier,192.168.101.62,60m
dhcp-host=XX:XX:XX:XX:XX:XX,dining-rm-lamp,192.168.101.63,60m
 
What IP address range have you configured in YazFi? If you don't assign the YazFi clients an IP address from the YazFi assigned IP address range they likely won't have their names properly listed in the YazFi interface.

Note that using 192.168.101.x and 192.168.102.x may potentially cause problems since Asus firmware itself uses those IP address range(s) for Guest WiFi. If possible try using other IP address range in YazFi. For example 192.168.5.x, 192.168.6.x and so on.

There is an alternate way to manually assign IP address to YazFi clients which works. See the following links for more information:
https://github.com/jackyaz/YazFi/wi...verse-DNS-records#a-note-on-dhcp-reservations
https://www.snbforums.com/threads/y...inc-ssid-vpn-client.45924/page-32#post-473403
 
Thanks for your reply!

Here's what I've done since my first post:
  • Update Asus-Merlin to 386.12
  • move ip reservations for the guest network from /jffs/configs/dnsmasq.conf to /jffs/scripts/dnsmasq.postconf
  • changed YazFi guest network ip range from 192.168.101.x to 192.168.105.x (and reflected that in the file in bullet point #2 above)
No change to the Unknown hostname/ip address issue.

The DHCP range for the guest network is set from 200-254 and I reserve ip addresses from 192.168.105.1 through 192.168.105.100 for known devices. I thought that approach was necessary to keep DHCP reservations from clobbering reserved addresses. But I did try changing the DHCP range to start at 2 instead of 200 (which includes the current reserved ip addresses) and hostname/ip were still "Unknown"
 
After making all of the changes mentioned did you either trigger a YazFi reload by either by clicking the Apply button on the YazFi GUI page, or select option 1 Apply YazFi Settings from the YazFi CLI terminal interface, or reboot the router?

When you moved the address assignments from /jffs/configs/dnsmasq.conf to /jffs/scripts/dnsmasq.postconf, did you properly format the code as indicated in the links in my above post? Example /jffs/scripts/dnsmasq.postconf file:
Code:
#!/bin/sh
CONFIG=$1
source /usr/sbin/helper.sh
pc_append "dhcp-host=DC:4F:22:9D:xx:xx,192.168.4.11,SmartPlug1" $CONFIG
pc_append "dhcp-host=C4:4F:33:84:xx:xx,192.168.4.12,SmartPlug2" $CONFIG
pc_append "dhcp-host=2C:F4:32:A1:xx:xx,192.168.4.13,SmartPlug3" $CONFIG
pc_append "dhcp-host=2C:F4:32:A3:xx:xx,192.168.4.14,SmartPlug4" $CONFIG

cat /jffs/addons/YazFi.d/.dnsmasq >> /etc/dnsmasq.conf # YazFi
 
Yes, I formatted the code correctly. arp -a run on the router shows all the correct device names and the new range of guest network IP addresses. /etc/dnsmasq.conf correctly shows the lines written by pc_append and then the last cat statement. Rebooted the router each time.
 
... But at some point, not sure when exactly, all the devices connected to the guest network appear with "Unknown" hostname and IP address. Any ideas where to start troubleshooting this?

I have a single YazFi guest network enabled, for IoT devices.

Configuration
----------------
Asus RT-AC68U
Asus-Merlin 386.9
YazFi 4.4.3

Network is Apple routers and Netgear switch wired to the four Asus ethernet slots. The Apple routers create a separate wireless network but that should be irrelevant. I have the Asus 5Ghz radio turned off, because the only devices that connect to the Asus wifi network connect to the 2.4 GHz YazFi guest network.

I reserve IP addresses for all devices in /jffs/configs/dnsmasq.conf.add rather than in the Asus-Merlin LAN -> LAN -> DHCP screen.
...
Yes, I formatted the code correctly. arp -a run on the router shows all the correct device names and the new range of guest network IP addresses. /etc/dnsmasq.conf correctly shows the lines written by pc_append and then the last cat statement. Rebooted the router each time.

To begin diagnosing the problem you described, run YazFi CLI via an SSH session and select menu option #2 to generate the list of currently connected clients:

RT-AC86U_YazFi_CLI.jpg


Post a screenshot of the results shown on your terminal window. Also, post the file that gets generated (/jffs/addons/YazFi.d/.connectedclients) along with your current "/etc/dnsmasq.conf" file.

If the Hostnames & IP addresses are still shown as "Unknown" via CLI, run the following set of commands (copy & paste the entire function, followed by the function call, on your SSH terminal window) and post the resulting file ($HOME/YazFi_DEBUG_Info.txt).

[EDIT: Updated code to gather more diagnostics data]
Bash:
_GetYazFiDebugInfo_()
{
    printf "$(nvram get productid): "
    printf "$(nvram get firmver).$(nvram get buildno).$(nvram get extendno)"
    printf " [$(date)]\n"
    echo "================================================================="
    nvram show 2>/dev/null | grep -E "^wl[0-3]_vifnames="
    echo "================================================================="
    for VIFname in $(nvram get wl0_vifnames) $(nvram get wl1_vifnames) $(nvram get wl2_vifnames)
    do
        if wl -i "$VIFname" assoclist 2>/dev/null | grep -q "^assoclist"
        then
            printf "-------\n $VIFname\n-------\n"
            wl -i "$VIFname" assoclist 2>/dev/null
        fi
    done
    echo "================================================================="
    printf " arp -a\n--------\n"
    arp -a | sort
    echo "================================================================="
    printf " /proc/net/arp\n---------------\n"
    cat /proc/net/arp | sort
    echo "================================================================="
    printf " dnsmasq.leases\n----------------\n"
    cat /var/lib/misc/dnsmasq.leases | sort -t ' ' -k 3
    echo "================================================================="
}
_GetYazFiDebugInfo_ > $HOME/YazFi_DEBUG_Info.txt

From all the above info, edit out or obscure any details (e.g. WAN IP address) that you don't feel comfortable sharing on a public forum, but don't eliminate the relevant information (e.g. LAN IP addresses, associated MAC addresses & LAN client hostnames, YazFi Interfaces, etc.).

I should have about an hour or so free right now & tomorrow evening to review the info and, hopefully, some clues will emerge that might point to the root cause.

My 2 cents.
 
Last edited:
Thanks very much, Martinski. Appreciate yourtime. I renamed dnsmasq.conf to .txt because it didn't want to upload under the first name.
 

Attachments

  • YazFi_DEBUG_Info.txt
    7.7 KB · Views: 33
  • Screenshot 2023-09-10 at 8.49.39 PM.png
    Screenshot 2023-09-10 at 8.49.39 PM.png
    389.9 KB · Views: 37
  • Screenshot 2023-09-10 at 8.48.51 PM.png
    Screenshot 2023-09-10 at 8.48.51 PM.png
    404.5 KB · Views: 46
  • dnsmasq.txt
    6.1 KB · Views: 36
Please provide the actual file: /jffs/addons/YazFi.d/.connectedclients
I'd like to collate data along with the other files provided.
 
Some more data points to gather:
[EDIT: Updated code to gather more diagnostics data]
Bash:
_GetYazFiDebugInfo_()
{
    printf "$(nvram get productid): "
    printf "$(nvram get firmver).$(nvram get buildno).$(nvram get extendno)"
    printf " [$(date)]\n"
    echo "================================================================="
    nvram show 2>/dev/null | grep -E "^wl[0-3]_vifnames="
    echo "================================================================="
    for VIFname in $(nvram get wl0_vifnames) $(nvram get wl1_vifnames) $(nvram get wl2_vifnames)
    do
        if wl -i "$VIFname" assoclist 2>/dev/null | grep -q "^assoclist"
        then
            printf "-------\n $VIFname\n-------\n"
            wl -i "$VIFname" assoclist 2>/dev/null
        fi
    done
    echo "================================================================="
    printf " arp -a\n--------\n"
    arp -a | sort
    echo "================================================================="
    printf " /proc/net/arp\n---------------\n"
    cat /proc/net/arp | sort
    echo "================================================================="
    printf " dnsmasq.leases\n----------------\n"
    cat /var/lib/misc/dnsmasq.leases | sort -t ' ' -k 3
    echo "================================================================="
}
_GetYazFiDebugInfo_ > $HOME/YazFi_DEBUG_Info.txt

One thing I noticed is that the DNS Servers for your YazFi 2.4GHz Guest Network (wl0.1) have been set to LAN IP address "192.168.105.4"
Code:
dhcp-option=wl0.1,6,192.168.105.4,192.168.105.4

And this is your "pi3bplus-wifi" device:
Code:
dhcp-host=B8:27:EB:AB:B8:57,pi3bplus-wifi,192.168.105.4

But, the ARP cache shows that device with an "incomplete" entry:
Code:
?                   (192.168.105.4)   at <incomplete>               on wl0.1
...
192.168.105.4    0x1         0x0         00:00:00:00:00:00     *        wl0.1

And the device doesn't appear on the "dnsmasq.leases" table either. This would indicate that DNS resolution may not be working for your YazFi network, but you didn't mention any problems with DNS resolution.

Can you temporarily change the DNS Server settings in the YazFi GUI to something that should be known to work (e.g. 8.8.8.8, 1.1.1.1) and see what happens to the "Unknown" devices?

I'll continue reviewing the data tomorrow evening.
 
Last edited:
Hi, that pihole serves DNS on two networks (the main and the guest), one from each interface, and I forgot to update its guest network ip address in its dhcpcd.conf. So that "incomplete" arp cache entry and dnsmasq.leases issue is one I've introduced during this troubleshooting thread. It was correctly configured back when the guest network was 192.168.101.0/24. But I've fixed it and the Unknown issue persists.

Here's the additional info file
 

Attachments

  • YazFi_DEBUG_Info2.txt
    7.9 KB · Views: 33
I did change the DNS server in the YazFi interface for the guest network to all kinds of different things (router at 192.168.1.1, router at 192.168.105.1, 1.1.1.1, 8.8.8.8) but the Unknown hostname/ip address issue persists.
 
What is the contents of the "/jffs/configs/dnsmasq.conf.add" file? You have apparently edited it to add content (per an earlier post) as such it could be that is causing problems. In my /jffs/configs/dnsmasq.conf.add file there is only the following (since I use YazDHCP):
Code:
addn-hosts=/jffs/addons/YazDHCP.d/.hostnames # YazDHCP_hostnames
dhcp-hostsfile=/jffs/addons/YazDHCP.d/.staticlist # YazDHCP_staticlist
dhcp-optsfile=/jffs/addons/YazDHCP.d/.optionslist # YazDHCP_optionslist

Do the log(s) show any dnsmasq issues or errors?

Using manual IP addresses on two different Asus routers running YazFi, both showed the names of the YazFi clients.
 
What is the contents of the "/jffs/configs/dnsmasq.conf.add" file? You have apparently edited it to add content (per an earlier post) as such it could be that is causing problems. In my /jffs/configs/dnsmasq.conf.add file there is only the following (since I use YazDHCP):
Code:
addn-hosts=/jffs/addons/YazDHCP.d/.hostnames # YazDHCP_hostnames
dhcp-hostsfile=/jffs/addons/YazDHCP.d/.staticlist # YazDHCP_staticlist
dhcp-optsfile=/jffs/addons/YazDHCP.d/.optionslist # YazDHCP_optionslist

Do the log(s) show any dnsmasq issues or errors?

Using manual IP addresses on two different Asus routers running YazFi, both showed the names of the YazFi clients.
Hi Bennor,

That file just contains DHCP reservations. Details are in my original post.

syslog seems to show normal dnsmasq activity on the guest network with device names and ip addresses.

Sep 11 13:45:03 dnsmasq-dhcp[5425]: DHCPDISCOVER(wl0.1) 64:52:99:c0:eb:ce
Sep 11 13:45:03 dnsmasq-dhcp[5425]: DHCPOFFER(wl0.1) 192.168.105.60 64:52:99:c0:eb:ce
Sep 11 13:45:03 dnsmasq-dhcp[5425]: DHCPREQUEST(wl0.1) 192.168.105.60 64:52:99:c0:eb:ce
Sep 11 13:45:03 dnsmasq-dhcp[5425]: DHCPACK(wl0.1) 192.168.105.60 64:52:99:c0:eb:ce myq-garage-door
Sep 11 13:45:03 syslog: wlceventd_proc_event(530): wl0.1: Auth 44:61:32:D8:F4:41, status: Successful (0), rssi:0
Sep 11 13:45:03 syslog: wlceventd_proc_event(559): wl0.1: Assoc 44:61:32:D8:F4:41, status: Successful (0), rssi:0
Sep 11 13:45:03 dnsmasq-dhcp[5425]: DHCPREQUEST(wl0.1) 192.168.105.14 20:a1:71:1d:2e:fc
Sep 11 13:45:03 dnsmasq-dhcp[5425]: DHCPACK(wl0.1) 192.168.105.14 20:a1:71:1d:2e:fc echo-dot3-gray
Sep 11 13:45:04 dnsmasq-dhcp[5425]: DHCPREQUEST(wl0.1) 192.168.105.61 44:61:32:d8:f4:41
Sep 11 13:45:04 dnsmasq-dhcp[5425]: DHCPACK(wl0.1) 192.168.105.61 44:61:32:d8:f4:41 ecobee
Sep 11 13:45:04 dnsmasq-dhcp[5425]: DHCPDISCOVER(wl0.1) 30:95:87:d3:5f:86
Sep 11 13:45:04 dnsmasq-dhcp[5425]: DHCPOFFER(wl0.1) 192.168.105.51 30:95:87:d3:5f:86
Sep 11 13:45:04 dnsmasq-dhcp[5425]: DHCPREQUEST(wl0.1) 192.168.105.51 30:95:87:d3:5f:86
Sep 11 13:45:04 dnsmasq-dhcp[5425]: DHCPACK(wl0.1) 192.168.105.51 30:95:87:d3:5f:86 cam-yi-wash-n
 
That file just contains DHCP reservations. Details are in my original post.
I know that, what I'm saying is that by adding the DHCP reservations to it you may have introduced the issue you are seeing with client names. What I'm suggesting is to return the /jffs/configs/dnsmasq.conf.add file back to its default version or code, prior to any changes you made to it or DHCP reservations you added to it. The idea is to troubleshoot and isolate if modifying that /jffs/configs/dnsmasq.conf.add file is the cause of what you are experiencing.

I have manual assigned YazFi DHCP reservations and they are not listed in the /jffs/configs/dnsmasq.conf.add file.
 
Hi, that pihole serves DNS on two networks (the main and the guest), one from each interface, and I forgot to update its guest network ip address in its dhcpcd.conf. So that "incomplete" arp cache entry and dnsmasq.leases issue is one I've introduced during this troubleshooting thread. It was correctly configured back when the guest network was 192.168.101.0/24. But I've fixed it and the Unknown issue persists.
Understood.

Here's the additional info file
Thank you. After reviewing & analyzing the latest debug info you provided, I was able to figure out where & what the problem was, and I've already got a fix in place in my 'develop' branch in GitHub. I've tested the fix with my own router's setup & it's working as expected, but the ultimate test & validation would be with your own router environment.

If you're willing to give it a try, you can download from GitHub my latest "4.4.4" develop branch version that includes the fix using the following command:
Bash:
curl -kLSs --retry 3 --retry-delay 5 --retry-connrefused https://raw.githubusercontent.com/Martinski4GitHub/YazFi/develop/YazFi.sh -o /jffs/scripts/YazFi.DEV.TEST.sh && chmod 755 /jffs/scripts/YazFi.DEV.TEST.sh

Then run this new YazFi script version to get the list of currently connected clients using the following command:
Bash:
/jffs/scripts/YazFi.DEV.TEST.sh  status

If the fix works for you as expected, you can overwrite your current "4.4.3" master release with the fixed "4.4.4" develop version:
Bash:
mv -f /jffs/scripts/YazFi.DEV.TEST.sh  /jffs/scripts/YazFi
But first, make sure that you're not currently viewing or on the YazFi webGUI page. Once you've overwritten the previous script with the fixed version, you can go to the YazFi webGUI and click on the "Apply" button to refresh the page & verify the results.

I'm planning to submit a GitHub PR to @Jack Yaz so he can merge the fix into his own YazFi repository.
 
After reviewing & analyzing the latest debug info you provided, I was able to figure out where & what the problem was, and I've already got a fix in place in my 'develop' branch in GitHub.
What was the problem and what was the fix?
 
Apologies for the delayed response. I've been very busy with work & personal commitments.

What was the problem ...
The problem was in the way the code that generates the table of currently connected clients was filtering out ARP cache entries that show guest clients as connected to the Main LAN while & after YazFi does a reset of the wireless radios before clients eventually start connecting to the expected Guest WLAN. At one point, the code takes the Main LAN IP address first 3 octets to filter out those entries, but the 3 octets were not correctly delimited so the code was also filtering out all IP addresses that started with the same 3-octet string.

For example, in the OP’s case the Main LAN subnet is 192.168.1.0/24, and the Guest Network WLAN is 192.168.10x.0/24, which triggered the problem because the string "192.168.1" intended to filter out only the Main LAN entries, ended up discarding the Guest Network entries as well, resulting in the "Unknown" label for ALL Guest Network client Hostnames & IP addresses. The "ALL" part was the first clue that caught my attention when the OP described the problem. It indicated that the issue was not limited to some of the guest clients; it was happening to all of them, which suggested the possibility of a systemic or structural error when creating the table of connected clients.

and what was the fix?
Well, you can review the source code changes in @Jack Yaz ’s YazFi repository on GitHub (see PR #102).
 
@Martinski, thanks for posting that. Hopefully that will help the OP and others who run into the issue of using 192.168.1 as the YazFi Guest IP address range. Seems like the solution are, either update YazFi that has the fix, or simply don't use 192.168.1 (or any variant of it) as the YazFi IP address range.
 
@Martinski, thanks for posting that. Hopefully that will help the OP and others who run into the issue of using 192.168.1 as the YazFi Guest IP address range. Seems like the solution are, either update YazFi that has the fix, or simply don't use 192.168.1 (or any variant of it) as the YazFi IP address range.
To clarify further, the problem is triggered not only when using subnet IP address ranges of the form "192.168.1xy.0/24" with YazFi. The underlying bug was causing the problem when the Main LAN subnet happens to have an IP address range whose first 3 octets can have a partial match with the YazFi Guest WLAN subnets.

Examples:
Code:
    Main LAN        YazFi Guest WLAN
----------------   ------------------
192.168.5.0/24      192.168.5xy.0/24
192.168.25.0/24     192.168.25x.0/24
172.25.3.0/24       172.25.3xy.20/24
172.30.15.0/24      172.30.15x.20/24
10.123.5.0/24       10.123.5xy.0/24
10.234.45.0/24      10.234.45x.0/24
So yes, one solution is to try to avoid the bug; the other is to update YazFi to the latest fixed version.

BTW, @Jack Yaz has already merged my most recent fix in YazFi, so to anyone having the problem described by the OP, I'd recommend getting the latest update from the 'develop' branch with the following commands:
Bash:
/jffs/scripts/YazFi develop
/jffs/scripts/YazFi forceupdate
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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