"Upstream" Wireguard networks in LuCI?

How does LuCI determine what to list as an "upstream" network in the Overview page?

I have three OpenWrt routers with varying combinations of WAN and Wireguard interfaces through which the internet can be reached. The problem is, it seems to be very arbitrary which interfaces are shown for each router in the "Network -> Upstream" area of the LuCI Overview page. One shows all of them, one shows all of the IPv4 but no IPv6, and one only shows 2 of 3 IPv4 and no IPv6 (despite all of those functioning as expected on all three devices). This isn't the end of the world, because I can get the same information on the Interfaces page, but it's a little weird and unintuitive to me, and it seems to defeat the purpose of a useful "overview".

While I'm on that subject, I suppose I could also mention that static DHCP leases don't show up in the "Active Leases" area, which is strange as well.

It's the output from ubus call network.interface dump, which is the current state derived from various DHCP and Neighbor Discovery chatter between the router and the upstream device.

By "static" do you mean real static assignments on the client device in question, or lease reservations on the router? The former doesn't participate in address assignment via DHCP so there's no "lease" to display; the latter should show up because it's just another lease for which you've explicitly defined the IP rather than letting the router make one up.

How is it decided what is an "upstream" interface from that list (which appears to show all interfaces)? That's the part that doesn't seem to be reliable/complete.

Ah, OK. I just realized that while I had set static leases in OpenWrt for a couple of PCs, they were also set as static within the PC settings as well, so the static leases were redundant and being ignored as you say.

That's defined in your /etc/config/network in the config interface sections where the interface is associated to a device.

config interface 'wan'
        option device 'eth0'
        option proto 'dhcp'

config interface 'wan6'
        option device 'eth0'
        option proto 'dhcpv6'
        option reqaddress 'try'
        option reqprefix '56'

Sorry, I still seem to be missing some aspect of this...

I have Wireguard interfaces that show up in the Upstream area on some of my devices but not on others, despite the tunnel being up and usable in each case, and internet access available through them (based on routing policies, i.e. privacy VPN for most traffic, WAN bypass for some, VPS tunnel for some other).

Sounds like a wireguard config issue, which I'll have to defer to those who know how wireguard works...

Thanks. I edited the topic title to clarify and hopefully draw some more Wireguard-specific attention.

Only when the WireGuard interface is default routing via the WAN it will show as an upstream interface, I think

You mean it must carry a default route (0.0.0.0/0 or ::/0) in the main routing table?

That's frustrating... I wonder if there would be any developer interest in tweaking that behavior to either include interfaces with default routes in other tables, or to add the ability to manually define which interfaces that appear in that section.

Yes

Why, what problem are you facing, I must admit until now I have never looked at that page

One of my Wireguard tunnels connects to a VPS that gives me a stable public IPv4 address and full IPv6 (leased prefix). It's never used as the primary default route on my routers, but typically for a single VLAN and also site-to-site connectivity, so I use a secondary routing table to manage that.

It's annoying when it doesn't show up in that Upstream section because that's the quickest, most concise summary of what's going on with my WAN and my tunnels all in one glance.

I normally use the command line to see what is going one e.g.:

ip ro    # short for ip route show

Tells me if the interfaces are up, easier from my phone too, but I get what you mean.

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.
Thanks! :slight_smile: