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
Code: Select all
/ 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
Code: Select all
/ 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
Code: Select all
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
Code: Select all
/ 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
Code: Select all
/ ip firewall nat
add chain=srcnat out-interface=wlan1 action=masquerade
add chain=srcnat out-interface=eth1 action=masquerade
Code: Select all
/ 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
Code: Select all
/ 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
Code: Select all
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
Code: Select all
/ 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
Code: Select all
/ ip firewall nat
add chain=srcnat out-interface=wlan1 action=masquerade
add chain=srcnat out-interface=eth1 action=masquerade