|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
×
本帖最后由 jike106397 于 2013-11-28 23:48 编辑
小区20个号VLAN多拨叠加 ,一条30M光纤.刚做光纤走上传,ADSL走下载成功,效果感觉很好.显摆一下.多谢各位的支持.
脚本是用来检测修改配置在NAT的SRC-NAT伪装的IP地址的.设置5秒检测一次.
效果如下:
ADSL效果如下:
ADSL流量
总接口流量如下:
接口流量
用到的刚写的脚本如下:
- ##code by dshoub(大手笔) 2013.11.28
- :local nowAdd
- :local oldAdd
- :for i from=1 to=20 do={
- :if ([/ip address find interface=("pppoe-out" . $i)] != "") do={
- :set nowAdd [/ip address get [/ip address find interface=("pppoe-out" . $i)] address]
- :set nowAdd [:pick $nowAdd 0 [:find $nowAdd "/"] ]
- :set oldAdd [/ip firewall nat get [/ip firewall nat find comment=("pppoe-out" . $i)] to-address]
- if ($oldAdd != "") do={
- if ($oldAdd != $nowAdd) do={
- /ip firewall nat set [/ip firewall nat find comment=("pppoe-out" . $i)] to-address=$nowAdd
- :log info message=( "pppoe-out" . $i . "更换新的IP 地址:" . $oldAdd . " ==>> " . $nowAdd)
- }
- }
- }
- }
复制代码 |
|