I'm trying to setup an rb1000 with routeros 3.28.
I've 2 isp connections, A and B, and the router is not natted (it has the public ip's assigned)
At first stage of configuration, I'm trying to make the router connect to other public sites (ping, or ssh),
and make them go through A or B. Just to make sure that ipsec and dnat services will go through the isp from which they came.
Assuming @ipA, @ipB, @gwA and @gwB be the public ip's and the gateways respectively:
Routes and rules are:
Code: Select all
/ip route
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
@gwA,@gwB scope=30 target-scope=10
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
@gwA pref-src=@ipA routing-mark=adsl1 scope=30 \
target-scope=10
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
@gwB pref-src=@ipB routing-mark=adsl2 scope=30 \
target-scope=10
/ip route rule
add action=lookup comment="" disabled=yes src-address=@ipA/32 \
table=adsl1
add action=lookup comment="" disabled=yes src-address=@ipB/32 table=\
adsl2
And there are no rules in mangle, nat or filter.
Well, I think I don't understand how the router works, when it decides from where to send packets.
example1: ping http://www.google.com
packets go either isp A or B.
example2: ping http://www.google.com src-address=@ipA
packets go either isp A or B
example2: ping http://www.google.com src-address=@ipB
packets go either isp A or B
I thought route rules are applied in routing decision, so it should send the packets with correct source ip.
which would be the correct configuration?