Vous êtes sur la page 1sur 2

/ip address

add address=192.168.88.1/24 interface=ether5

/ip firewall nat


add chain=srcnat out-interface=pppoe-out1 action=masquerade
add chain=srcnat out-interface=pppoe-out2 action=masquerade
add chain=srcnat out-interface=pppoe-out3 action=masquerade

/ip route
add gateway=pppoe-out1 distance=1
add gateway=pppoe-out2 distance=2
add gateway=pppoe-out3 distance=3

/ip firewall mangle


add chain=prerouting in-interface=pppoe-out1 connection-state=new new-connection-mark=pppoe-out1_conn action=mark-connection
passthrough=yes
add chain=prerouting in-interface=pppoe-out2 connection-state=new new-connection-mark=pppoe-out2_conn action=mark-connection
passthrough=yes
add chain=prerouting in-interface=pppoe-out3 connection-state=new new-connection-mark=pppoe-out3_conn action=mark-connection
passthrough=yes
add chain=output connection-mark=pppoe-out1_conn new-routing-mark=to_pppoe-out1 action=mark-routing passthrough=yes
add chain=output connection-mark=pppoe-out2_conn new-routing-mark=to_pppoe-out2 action=mark-routing passthrough=yes
add chain=output connection-mark=pppoe-out3_conn new-routing-mark=to_pppoe-out3 action=mark-routing passthrough=yes

/ip firewall mangle


add chain=prerouting in-interface=ether5 connection-state=new dst-address-type=!local per-connection-classifier=both-addresses:3/0
action=mark-connection new-connection-mark=pppoe-out1_conn passthrough=yes
add chain=prerouting in-interface=ether5 connection-state=new dst-address-type=!local per-connection-classifier=both-addresses:3/1
action=mark-connection new-connection-mark=pppoe-out2_conn passthrough=yes
add chain=prerouting in-interface=ether5 connection-state=new dst-address-type=!local per-connection-classifier=both-addresses:3/2
action=mark-connection new-connection-mark=pppoe-out3_conn passthrough=yes

add chain=prerouting in-interface=ether5 connection-mark=pppoe-out1_conn action=mark-routing new-routing-mark=to_pppoe-out1


passthrough=yes
add chain=prerouting in-interface=ether5 connection-mark=pppoe-out2_conn action=mark-routing new-routing-mark=to_pppoe-out2
passthrough=yes
add chain=prerouting in-interface=ether5 connection-mark=pppoe-out3_conn action=mark-routing new-routing-mark=to_pppoe-out3
passthrough=yes

/ip route
add gateway=pppoe-out1 routing-mark=to_pppoe-out1
add gateway=pppoe-out2 routing-mark=to_pppoe-out2
add gateway=pppoe-out3 routing-mark=to_pppoe-out3

/ip address

add address=192.168.88.1/24 interface=ether5

/ip firewall nat


add chain=srcnat out-interface=pppoe-out1 action=masquerade
add chain=srcnat out-interface=pppoe-out2 action=masquerade
add chain=srcnat out-interface=pppoe-out3 action=masquerade

/ip route
add gateway=pppoe-out1 distance=1
add gateway=pppoe-out2 distance=2
add gateway=pppoe-out3 distance=3

/ip firewall mangle


add chain=prerouting in-interface=pppoe-out1 connection-state=new new-connection-mark=pppoe-out1_conn action=mark-connection
passthrough=yes
add chain=prerouting in-interface=pppoe-out2 connection-state=new new-connection-mark=pppoe-out2_conn action=mark-connection
passthrough=yes
add chain=prerouting in-interface=pppoe-out3 connection-state=new new-connection-mark=pppoe-out3_conn action=mark-connection
passthrough=yes
add chain=output connection-mark=pppoe-out1_conn new-routing-mark=to_pppoe-out1 action=mark-routing passthrough=yes
add chain=output connection-mark=pppoe-out2_conn new-routing-mark=to_pppoe-out2 action=mark-routing passthrough=yes
add chain=output connection-mark=pppoe-out3_conn new-routing-mark=to_pppoe-out3 action=mark-routing passthrough=yes

/ip firewall mangle


add chain=prerouting in-interface=ether5 connection-state=new dst-address-type=!local per-connection-classifier=both-addresses:3/0
action=mark-connection new-connection-mark=pppoe-out1_conn passthrough=yes
add chain=prerouting in-interface=ether5 connection-state=new dst-address-type=!local per-connection-classifier=both-addresses:3/1
action=mark-connection new-connection-mark=pppoe-out2_conn passthrough=yes
add chain=prerouting in-interface=ether5 connection-state=new dst-address-type=!local per-connection-classifier=both-addresses:3/2
action=mark-connection new-connection-mark=pppoe-out3_conn passthrough=yes

add chain=prerouting in-interface=ether5 connection-mark=pppoe-out1_conn action=mark-routing new-routing-mark=to_pppoe-out1


passthrough=yes
add chain=prerouting in-interface=ether5 connection-mark=pppoe-out2_conn action=mark-routing new-routing-mark=to_pppoe-out2
passthrough=yes
add chain=prerouting in-interface=ether5 connection-mark=pppoe-out3_conn action=mark-routing new-routing-mark=to_pppoe-out3
passthrough=yes

/ip route
add gateway=pppoe-out1 routing-mark=to_pppoe-out1
add gateway=pppoe-out2 routing-mark=to_pppoe-out2
add gateway=pppoe-out3 routing-mark=to_pppoe-out3

Vous aimerez peut-être aussi