ros脚本
码为001,接口为adsl1。add-default-route=no 不作为默认路由表)
/interface pppoe-client add name="pppoe-out1" interface=adsl1 user="hzjc001" password="001" add-default-route=no disabled=no
/interface pppoe-client enable pppoe-out1
赋予一个ip给第一个adsl1,并标记为1
/ip address add address=58.58.58.1/32 interface=pppoe-out1 comment="1"
路由表设置网关为58.58.58.1 标记为1
/ip route add gateway=58.58.58.1 routing-mark=1 comment="1"
给adsl1做nth规则
/ip firewall mangle add chain=prerouting in-interface=lan connection-state=new nth=1,1,0 action=mark-connection new-connection-mark=1 passthrough=yes disabled=no
/ip firewall mangle add chain=prerouting in-interface=lan connection-mark=1 action=mark-routing new-routing-mark=1 passthrough=no disabled=no
/ip firewall nat add chain=srcnat connection-mark=1 action=src-nat to-addresses=58.58.58.1 to-ports=0-65535 comment="1" disabled=no
建立pppoe-client(adsl拨号 用户名为hzjc002密码为002,接口为adsl2。add-default-route=no 不作为默认路由表)
/interface pppoe-client add name="pppoe-out2" interface=adsl2 user="hzjc002" password="002" add-default-route=no disabled=no
/interface pppoe-client enable pppoe-out2
赋予一个ip给第一个adsl2,并标记为2
/ip address add address=58.58.58.2/32 interface=pppoe-out2 comment="2"
路由表设置网关为58.58.58.2 标记为2
/ip route add gateway=58.58.58.2 routing-mark=2 comment="2"
给adsl2做nth标记
/ip firewall mangle add chain=prerouting in-interface=lan connection-state=new nth=1,1,1 action=mark-connection new-connection-mark=2 passthrough=yes disabled=no
/ip firewall mangle add chain=prerouting in-interface=lan connection-mark=2 action=mark-routing new-routing-mark=2 passthrough=no disabled=no
/ip firewall nat add chain=srcnat connection-mark=2 action=src-nat to-addresses=58.58.58.2 to-ports=0-65535 comment="2" disabled=no
以下据为本人在网上摘录,并未曾试验,并逐句解释
ether1=lan
ether2=adsl1
ether3=adsl2
ether4=adsl3
定义内网接口为lan的ip为192.168.1.1/24
/ ip add add interface=lan address=192.168.1.1/24
第一个adsl1
/ interface pppoe-client add name="pppoe-out1" interface=adsl1 user="adsl1" password="adsl1" add-default-route=no disabled=no
/ interface pppoe-client enable pppoe-out1
/ ip address add address=11.0.0.1/32 interface=pppoe-out1 comment="adsl"1
/ ip route add gateway=11.0.0.1 routing-mark=adsl1 comment=adsl1
第二个adsl2
/ interface pppoe-client add name="pppoe-out2" interface=adsl2 user="adsl2" password="adsl2" add-default-route=no disabled=no
/ interface pppoe-client enable pppoe-out2
/ ip address add address=11.0.0.2/32 interface=pppoe-out2 comment="adsl"2
/ ip route add gateway=11.0.0.2 routing-mark=adsl2 comment=adsl2
第三个adsl3
/ interface pppoe-client add name="pppoe-out3" interface=adsl3 user="adsl3" password="adsl3" add-default-route=no disabled=no
/ interfa
ROS 脚本大全(通用) 一:限速脚本 :for wbsz from 1 to 254 do={/queue simple add name=(wbsz . $wbsz) dst-address=(192.168.0. . $wbsz) limit-...
ros 脚本详细解释 +++ 在3.22下:put ((221.232.119.228 & 255.255.255.0)./24) 并不能得到221.232.119.0/24 正确的方法是:put ((221.232.119....
ROS封杀常用P2P策略脚本: / ip firewall filter add chain=input protocol=udp dst-port=137-138 action=drop comment="drop udp137-138" # 讯雷 add chain=...
ROS 脚本大全(可通用) 本文总结了一些常用的 ROS 脚本,希望对大家有帮助! 禁止 ip 上网脚本: :for aaa from 2 to 254 do={/ip firewall filter chain=forw...
ROS脚本命令详解_IT/计算机_专业资料。四种变量 global - 定义全局变量, 可以要所有的脚本中调用共享 local - 定义本地变量,只能在其所要的脚本下调用,不能被其...
(做完ROS后,先不绑,打开所有电脑后,在执行下面的命令。直接复制到WINBOX终端运行就可以了) / interface ethernet set lan arp=reply-only 解除ARP绑定 lan 为...
ROS脚本语法使用教程_计算机硬件及网络_IT/计算机_专业资料。ROS脚本语法使用教程 ,快速学习ROS脚本手册:脚本编写 1 手册:脚本编写 适用RouterOS版本: v3, v4及以上...
ros防火墙脚本_计算机硬件及网络_IT/计算机_专业资料。企业专用ros防火墙脚本,经测试稳定ROS防火墙脚本 经常需要用的ros脚本的朋友可以看下 # feb/18/2006 22:28:...
ROS基本防护脚本_IT/计算机_专业资料。简单的一些文档本适用于 ROS 2.9.2.7 保存以下脚本后缀改为 rsc,用 winbox 上传到路由上, 用命令:import 文件名 导入...
热门文档