Ditonet, thank you for your answer.
I already read that, and this don’t work for me, becouse that is PCC (Per Conection Classifier), that means that you are going to mark a conection, not a packet.
I need to mark all the packets that belongs to a conection. And deliver those packets to differents gateways.
I do something that I still testing. This is my configuration:
/ip address
add address=192.168.1.1/24 disabled=no interface=ether5 network=192.168.1.0
# NAME TYPE MTU L2MTU
0 R ether1 ether 1500
1 R ether2 ether 1500 1600
2 R ether3 ether 1500 1600
3 R ether4 ether 1500 1600
4 R ether5 ether 1500 1600
5 R ppp-out1 ppp-out 1500
6 R ppp-out4 ppp-out 1500
(both PPP are the USB 3G Modem)
/ip route
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
ppp-out1 routing-mark=Mitad1 scope=30 target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
ppp-out4 routing-mark=Mitad2 scope=30 target-scope=10
/ip firewall nat
add action=masquerade chain=srcnat disabled=no out-interface=ppp-out1
add action=masquerade chain=srcnat disabled=no out-interface=ppp-out4
/ip firewall mangle
add action=mark-connection chain=prerouting disabled=no in-interface=ether5 \
new-connection-mark=marca passthrough=yes
add action=mark-packet chain=prerouting disabled=no in-interface=ether5 \
new-packet-mark=AAA nth=2,1 passthrough=yes
add action=mark-routing chain=prerouting disabled=no in-interface=ether5 \
new-routing-mark=Mitad1 packet-mark=AAA passthrough=no
add action=mark-packet chain=prerouting disabled=no in-interface=ether5 \
new-packet-mark=BBB passthrough=yes
add action=mark-routing chain=prerouting disabled=no in-interface=ether5 \
new-routing-mark=Mitad2 packet-mark=BBB passthrough=no
When I try to ping http://www.google.com, One packet has response and the next doesn´t has.
I set the first rule to count all packets, and the other 4 rules are dividing the traffic and adding route marks.
When the counters begin to count, I can see that all the traffic is divided by two. So the rules are working.
Then I sent traffic through both 3G modem, and I can see in the interface list, how the traffic is divided.
Now my problem is that I’m behind a router and I think that his firewall is dropping the received packets. That is what I try to fix today, and see if the packets are arriving correctly.
Any way, the ping thing that I mentioned, is strange, I need to study more.
If someone has any Idea, will be welcome
Would be great if the mirkotik people can post his opinions.
Thank you.