IP роутера: 192.168.88.1
интернет через LTE (внешний серый IP: 10.106.22.22)
Во внутренней сети находиться еще один роутер (с выходом в инет) IP: 192.168.88.3
Решил завернуть только пинги на адрес 140.238.33.33 через второй роутер
Таблица маршрутизации (добавил туда 0.0.0.0.0 через 192.168.88.3 с роутинг маркой wAP) :
Код: Выделить всё
[admin@iPhone] > /ip route print detail
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static,
r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit
0 A S dst-address=0.0.0.0/0 gateway=192.168.88.3 gateway-status=192.168.88.3 reachable via ether1 distance=5 scope=30 target-scope=10
routing-mark=wAP
1 ADS dst-address=0.0.0.0/0 gateway=lte1 gateway-status=lte1 reachable distance=1 scope=30 target-scope=10
2 ADC dst-address=10.106.22.22/32 pref-src=10.106.22.22 gateway=lte1 gateway-status=lte1 reachable distance=0 scope=10
3 ADC dst-address=192.168.88.0/24 pref-src=192.168.88.1 gateway=ether1 gateway-status=ether1 reachable distance=0 scope=10
Код: Выделить всё
[admin@iPhone] > /ip firewall mangle export
/ip firewall mangle
add action=mark-connection chain=output connection-mark=no-mark disabled=yes dst-address=140.238.33.33 new-connection-mark=Mark_1 \
passthrough=yes protocol=icmp
add action=mark-routing chain=output connection-mark=Mark_1 disabled=yes new-routing-mark=wAP passthrough=yes
Код: Выделить всё
[admin@iPhone] > ping 140.238.33.33
SEQ HOST SIZE TTL TIME STATUS
0 140.238.33.33 timeout
1 140.238.33.33 timeout
sent=2 received=0 packet-loss=100%
Код: Выделить всё
output: in:(unknown 0) out:lte1, proto ICMP (type 8, code 0), 10.106.22.22->140.238.33.33, len 56
postrouting: in:(unknown 0) out:ether1, proto ICMP (type 8, code 0), 10.106.22.22->140.238.33.33, len 56
10.106.22.22, а должен-же быть 192.168.88.1
Пробую пингануть, напрямую указав какой таблицей пользоваться - Все ок
Код: Выделить всё
[admin@iPhone] > ping 140.238.33.33 routing-table=wAP
SEQ HOST SIZE TTL TIME STATUS
0 140.238.33.33 56 50 79ms
1 140.238.33.33 56 50 75ms
sent=2 received=2 packet-loss=0% min-rtt=75ms avg-rtt=77ms max-rtt=79ms
Код: Выделить всё
output: in:(unknown 0) out:ether1, proto ICMP (type 8, code 0), 192.168.88.1->140.238.33.33, len 56
postrouting: in:(unknown 0) out:ether1, proto ICMP (type 8, code 0), 192.168.88.1->140.238.33.33, len 56
Изыскания - если в NAT добавить:
Код: Выделить всё
[admin@iPhone] > /ip firewall nat export
/ip firewall nat
add action=src-nat chain=srcnat connection-mark=Mark_1 out-interface=ether1 to-addresses=192.168.88.1
Код: Выделить всё
[admin@iPhone] > ping 140.238.84.163
SEQ HOST SIZE TTL TIME STATUS
0 140.238.84.163 56 50 74ms
1 140.238.84.163 56 50 67ms
sent=2 received=2 packet-loss=0% min-rtt=67ms avg-rtt=70ms max-rtt=74ms
Код: Выделить всё
output: in:(unknown 0) out:lte1, proto ICMP (type 8, code 0), 10.106.22.22->140.238.33.33, NAT (10.106.22.22->192.168.88.1)->140.238.33.33, len 56
postrouting: in:(unknown 0) out:ether1, proto ICMP (type 8, code 0), 10.106.22.22->140.238.33.33, NAT (10.106.22.22->192.168.88.1)->140.238.33.33, len 56