Just got a hap ax3 and I am trying something similar but I have different networks and not VLANs at the moment. What worked for me is the same as your config except that I have no routing rules. Try to delete the routing rule and add something like this to your firewall mangle rules:
I think for this to work, you need to keep the distance=1
I have a working setup by using explicit scope and same distance as the default route in the main table (i.e. just changing the routing table) and leaving the dst-address in the routing rule blank. This would translate to your config as:
Note that, AFAIK, the pref-src doesn’t affect forwarded traffic but only traffic on connected interfaces. As I’m using it on p2p links, I have omitted it.
Yeah - I think you are missing something, either that or I am misunderstanding your setup.
Everything is going out the one connection, to the one gateway, so it is not a routing decision it is a NAT rule you need.
Presumably you are NATting on this router (can’t be 100% sure as you have not posted a full config which means assumptions have to be made)
I was just writing an afterthought on this. Checking the wiki confirmed behaviour in my note, so given that the gateway is the same for main table as for the HP.10 table, there is indeed nothing to base the routing decision on.
NAT above by Andy should work.
For a pure routing based option, I think you need an intermediate (recursive) routing hop that is just connected to the .10. Perhaps the local-address option can do something but I can’t find it quickly in the documentation.
There is only one route, but multiple IPs. All IPs use the same route.
You must have a next-hop/gateway set otherwise traffic can’t leave the router. It doesn’t matter what the distance is. 1, 10, 100, all the same when it is the only one.
The source address you noted has no bearing on routing, it has bearing for what is sourcenatted out that WAN, it does not move traffic
Let me rephrase… based on OPs comments: (Goal is to have all external-bound traffic from vlan23 (10.10.23.0/24) to be sourced with public IP 76.xxx.xxx.10 (default route uses 76.xxx.xxx.9)
How do you ensure that the right wanip is used by the subnet… sourcenat address doesnt do it.
your route doesnt do it, unless its lower distance than the default route, in which case all traffic will go out NOT the default route.
Perhaps its something I dont understand about multiple WANIPs via the same gateway, or perhaps the OP really means a netmap is needed from the IP to the subnet… in any case,
source nat does not grab or do anything in terms of routing.
It states, when the traffic is routed ( by some other function aka routing) through this interface it will be given a source address of this interface.