Community discussions

MikroTik App
 
farazhamzaa
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 74
Joined: Sun Apr 01, 2012 9:31 am

Kindly Guide me

Sun Nov 01, 2015 8:29 pm

I want to Attach two differnt lines of DSL and want to take output from one Line

for eg. on Port one i attach with my laptop and port 3 attach with DSL 1(192.168.1.1) and port 4 Attached with DSL 2(172.16.16.1)

if i use 192.168.1.7 LAN ip on my laptop then trafic will comes from DSL 1
and if
i use 172.16.16.7 LAN ip on my laptop then trafic will comes from DSL 2

how can i do that?
Untitled.png
You do not have the required permissions to view the files attached to this post.
 
User avatar
Caci99
Forum Guru
Forum Guru
Posts: 1076
Joined: Wed Feb 21, 2007 2:26 pm
Location: Tirane
Contact:

Re: Kindly Guide me

Wed Nov 04, 2015 11:14 am

With policy routing. Mark packets in mangle:
/ip firewall mangle
add chain=prerouting in-interface=LAN src-address=192.168.1.0/24 action=mark-connection new-connection-mark=network1
add chain=prerouting in-interface=LAN src-address=172.16.16.0/24 action=mark-connection new-connection-mark=network2
add chain=prerouting in-interface=LAN connection-mark=network1 action=mark-routing new-routing-mark=network1 passthrough=no
add chain=prerouting in-interface=LAN connection-mark=network2 action=mark-routing new-routing-mark=network2 passthrough=no
Once packet are marked, use them into routing table:
/ip route
add dst-address=0.0.0.0/0 gateway=dsl1 routing-mark=network1
add dst-address=0.0.0.0/0 gateway=dsl2 routing-mark=network2
add dst-address=0.0.0.0/0 gateway=dsl1