欢迎来到天天文库
浏览记录
ID:14412428
大小:41.00 KB
页数:15页
时间:2018-07-28
《ros 脚本详细解释》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、ros脚本详细解释因为下面这个问题,我觉得脚本详细解释也许对大家有用处,决定把以前网络时候找的资料发上来,希望对大家有用处[apple@sgg-gatewy]>:put(([/ipfirewalladdress-listget0address]&255.255.255.0)./24) 202.103.24.0/24这样使用put可以实现把202.103.24.0和/24结合成一个整体但是怎么样把这个新的值202.103.24.0/24赋给一个变量呢,set不能完成,谁有好的建议或者意见我准备做的是通过vpn客户端的访问源
2、地址,自动添加/iprouterule里面的数据现在可以自动把202.103.24.68这样的具体ip自动添加,但是我想根据这个ip然后自动添加一个标准c段[apple@sgg-gatewy]>:environmentprintGlobalVariablesLocalVariables[apple@sgg-gatewy]>:put(([/ipfirewalladdress-listget0address]&255.255.255.0)./24)221.232.119.0/24[apple@sgg-gatewy]>:glob
3、altestip[apple@sgg-gatewy]>:put$testip [apple@sgg-gatewy]>:settestip202.103.24.0/24 [apple@sgg-gatewy]>:put$testip 202.103.24.0/24[apple@sgg-gatewy]>:settestip[:put(([/ipfirewalladdress-listget0address]&255.255.255.0)./24)] 221.232.119.0/24[apple
4、@sgg-gatewy]>:put$testip [apple@sgg-gatewy]>:settestip{[:put(([/ipfirewalladdress-listget0address]&255.255.255.0)./24)]}[apple@sgg-gatewy]>:put$testip [:put(([/ipfi
5、rewalladdress-listget0address]&255.255.255.0)./24)][apple@sgg-gatewy]>:settestip([:put(([/ipfirewalladdress-listget0address]&255.255.255.0)./24)])221.232.119.0/24[apple@sgg-gatewy]>:put$testip [apple@sgg-gatewy]>
6、:environmentprint GlobalVariablesLocalVariablestestip=现在的需要解决的是,使用什么方法,或者用别的命令来实现把连接好了的新数字赋给testip这个变量直接脚本里面写dst-address=[:put(([/ipfirewalladdress-listget0address]&255.255.255.0)./24)]也是无效的的,测试过了的用put,直接输出了,不能完成赋值不用p
7、ut,不能连接两个字段大家一起思考思考,先表示感谢:foreachiin=[/ipfirewalladdress-listfindlist=telvpn-stable]do=[/iprouteruleadddst-address=(([/ipfirewalladdress-listget$iaddress]&255.255.255.0)./24)table=telaction=lookupdisabled=nocomment="telvpnaddbylcnja`sautoscript"src-address=0.0.0.0
8、/0]呵呵,自己搞定了--------------------------------------------------------------------------------------------------------------------------------------
此文档下载收益归作者所有