houseplant wrote:
各位板上前輩大家好,...(恕刪)
目前7.12RC5版本有macvlan了
建議之後有升級7.12stable後用macvlan來做多個pppoe撥號
用策略路由方式來做
ROSV7的方式
table表
/routing table
add disabled=no fib name=pppoe-out2
add disabled=no fib name=pppoe-out3
add disabled=no fib name=pppoe-out4
add disabled=no fib name=pppoe-out5
add disabled=no fib name=pppoe-out6
add disabled=no fib name=pppoe-out7
add disabled=no fib name=pppoe-out8
標記
/ip firewall mangle
add action=mark-connection chain=prerouting comment=pppoe-out1 \
connection-state=new dst-address-type=local in-interface=pppoe-out1 \
new-connection-mark=pppoe1-conn passthrough=yes src-address-type=!local
add action=mark-routing chain=prerouting connection-mark=pppoe1-conn \
in-interface=bridge new-routing-mark=main passthrough=no src-address=\
192.168.88.0/24
add action=mark-connection chain=prerouting comment=pppoe-out2 \
connection-state=new dst-address-type=local in-interface=pppoe-out2 \
new-connection-mark=pppoe2-conn passthrough=yes src-address-type=!local
add action=mark-routing chain=prerouting connection-mark=pppoe2-conn \
in-interface=bridge new-routing-mark=pppoe-out2 passthrough=no \
src-address=192.168.88.0/24
add action=mark-connection chain=prerouting comment=pppoe-out3 \
connection-state=new dst-address-type=local in-interface=pppoe-out3 \
new-connection-mark=pppoe3-conn passthrough=yes src-address-type=!local
add action=mark-routing chain=prerouting connection-mark=pppoe3-conn \
in-interface=bridge new-routing-mark=pppoe-out3 passthrough=no \
src-address=192.168.88.0/24
add action=mark-connection chain=prerouting comment=pppoe-out4 \
connection-state=new dst-address-type=local in-interface=pppoe-out4 \
new-connection-mark=pppoe4-conn passthrough=yes src-address-type=!local
add action=mark-routing chain=prerouting connection-mark=pppoe4-conn \
in-interface=bridge new-routing-mark=pppoe-out4 passthrough=no \
src-address=192.168.88.0/24
add action=mark-connection chain=prerouting comment=pppoe-out5 \
connection-state=new dst-address-type=local in-interface=pppoe-out5 \
new-connection-mark=pppoe5-conn passthrough=yes src-address-type=!local
add action=mark-routing chain=prerouting connection-mark=pppoe5-conn \
in-interface=bridge new-routing-mark=pppoe-out5 passthrough=no \
src-address=192.168.88.0/24
add action=mark-connection chain=prerouting comment=pppoe-out6 \
connection-state=new dst-address-type=local in-interface=pppoe-out6 \
new-connection-mark=pppoe6-conn passthrough=yes src-address-type=!local
add action=mark-routing chain=prerouting connection-mark=pppoe6-conn \
in-interface=bridge new-routing-mark=pppoe-out6 passthrough=no \
src-address=192.168.88.0/24
add action=mark-connection chain=prerouting comment=pppoe-out7 \
connection-state=new dst-address-type=local in-interface=pppoe-out7 \
new-connection-mark=pppoe3-conn passthrough=yes src-address-type=!local
add action=mark-routing chain=prerouting connection-mark=pppoe7-conn \
in-interface=bridge new-routing-mark=pppoe-out7 passthrough=no \
src-address=192.168.88.0/24
add action=mark-connection chain=prerouting comment=pppoe-out8 \
connection-state=new dst-address-type=local in-interface=pppoe-out8 \
new-connection-mark=pppoe4-conn passthrough=yes src-address-type=!local
add action=mark-routing chain=prerouting connection-mark=pppoe8-conn \
in-interface=bridge new-routing-mark=pppoe-out4 passthrough=yes \
src-address=192.168.88.0/24
add action=mark-routing chain=prerouting comment="policy route" \
new-routing-mark=main passthrough=yes src-address=\
192.168.88.100-192.168.88.109
add action=mark-routing chain=prerouting new-routing-mark=pppoe-out2 \
passthrough=yes src-address=192.168.88.110-192.168.88.119
add action=mark-routing chain=prerouting new-routing-mark=pppoe-out3 \
passthrough=yes src-address=192.168.88.120-192.168.88.129
add action=mark-routing chain=prerouting new-routing-mark=pppoe-out4 \
passthrough=yes src-address=192.168.88.130-192.168.88.139
add action=mark-routing chain=prerouting new-routing-mark=pppoe-out5 \
passthrough=yes src-address=192.168.88.140-192.168.88.149
add action=mark-routing chain=prerouting new-routing-mark=pppoe-out6 \
passthrough=yes src-address=192.168.88.150-192.168.88.159
add action=mark-routing chain=prerouting new-routing-mark=pppoe-out7 \
passthrough=yes src-address=192.168.88.160-192.168.88.169
add action=mark-routing chain=prerouting new-routing-mark=pppoe-out8 \
passthrough=yes src-address=192.168.88.170-192.168.88.179
路由表
/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out1 pref-src="" routing-table=pppoe-out1 scope=30 \
suppress-hw-offload=no target-scope=10
add disabled=no distance=2 dst-address=0.0.0.0/0 gateway=pppoe-out2 pref-src="" routing-table=pppoe-out2 scope=30 \
suppress-hw-offload=no target-scope=10
add disabled=no distance=3 dst-address=0.0.0.0/0 gateway=pppoe-out3 pref-src="" routing-table=pppoe-out3 scope=30 \
suppress-hw-offload=no target-scope=10
add disabled=no distance=4 dst-address=0.0.0.0/0 gateway=pppoe-out4 pref-src="" routing-table=pppoe-out4 scope=30 \
suppress-hw-offload=no target-scope=10
add disabled=no distance=5 dst-address=0.0.0.0/0 gateway=pppoe-out5 pref-src="" routing-table=pppoe-out5 scope=30 \
suppress-hw-offload=no target-scope=10
add disabled=no distance=6 dst-address=0.0.0.0/0 gateway=pppoe-out6 pref-src="" routing-table=pppoe-out6 scope=30 \
suppress-hw-offload=no target-scope=10
add disabled=no distance=7 dst-address=0.0.0.0/0 gateway=pppoe-out7 pref-src="" routing-table=pppoe-out7 scope=30 \
suppress-hw-offload=no target-scope=10
add disabled=no distance=8 dst-address=0.0.0.0/0 gateway=pppoe-out8 pref-src="" routing-table=pppoe-out8 scope=30 \
suppress-hw-offload=no target-scope=10