多ADSL负载–掉线后自动修改pcc nth参数教程

多ADSL负载–掉线后自动修改pcc nth参数教程

**24.png1.png2.png3.png4.png5.png6.png7.png8.png9.png10.png11.png12.png13.png14.png15.png16.png17.png18.png19.png20.png21.png22.png23.png
**

在ros添加该脚本,在一条线挂掉后就自动检测修改pcc/nth参数,防止出现掉一条线,整个网络变慢的情况。
PCC:

  • {
  • :local status
  • :local i “5″
  • :local x “0″
  • :local y “0″
  • :local z “0″
  • :set x :len [/interface pppoe-client find running=yes]]
  • :if ($x<$i) do={
  • :for ii from=1 to=$i do={

10.? :set status [/interface get [find name=(“pppoe-out”.$ii)] running]
11.? :if ($status=true) do={
12.? /ip fir man set [find new-connection-mark=$ii] per-connection-classifier=(“both-addresses:”.$x.”/”.$y) disable=no;:set y ($y+1)} else={
13.? /ip fir man set [find new-connection-mark=$ii] disable=yes}}}
14.? :if ($x=$i) do={
15.? :set z :len [/ip fir man find action=“mark-connection” disabled=yes chain=prerouting]]
16.? :if ($z>0) do={
17.? :for ii from=1 to=$i do={
18.? /ip fi man set [find new-connection-mark=$ii] per-connection-classifier=(“both-addresses:”.$x.”/”.$y) disable=no;:set y ($y+1)}}}}
复制代码
NTH:

  • {
  • :local status
  • :local i “5″
  • :local x “0″
  • :local y “1″
  • :local z “0″
  • :set x :len [/interface pppoe-client find running=yes]]
  • :if ($x<$i) do={
  • :for ii from=1 to=$i do={
  • :set status [/interface get [find name=(“pppoe-out”.$ii)] running]
  • :if ($status=true) do={
  • /ip fir man set [find new-connection-mark=$ii] nth=($x.”,”.$y) disable=no;:set y ($y+1)} else={
  • /ip fir man set [find new-connection-mark=$ii] disable=yes}}}
  • :if ($x=$i) do={
  • :set z :len [/ip fir man find action=“mark-connection” disabled=yes chain=prerouting]]
  • :if ($z>0) do={
  • :for ii from=1 to=$i do={
  • /ip fi man set [find new-connection-mark=$ii] nth=($x.”,”.$y) disable=no;:set y ($y+1)}}}}

太高深了,看不懂,另外,楼主将表情图片发上来什么意思:D