How about specify out-interface for default gateway (The default gateway is not on the same network segment)

I got 2 network segment from ISP.
such as A.A.A.4/30 for interface(A.A.A.5 is gateway), B.B.B.128/28 for public ip.
Now I use B.B.B.128/28 at my wan
and specified gateway at A.A.A.5/30
and avoid using A.A.A.6/30 on my wan interface.

the nat and other configuration seems OK.

Firstable I add route as blow
/ip route
add distance=1 dst-address=0.0.0.0/0 gateway=A.A.A.5 <—but this is unreachable.
add distance=1 dst-address=A.A.A.5 gateway=wan4 <— this is reachable.

Then I use one route:
/ip route
add distance=1 dst-address=0.0.0.0/0 gateway=wan4 <—but this is reachable.

I have seen the packet log at ROS output-interface=wan4
but see nothing at switch which monitor the ROS wan4

Is there anything wrong about my route? Thanks in advance.

Routing needs proper routes on both parties to be able to communicate (or proper routing at one end and NAT at the other).

If your ISP gave you a /30, their routing table will have A.A.A.6 (or A.A.A.5 as it’s a PTP) as the gateway to reach your IP block, B.B.B.128/28

You will have to set A.A.A.6/30 in your wan interface, and set A.A.A.5 as the default gateway.

Then you can assign B.B.B.128/28 addresses where you see fit.

Thanks At First.
as far as I know, that routes on both parties don’t need to use inteface network segment.
If They specify route with out-interface, They use ARP to get layer2 encapsulation when they begin to communicate.
like this:
ISP Router — Client Device (ROS or Linux or Other Router)
----> who is B.B.B.133
<---- B.B.B.133 is MAC AB-AB-AB-AB-AB
----> IP packet
----> IP packet
then ISP Router got MAC address of B.B.B.133, the IP packets are able to be sent to Client.


I have tested successfully at LINUX using static-routes file blow
any host A.A.A.5/32 eth0
any net default gw A.A.A.5

but I don’t know how to configure at ROS?