I have two subnets in one LAN and I need to route some traffic from mikrotik via nexthop in other subnet, see attached drawing. In linux is solution quite simple:
ifconfig eth0 xx.yy.252.196/29 //ip addres from 1st subnet
ip route add xx.yy.247.168/29 via dev eth0 //route to directly connected subnet
ip route add 10.71.0.0/16 via xx.yy.247.171 //route via gw from other directly connected subnet
So in mikrotik I have this related configuration:
Code: Select all
/ip address print detail
4 D address=xx.yy.252.196/29 network=xx.yy.252.192 interface=eth1-vl882
actual-interface=eth1-vl882
/ip route print detail
1 A S dst-address=0.0.0.0/0 pref-src=xx.yy.252.196 gateway=xx.yy.252.193
gateway-status=xx.yy.252.193 reachable via eth1-vl882
check-gateway=ping distance=2 scope=30 target-scope=10
6 S dst-address=10.71.0.0/16 pref-src=xx.yy.252.196 gateway=xx.yy.247.171
gateway-status=xx.yy.247.171 unreachable distance=10 scope=30
target-scope=10
15 A S dst-address=xx.yy.247.168/29 gateway=eth1-vl882
gateway-status=eth1-vl882 reachable distance=1 scope=10 target-scope=10
17 ADC dst-address=xx.yy.252.192/29 pref-src=xx.yy.252.196 gateway=eth1-vl882
gateway-status=eth1-vl882 reachable distance=0 scope=10
/ping xx.yy.247.171
SEQ HOST SIZE TTL TIME STATUS
0 xx.yy.247.171 56 64 0ms
1 xx.yy.247.171 56 64 0ms
2 xx.yy.247.171 56 64 0ms
/tool traceroute xx.yy.247.171
# ADDRESS LOSS SENT LAST AVG BEST WORST
1 xx.yy.247.171 0% 9 0.3ms 0.5 0.3 2.4
when I change target-scope:
Code: Select all
5 A S dst-address=10.71.0.0/16 pref-src=xx.yy.252.196 gateway=xx.yy.247.171
gateway-status=xx.yy.247.171 recursive via xx.yy.252.193 eth1-vl882
distance=10 scope=30 target-scope=30
Any suggestions?
Thx