hongpeng198x 发表于 2008-5-17 19:35:58

ROS脚本问题,求高手帮忙

我有一个二线的脚本,
:local assign-address
:local new-address
:local status
:local gateway1
:local gateway2
:local x
:set x 2
:for i from=1 to=$x do={
    :set status running]
    :if ($status=true) do={
   :set new-address address]
   :set new-address [:pick $new-address 0 ([:len $new-address] -3)]
   :set assign-address address]
   :set assign-address [:pick $assign-address 0 ([:len $assign-address] -3)]
      :if ($assign-address != $new-address) do={ /ip address set address=$new-address network=$new-address broadcast=$new-address
      /ip route set gateway=$new-address
      /ip firewall nat set to-addresses=$new-address
      /ip route set gateway=$new-address

       :set ("gateway" . $i)$new-address
       }
   }
}
gateway1,和gateway2分别是双线外网拔号得到的IP地址,想把这两个IP地址作为我的静态路由表里的网关,我用
/ip route set gateway=$gateway1. "," $gateway2.怎么不行,这条语句应该怎么写啊,请高手帮忙
页: [1]
查看完整版本: ROS脚本问题,求高手帮忙