欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

ROS常用腳本命令分享

  發(fā)布時(shí)間:2016-11-09 13:16:27   作者:佚名   我要評(píng)論
這篇文章主要介紹了ROS常用腳本命令,需要的朋友可以參考下
ROS 一些常用腳本:
/ ip firewall connection {:foreach r in=[find] do={remove $r}} 刪除所有連接

:foreach i in=[/ip firewall filter find action=drop ] do=[/ip firewall filter disable $i] disable防火墻規(guī)則

firewall connection tracking syn sendtime 設(shè)置成50 rectime 設(shè)置成30 減輕syn攻擊

/system scheduler add name=reboot interval=24h start-time=06:59:00 on-event={/system reboot} disabled=no 定時(shí)重起

/ip route set [/ip route find dst-address=0.0.0.0/0] gateway=xxx.xxx.xxx.xxx 改變默認(rèn)網(wǎng)關(guān)

/queue simple remove [find] 刪除所有Simple Queues

:foreach i in=[/ip arp find dynamic=yes ] do={/ip arp add copy-from=$i} ARP綁定(靜態(tài)ARP)


每個(gè)IP加一個(gè)simple queue的腳本

:foreach i in [/queue simple find] \
do {:put (deleting . ... . [/queue simple get $i name]);
queue simple remove $i;}

for i from 1 to 254 \
do { \
:if ($i!=100) \
do {/queue simple add \
name=(queue . $i) \
limit-at=128000/128000 \
burst-threshold=384000/192000 \
max-limit=512000/256000 \
burst-limit=2000000/512000 \
burst-time=16s/8s \
dst-address=(192.168.0. . $i); \
:put (192.168.0. . $i . ... . added)} \
}
ROS其他參數(shù):

使用:
WinBox-System-Scripts-+
Name(腳本名程)
Source(腳本)
OK-選擇要運(yùn)行的腳本-Run Script

集體綁定ARP
:foreach i in=[/ip arp find dynamic=yes ] do={/ip arp add copy-from=$i}
集體幫定ARP,這樣方便了很多,但是值得注意的是,用這命令綁定之后,要把外網(wǎng)的ARP解除了,要不然會(huì)出奇怪問(wèn)題,反正我是遇見(jiàn)了!

限速腳本:
:for aaa from 2 to 254 do={/queue simple add name=(queue . $aaa) dst-address=(192.168.0. . $aaa) limit-at=0/0 max-limit=2000000/2000000}

說(shuō)明:
aaa是變量
2 to 254是2~254
192.168.0. . $aaa是IP
上兩句加起來(lái)是192.168.0.2~192.168.0.254
max-limit=2000000/2000000是上行/下行


刪除所有連接
/ ip firewall connection {:foreach r in=[find] do={remove $r}}

disable防火墻規(guī)則
:foreach i in=[/ip firewall filter find action=drop ] do=[/ip firewall filter disable $i]


定時(shí)重起
/system scheduler add name=reboot interval=24h start-time=11:59:00 on-event={/system reboot} disabled=no

改變默認(rèn)網(wǎng)關(guān)
/ip route set [/ip route find dst-address=0.0.0.0/0] gateway=xxx.xxx.xxx.xxx

定時(shí)重起
/system scheduler add name=reboot interval=24h start-time=11:59:00 on-event={/system reboot} disabled=no


/sy reset 恢復(fù)路由原始狀態(tài)

/sy reboot 重啟路由

/sy showdown 關(guān)機(jī)

/sy ide set name=機(jī)器名 設(shè)置機(jī)器名

/export 查看配置

/ip export 查看IP配置

/sy backup 回車(chē) save name=你要設(shè)置文件名 LOAD NAME=你要設(shè)置文件名 備份路由

/inte***ce print 查看網(wǎng)卡狀態(tài)
0 X ether1 ether 1500 這個(gè)是網(wǎng)卡沒(méi)有開(kāi)啟
0 R ether1 ether 1500 這個(gè)是正常狀態(tài)

/int en 0 激活0網(wǎng)卡

/int di 0 激活0網(wǎng)卡

/ip fir con print 查看當(dāng)前所有網(wǎng)絡(luò)邊接

/ip service set www port=81 改變www服務(wù)端口為81

/ip hotspot user add name=user1 password=1 增加用戶(hù)
ROUTERos改本機(jī)網(wǎng)卡MAC的方法:
interface ethernet> set (網(wǎng)卡名) mac-address=(你想要的MAC)

機(jī)房經(jīng)常提出這種要求,這節(jié)課要求上網(wǎng),下節(jié)課就要求斷網(wǎng)。以前就是撥網(wǎng)線,后來(lái)用了這個(gè)就不用了。并且可以上網(wǎng)時(shí),也能控制學(xué)生上聯(lián)眾或者QQ。課后機(jī)房開(kāi)放時(shí)即要能上網(wǎng),還要能上QQ,把這些策略禁止掉就行了。

相關(guān)文章

最新評(píng)論