Community discussions

MikroTik App
 
iScape
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 84
Joined: Sun Dec 23, 2012 1:23 am

Any way to notify WiFi/Eth clients (Android, Windows) that uplink is a metered connection?

Sun Nov 28, 2021 1:23 am

How can I configure my Mikrotik (hex, wap ac, map lite, audience lte6) to notify their wireless/wired clients (Windows, Android) that the uplink is a metered connection?

I've found that for Android, this may be done via DHCP options. Though I haven't yet managed to get it working.
It is enough to add respective option ("add code=43 name=ANDROID_METERED value="s'ANDROID_METERED'"") and then add it via option set to respective DHCP server?

As of Windows, it's supposed to be done via "Vendor-Specific Information Element" called "Network Cost Information" (should be set to Fixed). I've found a guide for OpenWRT, but I couldn't "convert" it to Mikrotik (I'm interested if it can be done for configuration with and without CAPsMAN as I know CAPsMAN reduces flexibility for some options)
# For radio0 interface
  # Print current value if it exists.
  uci show     wireless.radio0.hostapd_options
  # Delete current value if it exists.
  uci delete   wireless.radio0.hostapd_options
  # Write new value.
  uci add_list wireless.radio0.hostapd_options='vendor_elements=DD080050F21102000200'
I do have a workaround to manually mark respective connections on clients, but I prefer "proper" flexible solution.

So, can you pls advise how can I configure my Mikrotik to notify their wireless/wired clients (Windows, Android) that the uplink is a metered connection?
 
iScape
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 84
Joined: Sun Dec 23, 2012 1:23 am

Re: Any way to notify WiFi/Eth clients (Android, Windows) that uplink is a metered connection?

Sun Nov 28, 2021 7:41 pm

One thing to note speaking of Android devices. Typically, metered connection is reflected via special wifi connectivity icon in Android's status bar. So, what I've noticed, is that Huawei (Android 9) shows that special icon, so it looks like it detects DHCP's option. Samsung (Android 11), on the other side, doesn't show that icon, so I guess DHCP option (in a form from original post) is not enough to trigger that detection.
So I'll appreciate any suggestion what's Samsung's or Android 11's "way" to detect metered (or mobile hotspot) connection.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11439
Joined: Thu Mar 03, 2016 10:23 pm

Re: Any way to notify WiFi/Eth clients (Android, Windows) that uplink is a metered connection?

Mon Nov 29, 2021 10:00 pm

Mikrotik's DHCP server doesn't push DHCP options to clients, they are only included in DHCP responses if client asks for them. Some DHCP servers do push DHCP options even if not asked though. So it could as well be that Android 9 asks for that particular DHCP option while Android 11 doesn't. In which case there's nothing to be done in ROS unfortunately.

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 61 guests