cbera
December 16, 2016, 4:19pm
1
Hi, i have this situation:
Port 1 - working ppoe-out1 connection (wan1)
Port 2 - working ppoe-out2 connection (wan2)
Port 5 - LAN
I have 192.168.1.0/24 and 192.168.2.0/24 ip on port5 LAN. I want set gateway of 192.168.1.0/24 to ppoe-out1 and gateway of 192.168.2.0/24 to ppoe-out2.
I tried this
/ip firewall mangle add chain=prerouting src-address=192.168.1.0/24 action=mark-routing new-routing-mark=isp1
/ip firewall mangle add chain=prerouting src-address=192.168.1.0/24 action=mark-routing new-routing-mark=isp2
/ip route add gateway=pppoe-out1 routing-mark=isp1
/ip route add gateway=pppoe-out2 routing-mark=isp2
but not working. Did I do something wrong?
cbera:
Hi, i have this situation:
Port 1 - working ppoe-out1 connection (wan1)
Port 2 - working ppoe-out2 connection (wan2)
Port 5 - LAN
I have 192.168.1.0/24 and 192.168.2.0/24 ip on port5 LAN. I want set gateway of 192.168.1.0/24 to ppoe-out1 and gateway of 192.168.2.0/24 to ppoe-out2.
I tried this
/ip firewall mangle add chain=prerouting src-address=192.168.1.0/24 action=mark-routing new-routing-mark=isp1
/ip firewall mangle add chain=prerouting src-address=192.168.1.0/24 action=mark-routing new-routing-mark=isp2
/ip route add gateway=pppoe-out1 routing-mark=isp1
/ip route add gateway=pppoe-out2 routing-mark=isp2
but not working. Did I do something wrong?
First you have two same mangle rules src-address=192.168.1.0/24
You should create two NAT rules
/ip firewall nat add src-address=192.168.1.0/24 out-interface=pppoe-out1 action=masquerade
/ip firewall nat add src-address=192.168.2.0/24 out-interface=pppoe-out2 action=masquerade
IP ROUTE should look something like this:
/ip route add dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=isp1
/ip route add dst-address=0.0.0.0/0 gateway=pppoe-out2 routing-mark=isp2
Be sure to disable fastpath.
This are just quick tips, if you still cant get it to work, post your whole config, so we can help.
cbera
December 19, 2016, 10:54am
3
Ok, now working with your help. Thanks you!
Only one question. Why its necessary disable fastpath?