Ap getting station ip addr

Using our hilink board, when station (client) is bridge and ap is router and halow connected, the ap shows the station’s ip addr in the routing web page. That’s perfect as it gets the halow mac addr from the station’s br-ahwlan i/f and its inet addr as I see br running ifconfig on the station. However, there’s a silex board that’s an ap and it’s for some reason using the wlan0 i/f mac addr, instead, so it doesn’t know the halow ip addr. You need that ip addr to get to the station web page. But, if you add the “option macaddr” line as below in /etc/config/wireless, the silex board will show that mac addr and the inet addr in the br-ahwlan i/f. That’s just the way they do it, for some reason.

config wifi-iface 'default_radio1’
option macaddr ‘put halow mac addr here’

A band-aid was suggested to add that line at some time during boot to that section in that file for the station. Have you ever heard of having to do that? That’s saying the wifi i/f (i.e. wlan0) is the halow mac addr in that assignment. I’m not sure that’s a good idea. What problems could there be if you assign the halow mac addr to the wifi i/f as above?

I’m not sure I entirely follow the scenario here, but I think it’s related to the issue that if you have a bridged STA on Linux it’ll probably end up with the ethernet mac address, whereas the wifi frames will be using the MAC address on the wifi-iface.

You can hackily solve this by forcing either the bridge to the halow mac address or the wifi-iface to the bridge mac address.

Currently, we solve this in Morse OpenWrt in two ways:

Hope that helps.

Thanks, James, that was a good help with the links you provided. I found it was easy to determine the halow mac addr using the /sys/class/net directories based on using 1 of the 2 interfaces, either br-lan or br-ahwlan. At first I was thinking it was some system parameter I didn’t know about that I could just reference but this method above was easy to deal with. This helps solve the reason I initiated the original question.

But as a follow-up, maybe you can help me understand this? I know this is a silex thing, but please bear with me, I’d appreciate if you can help me understand something here. While using the morse sdk (2.6.6, am in process of migrating to 2.9.3) with our hilink boards, it doesn’t matter how the station is configured (none/bridge/extender) when the ap is in ethernet/router mode, you can see the station ip addr and connection info with no problem on the ap’s web page status. When station is bridge, the ap sends it the ip address the ap has assigned it. There’s one scenario we have the silex board as an ap with the hilink station. Silex has a 4-address mode parameter that can be on or off. When 4-address mode is off and station is none or extender, its connection status web page will show the connected station info and ip addr. However, when station is bridge, the ap will not send the station the ip address it’s assigning the station. Thus, the station can’t launch socat b/c it doesn’t know its ip addr to figure out the ap ip address and, thus, the ap doesn’t show in its connection status web page what the station ip addr is. But when I set 4-address mode ON, the station then gets its ip address from the ap and the ap connection web page will show the station and its ip address. That sounds great, right? But, then while leaving 4-address mode ON if I set the station to none or extender, while halow connects and things operationally appear just fine (halow connected, the led is blue accordingly and socat is running), the silex web page doesn’t show any stations connected. I know the actual issue I’m dealing with is a silex thing, but I was hoping maybe you could help me understand some things:

  1. how this 4-address thing works
  2. is it related to anything in the openwrt morse sdk
  3. how it works for the morse sdk
  4. why the morse sdk works for all that without doing anything regardless how the station is configured … morse sdk image doesn’t require that band-aid for writing the mac addr to the /etc/config/wireless file in the default_radio1 definition?

Doing that band-aid doesn’t seem to affect the hilink ap at all, the ap still shows all the proper connected status info as if that wasn’t in that file, so that’s superflous. The morse sdk is so much easier to deal with, you have to agree it could lead to issues if you have to remember to set the silex ap to 4-address mode on when it’s connected to a station bridge and turn it off when station is none or extender. But, I would really like to understand how this all works, if you could be so helpful?

4 address mode (AKA WDS) is required if you have a bridged station connected, as there are four mac addresses involved (source mac address, wifi station mac address, wifi ap mac address, target mac address). In ‘normal’ WiFi mode, only three addresses are required, because the wifi station mac address is the same as the source or target (depending on whether transmitting or receiving).

It’s related to WiFi generally.

By setting 4addr on with the sta iface via iw and passing the appropriate arguments to hostapd/wpa_supplicant.

We use the standard OpenWrt commands for this: iwinfo.assoclist and luci.getHostHints (for the IP addresses).

It is normal that if you have WDS/4addr on the station and no WDS/4addr on the AP nothing will work. The only thing that surprised me about what you’ve described is that Silex’s web page isn’t showing the connected stations when WDS is on the AP and not on the stations, which should be fine. I would recommend checking the iwinfo assoclist to confirm that they ‘should’ be there, and then you’d have to look at what that web page is doing (or talk to Silex about this issue).

1 Like