Community discussions

MikroTik App
 
krazyboyjack
just joined
Topic Author
Posts: 5
Joined: Thu Sep 22, 2005 8:04 pm

Routing traffic through different interfaces

Sun Nov 13, 2005 3:33 pm

Hi, I upgraded from 2.8.17 to 2.9.4 and have been struggling to convert my old policy based routing to new format..

I Have ADSL connection and Wifi connection.

Routing
-------
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf
# DST-ADDRESS PREFSRC G GATEWAY DISTANCE INTERFACE Routing Mark
1 A S 0.0.0.0/0 196.28.86.65 r 196.28.86.10 1 WiFi Wifi
2 A S 0.0.0.0/0 192.168.10.1 r 192.168.10.200 1 ADSL


IP Firewall - Mangle
--------------------
6 ;;; Mark known local IP Destinations
chain=prerouting dst-address=196.0.0.0/8 connection-state=new
action=mark-packet new-packet-mark=Local Address

... cut ...

19 ;;; Mark Local Addresses as Wifi Flow
chain=prerouting packet-mark=Local Address action=mark-routing
new-routing-mark=Wifi


with this configuration, I can do traceroute and traffic flows as expected.. thru wifi for local traffic:
Tracing route to 196.xx.xx.xx over a maximum of 30 hops
1 <1 ms <1 ms <1 ms 192.168.2.1
2 <1 ms <1 ms <1 ms 192.168.1.1
3 <1 ms 1 ms <1 ms 196.28.86.10
...

and thru ADSL for internationl:
Tracing route to http://www.l.google.com [64.233.183.104]
over a maximum of 30 hops:
1 <1 ms <1 ms <1 ms 192.168.2.1
2 <1 ms <1 ms <1 ms 192.168.1.1
3 1 ms <1 ms <1 ms 192.168.10.200
...


But its only for initial traffic and no established traffic, if i request tcp connection like web to local address
traffic is requested over wifi but traffic flows via adsl.

I understand that the new connection traffic must come in on the interface that it was requested from.
but: if i mark local Address as new-connection-mark=wifi_connection, and then mark all packets with connection-mark=wifi_connection as packet-mark=wifi_flow and then mark all packets with packet-mark=wifi_flow as new-routing-mark: Wifi, i get destination unreachable when doing traceroute to local address.
If i don't mark the connection-state as 'New' i get destination unreachable. even if i have only the one mangle rule.

this is done in prerouting.

I applied the same logic i had in v2.8.17 (which worked) in v2.9.4 and it doesn't work.

If anyone can help me split traffic in local address range to go through my Wifi and all rest of traffic through
ADSL I would be greatfull beyond explination. I have read the manual through and followed their examples but it
just doesn't work. I also read forum examples and applied it exactly, but it doesn't work. is there also a how-to on new format of 2.9 vs. 2.8??

plz help.
 
User avatar
blue
Member Candidate
Member Candidate
Posts: 271
Joined: Sun Dec 12, 2004 1:48 pm
Location: Serbia

Sun Nov 13, 2005 3:43 pm

Have the similiar problem in 2.9.x. In 2.8.x it worked perfect with policy routing. I had 3 policy routing tables: main, wireless and adsl, and then in wireless and adsl i entered users IP address and it worked fine. Why that option had to disapear in 2.9.x???
 
krazyboyjack
just joined
Topic Author
Posts: 5
Joined: Thu Sep 22, 2005 8:04 pm

Sun Nov 13, 2005 3:54 pm

why is their no real format conversion, or some tool or even just a how to to properly explain how to do the same type of policy based routing in 2.9.x ... and support said only way is to redo all my rules.. this is really irritating since it feels as if the logic has changed completely and now just being left in the dark is forcing me to stick to an old system and deny me all the cool features of 2.9.. also its nice and convenient that i cannot downgrade back to old version, and i have to completely reinstall setup my addresses and then only load backup file. :cry: