您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 销售管理 > ROS刷新PPPOE-Client-防假死-卡死-断线-自动重拨修复
localnewaddresslocalnewnetworklocalassigniplocalstatuslocalpppoestatuslocalpppoeuplocalpppoeupcountlocalpppoedownlocalpppoedowncount##################localx5#---线路数请更改使用##################setx[len[interfacefindtype=pppoe-out]]setpppoeupcount0setpppoedowncount0#loginfo$xloginfologinfoPPPOE-OUT检测程序loginfologinfo(pppoe-outStatusRemoteAddressLocalAddress)forifrom=1to=$xdo={setstatus[interfaceget[interfacefindname=(pppoe-out.$i)]running]if($status=true)do={setnewnetwork[ipaddressget[ipaddressfinddynamic=yesinterface=(pppoe-out.$i)]network]setpppoestatus[ping59.49.49.49count=2interface=(pppoe-out.$i)]if($pppoestatus=1)do={loginfo(pppoe-out.$i.重启中......)beepintpppoe-clientdisable(pppoe-out.$i)delay2intpppoe-clientenable(pppoe-out.$i)delay5if($pppoedowncount=0)do={setpppoedown[($pppoedown.pppoe-out.$i)]}if($pppoedowncount0)do={setpppoedown[($pppoedown.;pppoe-out.$i)]}setpppoedowncount($pppoedowncount+1)}if($pppoestatus1)do={if($pppoeupcount=0)do={setpppoeup[($pppoeup.pppoe-out.$i)]}if($pppoeupcount0)do={setpppoeup[($pppoeup.;pppoe-out.$i)]}setpppoeupcount($pppoeupcount+1)}setnewaddress[ipaddressget[ipaddressfinddynamic=yesinterface=(pppoe-out.$i)]address]loginfo(pppoe-out.$i..$pppoestatus..$newnetwork..$newaddress)}}loginfologinfologinfo(PPPOE-Client在线检测程序完毕,线路测试共.$pppoedowncount+$pppoeupcount.线)if($pppoeupcount=0)do={loginfo没有在线的PPPOE-CLient!}if($pppoeupcount0)do={loginfo(在线共计.$pppoeupcount.条.$pppoeup)}if($pppoedowncount=0)do={loginfo所有PPPOE-CLient均在线!}if($pppoedowncount0)do={loginfo(断线共计.$pppoedowncount.条,自动修复如下.$pppoedown)}beeplength=0.5sdelay1beep
本文标题:ROS刷新PPPOE-Client-防假死-卡死-断线-自动重拨修复
链接地址:https://www.777doc.com/doc-4693069 .html