主要功能:
宽带拨号断线重拨以后,更换以后的新IP地址自动发送到邮箱;
:global pppoeip [/ip address get [find interface=”pppoe-out1″] address] :global pppoeiptemp1 [ /ip pool get [find name=”temp1″] ranges] :global tempnumber1 [:len $pppoeip] :global tempnumber2 [pick $pppoeip 0 ($tempnumber1 – 3) ] :if ($tempnumber2 = $pppoeiptemp1) do={} else={/ip pool set [find name=temp1] ranges=[$pppoeip]} :global pooltemp1 [ /ip pool get [find name=”temp1″] ranges] :global pooltemp2 [ /ip pool get [find name=”temp2″] ranges] :if ($pooltemp1 = $pooltemp2) do={} else={/tool e-mail send to=xxxx@gmail.com subject=(“NEW-IP: ” . [ /ip pool get [find name=”temp1″] ranges]) body=(“发送日期:” . [/system clock get date] . ” ;系统侦测时间:” . [/system clock get time]) tls=yes server=74.125.45.109} :delay 3; :if ($pooltemp1 = $pooltemp2) do={} else={/ip pool set [find name=temp2] ranges=[/ip address get [find interface=”pppoe-out1″] address]}
评论前必须登录!
注册