Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

/ip firewall mangle

add chain=prerouting in-interface=ether1 connection-state=new new-connection-


mark=ether1_conn action=mark-connection passthrough=yes
add chain=prerouting in-interface=ether2 connection-state=new new-connection-
mark=ether2_conn action=mark-connection passthrough=yes
add chain=prerouting in-interface=ether3 connection-state=new new-connection-
mark=ether3_conn action=mark-connection passthrough=yes
add chain=output connection-mark=ether1_conn new-routing-mark=to_ether1
action=mark-routing passthrough=yes
add chain=output connection-mark=ether2_conn new-routing-mark=to_ether2
action=mark-routing passthrough=yes
add chain=output connection-mark=ether3_conn new-routing-mark=to_ether3
action=mark-routing passthrough=yes
add chain=prerouting in-interface=bridge1 connection-state=new dst-address-type=!
local per-connection-classifier=both-addresses-and-ports:6/0 action=mark-connection
new-connection-mark=ether1_conn passthrough=yes
add chain=prerouting in-interface=bridge1 connection-state=new dst-address-type=!
local per-connection-classifier=both-addresses-and-ports:6/1 action=mark-connection
new-connection-mark=ether1_conn passthrough=yes
add chain=prerouting in-interface=bridge1 connection-state=new dst-address-type=!
local per-connection-classifier=both-addresses-and-ports:6/2 action=mark-connection
new-connection-mark=ether2_conn passthrough=yes
add chain=prerouting in-interface=bridge1 connection-state=new dst-address-type=!
local per-connection-classifier=both-addresses-and-ports:6/3 action=mark-connection
new-connection-mark=ether2_conn passthrough=yes
add chain=prerouting in-interface=bridge1 connection-state=new dst-address-type=!
local per-connection-classifier=both-addresses-and-ports:6/4 action=mark-connection
new-connection-mark=ether3_conn passthrough=yes
add chain=prerouting in-interface=bridge1 connection-state=new dst-address-type=!
local per-connection-classifier=both-addresses-and-ports:6/5 action=mark-connection
new-connection-mark=ether3_conn passthrough=yes
add chain=prerouting in-interface=bridge1 connection-mark=ether1_conn action=mark-
routing new-routing-mark=to_ether1 passthrough=yes
add chain=prerouting in-interface=bridge1 connection-mark=ether2_conn action=mark-
routing new-routing-mark=to_ether2 passthrough=yes
add chain=prerouting in-interface=bridge1 connection-mark=ether3_conn action=mark-
routing new-routing-mark=to_ether3 passthrough=yes

/ip route
add dst-address=1.1.1.1 gateway=192.168.1.1%ether1 scope=10
add dst-address=1.0.0.1 gateway=192.168.1.1%ether2 scope=10
add dst-address=8.8.8.8 gateway=192.168.1.1%ether3 scope=10

add distance=1 gateway=1.1.1.1%ether1 routing-mark=to_ether1 check-gateway=ping


add distance=2 gateway=1.0.0.1%ether2 routing-mark=to_ether2 check-gateway=ping
add distance=3 gateway=8.8.8.8%ether3 routing-mark=to_ether3 check-gateway=ping

add dst-address=10.0.0.1 gateway=1.1.1.1%ether1 scope=10 target-scope=10 check-


gateway=ping
add dst-address=10.0.0.2 gateway=1.0.0.1%ether2 scope=10 target-scope=10 check-
gateway=ping
add dst-address=10.0.0.3 gateway=8.8.8.8%ether3 scope=10 target-scope=10 check-
gateway=ping

add distance=1 gateway=10.0.0.1%ether1 routing-mark=to_ether1


add distance=2 gateway=10.0.0.2%ether2 routing-mark=to_ether2
add distance=3 gateway=10.0.0.3%ether3 routing-mark=to_ether3

add distance=1 gateway=10.0.0.1


add distance=2 gateway=10.0.0.2
add distance=3 gateway=10.0.0.3

balanceo mismo gateway


ip route
add distance=1 gateway=192.168.1.1%ether1
add distance=2 gateway=192.168.1.1%ether2
add distance=3 gateway=192.168.1.1%ether3
add check-gateway=ping distance=1 gateway=192.168.1.1%ether1 routing-mark=to_ether1
add check-gateway=ping distance=3 gateway=192.168.1.1%ether2 routing-mark=to_ether2
add check-gateway=ping distance=3 gateway=192.168.1.1%ether3 routing-mark=to_ether3

You might also like