My first steps on Advanced Routing

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

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 =)

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

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

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