I have a Flint 2 (GL-MT6000) running firmware 4.9.1:
/etc/glversion: 4.9.1
OpenWrt 21.02-SNAPSHOT r15812+1092-46b6ee7ffc
Kernel 5.4.238
I am using the router directly on a Sky UK FTTP connection which is provisioned using MAP-T. MAP-T itself is working correctly using OpenWrt's map/nat46 support.
The problem is that GL.iNet's kmwan subsystem reports the Ethernet WAN as offline even though both IPv4 and IPv6 Internet connectivity are working. This also causes the front LED to continuously flash blue rather than show the normal steady white online indication.
With MAP-T established, the relevant interfaces/routes look like:
wan:
DHCPv4 address: 100.124.1.238/18
gateway: 100.124.0.1
wan6:
DHCPv6-PD: working
MAP-T parameters supplied by DHCPv6
wan6_4:
dynamic OpenWrt MAP interface
map-wan6_4:
MAP-T L3 device
IPv4 routing:
default dev map-wan6_4 proto static scope link
default via 100.124.0.1 dev eth1 proto static src 100.124.1.238 metric 10
IPv4 through MAP-T works correctly. For example, the router and downstream clients have normal IPv4 Internet connectivity, and the externally visible MAP-T IPv4 address is 2.121.132.16. Native IPv6 also works correctly.
However:
# cat /proc/gl-kmwan/config
wan:offline
The current kmwan configuration includes:
kmwan.wan.interface='wan'
kmwan.wan.track_mode='force'
kmwan.wan.addr_type='4'
kmwan.wan.check='1'
kmwan.wan.tracks='ping,1.1.1.1' 'ping,8.8.8.8' ...
This appears to be because kmwan monitors the logical wan interface/device, whereas with MAP-T the usable IPv4 Internet path is the dynamically created wan6_4 / map-wan6_4 path. The IPv4 address on wan is only the 100.64.0.0/10 MAP-T/bootstrap address.
This also explains the LED behaviour. /usr/bin/gl_led checks /proc/gl-kmwan/config for an online entry. Because it sees only wan:offline, it calls offline_led_display().
For the MT6000, offline_led_display() does:
echo 0 > /sys/class/leds/white:system/brightness
echo timer > /sys/class/leds/blue:run/trigger
whereas online_led_display() disables the blue LED and enables the white LED.
The observed LED state consequently is:
blue:run trigger = timer
white:system off
So the LED behaviour appears to be a consequence of kmwan not recognising the dynamic MAP-T IPv4 path rather than an actual loss of Internet connectivity.
The MAP-T configuration has also been tested across a complete Flint 2 reboot. The DHCPv4 bootstrap, DHCPv6-PD, dynamic wan6_4 interface and map-wan6_4 device are recreated automatically, and both IPv4 and IPv6 connectivity work afterwards, while kmwan continues to report wan:offline.
Is there a supported way in firmware 4.9.1 to make kmwan recognise a MAP-T IPv4 path such as wan6_4/map-wan6_4 as the effective IPv4 WAN?
I don't want simply to change kmwan.wan.interface to wan6_4, because kmwan also participates in route metrics/failover and wan6_4 is a dynamically generated interface. Likewise, I'd prefer not to patch /usr/bin/gl_led merely to hide the symptom.
If MAP-T isn't currently accounted for by kmwan, could support for a dynamic MAP-T IPv4 interface be added so that WAN health status, Multi-WAN and the front LED reflect the actual Internet state?
I can provide the MAP rule, ifstatus output, kmwan configuration and additional diagnostics if useful.