ros 获取域名Ip 脚本详细说明
类别: 常用技术文章 来源:www.nanyuetong.com
摘要:ROS发烧友,KERRY强提供 南粤通信网NANYUETONG.COM
:local host zxx.f3322.org
:local oldip [:resolve $host]
/int...
ROS发烧友,KERRY强提供 南粤通信网NANYUETONG.COM
:local host zxx.f3322.org
:local oldip [:resolve $host]
/int set local-address=$oldip [/int find name=ipip1]
本人测试图
要写脚本参考下面
/ip address
:gl n
:gl w
:set n [get [find interface=pppoe-out1] address ]
:set n [:pick $n 0 ([:len $n]-3)]
#:log war $n
:if ($n=$w) do={:log war ("ip无变化!".$n)} else={:log war ("ip有变化!最新IP=".$n)
:set w $n
/in-interface fir IP-Tunnel set [find comment~"adslip"] local-address=$w
}
#
/in-interface fir IP-Tunnel set [find comment~"adslip"] local-address=$w
【收藏本页】 【返回顶部】 【关闭窗口】