Community discussions

MikroTik App
 
marinpareja
just joined
Topic Author
Posts: 21
Joined: Sat Aug 22, 2009 6:53 pm
Location: Sevilla, Spain

My first steps on Advanced Routing

Thu Aug 19, 2010 3:46 am

I try to improve my knowledge on Advanced routing with the next lab experience.
Diagram1.jpeg
Now I will do the next way (like PCC dual-system), I think that is NOT a good way because it would be hell for more than three nodes. I guess the best way is an advanced routing.

What would be the best way to do it? (Now I'm confused, do not know if BGP, OSPF ...) some tips to get started?

Thank you very much

This way I think that is not a good idea
Router Left
/ ip address 
add address=192.168.0.10/24 interface=eth1
add address=10.0.0.1/24 interface=wlan1 
add address=10.0.1.1/24 interface=wlan2
/ ip firewall mangle
add chain=input in-interface=eth1 action=mark-connection new-connection-mark="Internet1_conn"
add chain=input in-interface=wlan1 action=mark-connection new-connection-mark="Internet2_conn"
add chain=output connection-mark=Internet1_conn action=mark-routing new-routing-mark=to_Internet1     
add chain=output connection-mark=Internet2_conn action=mark-routing new-routing-mark=to_Internet2
add chain=prerouting dst-address-type=!10.0.1.0/24 in-interface=wlan2 per-connection-classifier=both-addresses:2/0 action=mark-connection new-connection-mark=Internet1_conn passthrough=yes
add chain=prerouting dst-address-type=!10.0.1.0/24 in-interface=wlan2 per-connection-classifier=both-addresses:2/1 action=mark-connection new-connection-mark=Internet2_conn passthrough=yes
add chain=prerouting connection-mark=Internet1_conn in-interface=wlan2 action=mark-routing new-routing-mark=to_Internet1
add chain=prerouting connection-mark=Internet2_conn in-interface=wlan2 action=mark-routing new-routing-mark=to_Internet2
/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.0.1 distance=1 routing-mark=to_Internet1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=10.0.0.2 distance=2 routing-mark=to_Internet2 check-gateway=ping
/ ip firewall nat 
add chain=srcnat out-interface=wlan1 action=masquerade
add chain=srcnat out-interface=eth1 action=masquerade
Router Right
/ ip address 
add address=192.168.0.10/24 interface=eth1
add address=10.0.0.2/24 interface=wlan1 
add address=10.0.2.1/24 interface=wlan2
/ ip firewall mangle
add chain=input in-interface=eth1 action=mark-connection new-connection-mark="Internet1_conn"
add chain=input in-interface=wlan1 action=mark-connection new-connection-mark="Internet2_conn"
add chain=output connection-mark=Internet1_conn action=mark-routing new-routing-mark=to_Internet1     
add chain=output connection-mark=Internet2_conn action=mark-routing new-routing-mark=to_Internet2
add chain=prerouting dst-address-type=!10.0.2.0/24 in-interface=wlan2 per-connection-classifier=both-addresses:2/0 action=mark-connection new-connection-mark=Internet1_conn passthrough=yes
add chain=prerouting dst-address-type=!10.0.2.0/24 in-interface=wlan2 per-connection-classifier=both-addresses:2/1 action=mark-connection new-connection-mark=Internet2_conn passthrough=yes
add chain=prerouting connection-mark=Internet1_conn in-interface=wlan2 action=mark-routing new-routing-mark=to_Internet1
add chain=prerouting connection-mark=Internet2_conn in-interface=wlan2 action=mark-routing new-routing-mark=to_Internet2
/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.0.1 distance=1 routing-mark=to_Internet1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=10.0.0.1 distance=2 routing-mark=to_Internet2 check-gateway=ping
/ ip firewall nat 
add chain=srcnat out-interface=wlan1 action=masquerade
add chain=srcnat out-interface=eth1 action=masquerade
You do not have the required permissions to view the files attached to this post.
Last edited by marinpareja on Thu Aug 19, 2010 7:58 pm, edited 1 time in total.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: My first steps on Advanced Routing

Thu Aug 19, 2010 4:25 pm

seems good =) just add default routes to the main routing table also

and you don't have 'Local' interface, that is mentioned in your config =)
 
marinpareja
just joined
Topic Author
Posts: 21
Joined: Sat Aug 22, 2009 6:53 pm
Location: Sevilla, Spain

Re: My first steps on Advanced Routing

Thu Aug 19, 2010 8:00 pm

I'm sorry, i little mistake, local was wlan2. now is good. I haven't done the test, this is only one theory.
I would like know if there is one way to do with BGP or OSPF. Is it possible??

Thanks
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: My first steps on Advanced Routing

Thu Aug 19, 2010 11:04 pm

well, you masquerade all traffic, so both routers even don't need to know about another subnets. you may want to setup OSPF/BGP if you will need to enable communication between your customers on different APs, but they are will just redistribute all routes across the network, and you will still need the setup you posted above
 
marinpareja
just joined
Topic Author
Posts: 21
Joined: Sat Aug 22, 2009 6:53 pm
Location: Sevilla, Spain

Re: My first steps on Advanced Routing

Fri Aug 20, 2010 3:02 am

Thanks you very much, you are been very fast to answer

Who is online

Users browsing this forum: No registered users and 7 guests