While connecting mobile to OpenWrt router AP, not showing IP on associated stations list


I have connected my mobile to OpenWRT router AP but it is not showing IP of connected client on the associated station list. Meanwhile, I have connected my Laptop to OpenWRT router AP, its IP was showing on the associated station list.

Can anyone tell me why Mobile IP is not showing in associated client list?

Thanks in advance.

Can you confirm that there is only one AP in your premises?
Also that there is a single SSID? Are you using only 2,4 band or 5 as well?
Are you serving DHCP from the router or use static IPs?
Could you post the /etc/config/wireless here?

ubus call hostapd.wlan0 get_clients
ubus call system board

Hostapd and the wifi driver only know clients by their MAC address.

The kernel associates a machine's MAC address with its IP via the ARP table.

At some point these two pieces of information are linked together for display on the LuCI status page. I am not sure exactly how.

But there is a big caveat in that for an entry to be generated in the ARP table, there has to have been a layer 3 interaction between the kernel and the client machine. A "dumb AP" which simply bridges all packets from a WiFi client out to the Ethernet cable at layer 2 will not have an ARP entry for every client.

Hi @trendy

Thanks for your reply.
I have 3-4 APs but different SSID name.
We are using both 2.4 bands and 5 bands as well.

config wifi-device 'wifi0'                
        option type 'qcawifi'             
        option hwmode '11ac'              
        option htmode 'HT80'              
        option channel 'auto'             
        option txpower '23'               
        option disabled '0'               
        option blockdfslist '1'           
        option country '5006'             
        option macaddr '00:03:7f:8e:72:48'

config wifi-device 'wifi1'   
        option type 'qcawifi'  
        option hwmode '11ng'   
        option htmode 'HT40+'             
        option htmode1 'HT40+'            
        option channel 'auto'             
        option txpower '19'               
        option disabled '0'               
        option country 'IN'               
        option macaddr '00:03:7f:8e:72:49'
config wifi-iface             
        option device 'wifi0' 
        option network 'lan'  
        option mode 'ap'                  
        option ssid '5ghz'             
        option encryption 'psk2+ccmp'     
        option key 'password'             
        option blockdfschan '0'           
        option disabled '0'               
        option hidden '0'                 
        option vhtmubfer '1'         
        option rate_limit_enabled '0'
config wifi-iface                    
        option device 'wifi1'        
        option network 'lan'         
        option mode 'ap'             
        option ssid '2.4ghz'        
        option encryption 'psk2+ccmp'
        option key 'password'        
        option disabled '0'          
        option hidden '0'            
        option rate_limit_enabled '0'
        option disablecoext '1'   

In this Laptop has IP while below that I have also connected my mobile phone and it doesn't show mobile IP.

Please help me out in this.
Thanks in advance.

Hi @vgaetera,

Thanks for your reply
Not able to run above command.

Command failed: Not found

This output i am getting.
Thanks in advance.

Where did you run that command ?

I suppose it is getting IP from DHCP and not Static, right?

I have the same output, but my wifi is disabled.
Maybe the wireless interface has different name? What is the output of iwinfo?

All of these commands run at the router command prompt. You need to log in on SSH.

iw is perhaps closest to the hardware, or the kernel.
iw dev -- shows your wifi host devices and their names (likely wifi0 and wifi1 in your case). You will need these names for the other commands. In the rest of the examples I use "wifi0". Replace it with the actual name of your interface if necessary.
iw dev wifi0 station dump shows about all the available details about connected stations that the wifi driver is able to report. Some wifi drivers report more details than others.
Higher level commands that present the data in different ways include
iwinfo wifi0 assoclist
ubus call hostapd.wifi0 get_clients

As I said before, at the wifi level you will (at most) only have the station's MAC address to identify it. The most robust way to find the IP corresponding to a MAC is the arp table, which you can examine with
arp -n
If the router assigned an IP address to the device via DHCP, the DHCP lease table will have an entry for it. This data also usually includes the hostname.
cat /tmp/dhcp.leases

All of these commands should at least execute on a basic release install of OpenWrt.


Minicom console.

I don't have the iwinfo utility.

Hi @mk24

I don't have iw utility.
I have one another company router and I have connected my OpenWRT router to that router.
So if I am connecting my any device like laptop or mobile i am getting IP from another router. But Openwrt GUI shows only laptop IP not mobile IP.
I think my arp table is not getting updated.
And also DHCP server is not working in my OpenWrt router in case of DHCP client but DHCP server is working in Static address.

It sounds weird that you don't have the iw of iwinfo. Have you used an official Openwrt image or some custom?
Regarding the GUI not showing the IP, it is not weird if the DHCP server is another router. The arp table gets filled if there is an arp request to the router. Try to ping or open the webgui page of the Openwrt router from your mobile and see if that will fix the issue.

Hi @mk24,

I have tried one thing. I have connected mobile phones and laptops to the openwrt SSID.
Laptop IP was showing in the associated stations list as it gets updated in arp table. But mobile IP was not showing in associated stations list as mobile IP is not get updated in arp table.
But once I open OpenWRT GUI from mobile now arp table has the entry of that particular mobile IP. So its get updated in the associated station list page.
My question is Why arp table is not getting updated when the client is connecting the OpenWRT SSID.

Thanks in advance.

That is not enough. In order for the Openwrt to fill in an arp entry, it needs to have a L3 connection with the device. If the Openwrt is used as a bridge there is normally no such communication with the devices, everything is forwarded to the DHCP server/Gateway. Only when you initiate some connection to the Openwrt it will show up in the arp table.

1 Like

Hi @trendy

Thanks for your description. It helps us a lot.
But Is any other way to fill the entry in arp table?

Thanks in advance.

Actually there is; with DHCP snooping. But I have no idea if it is implemented in Openwrt.

I'm not sure what this means. Do you have DHCP enabled on OpenWrt or not? Do you have DHCP anywhere on your LAN, or are all devices have static IPs?

Hi @trendy

Are you talking about multicast snooping?

Hello @sakshib39, I am talking about dhcp snooping.