Asking for feedback: [PATCH] fw4: add masquerade-prefix snat type

Jonas Lochmann openwrt at jonaslochmann.de
Fri Feb 28 01:09:46 PST 2025


On Fri, Feb 28, 2025 at 08:44:28AM +0100, Goetz Goerisch wrote:
> For Multi-Homing and Load-balacing scenarios I was always looking into
> RFC8678 [1] or RFC8475 [2].
> But as you mentioned there is no support in OpenWrt or mwan3 as of today.

RFC8475 is actually more or less supported in native OpenWrt. The
possible scenario is "3.2.3.  Single Router, Load-Balancing between
Uplinks". OpenWrt can report multiple uplinks to clients and it supports
source address based routing. The issue is the address selection by the
clients. Using a proxy server running at the clients, I could add load
balancing to existing applications [1]. This implementation implements
round robin without any weights and I don't know if it still compiles.

RFC 8678 talks about other methods to solve this issue: A DHCP option or
ICMP messages to tell the client to use another source address. Both do
not clearly state that it can be used for load balancing instead of
predefined rules that assign target addresses to source addresses.

The DHCP option could provide parameters according to RFC 6724 but the
address selection algorithm in it does not permit nondeterminism/
randomness. For the ICMP method, RFC 8678 says "When H31 receives this
packet, it would then be expected to try another source address to reach
the destination.". I don't know if this is expected or actually part of
any standard and implemented in most systems.

For mwan3, an interface for the RA/DHCP daemon is needed using that mwan3
can adjust the reported prefixes. Then there is the concept question what
happens if multiple services want to use this prefix adjustment API. If
multiwan would be a core feature of the network managment stack of
OpenWrt, then this would be easier. But I do not consider it worth it as
long as load balancing at the client is not possible with it.

> Therefore I would be interested in a solution, nevertheless I have no
> deployment and test possibilities at the moment.
> 
> Did you discuss the deployment scenario elsewhere, e.g. Ripe IPv6 WG?

Not yet, but this is a good idea.

[1] https://codeberg.org/jonas-l/socksbalance



More information about the openwrt-devel mailing list