local index 0 local ppplen :set ppplen [len [/ip address find interface~"pppoe"]] :foreach m in=([/interface pppoe-client find running=yes]) do={ :local pinterface [/interface pppoe-client get $m interface ] :local pname [/interface pppoe-client get $m name ] #pcc #makeconnection local internum ($index+1) local connmark "wan$internum_conn" local routemark "to_wan$internum" local classifier "both-addresses-and-ports:$ppplen/$index" /ip fir ma :log info $classifier add action=mark-connection chain=prerouting dst-address-type=!local in-interface=bridge-local new-connection-mark=$connmark per-connection-classifier=$classifier src-address=10.0.0.0/8 #makerouting add action=mark-routing chain=prerouting connection-mark=$connmark in-interface=bridge-local new-routing-mark=$routemark src-address=10.0.0.0/8 #input add action=mark-connection chain=input in-interface=$pname new-connection-mark=$connmark #output add action=mark-routing chain=output connection-mark=$connmark new-routing-mark=$routemark #router /ip route add check-gateway=ping distance=1 gateway=$pname routing-mark=$routemark add check-gateway=ping distance=($index+1) gateway=$pname #index++ :set index ($index+1) }
教程收集自网络
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。