ROS单线多拨pppoe
#设置内网IP地址
/ ip add add interface=ether1
address=192.168.0.254/255.255.255.0
#设置共享上网
/ ip firewall nat add action=masquerade chain=srcnat
src-address=192.168.0.0/255.255.255.0
#设置ADSL拔号
/ interface pppoe-client add name="pppoe-out1" interface=ether2
user="wwwszwblmcom@163.gd" password="88888888"
add-default-route=no disabled=no
/ interface pppoe-client enable pppoe-out1
/ interface pppoe-client add name="pppoe-out2" interface=ether3
user="wwwszwblmcom@163.gd" password="88888888"
add-default-route=no disabled=no
/ interface pppoe-client enable pppoe-out2
/ interface pppoe-client add name="pppoe-out2" interface=ether4
user="wwwszwblmcom@163.gd" password="88888888"
add-default-route=no disabled=no
/ interface pppoe-client enable pppoe-out3
#设置ADSL虚拟IP
/ ip address add address=58.58.58.51/32 interface=pppoe-out1
comment="adsl1"
/ ip address add address=58.58.58.52/32 interface=pppoe-out2
comment="adsl2"
/ ip address add address=58.58.58.53/32 interface=pppoe-out3
comment="adsl3"
#设置分流上网
/ ip firewall mangle add chain=prerouting
src-address=192.168.0.1-192.168.0.20 action=mark-routing
new-routing-mark=adsl1 comment=adsl1
/ ip firewall mangle add chain=prerouting
src-address=192.168.0.21-192.168.0.30 action=mark-routing
new-routing-mark=adsl2 comment=adsl2
/ ip firewall mangle add chain=prerouting
src-address=192.168.0.31-192.168.0.40 action=mark-routing
new-routing-mark=adsl3 comment=adsl3
#设置路由表
/ ip route add gateway=58.58.58.51 routing-mark=adsl1
comment=adsl1
/ ip route add gateway=58.58.58.52 routing-mark=adsl2
comment=adsl2
/ ip route add gateway=58.58.58.53 routing-mark=adsl3
comment=adsl3
#设置脚本
:local assign-address
:local new-address
:local status
:local x
:set x 3
:for i from=1 to=$x do={
:set status [/interface get [/interface find
name=("pppoe-out" . $i)] running]
:if ($status=true) do={
:set new-address [/ip address get [/ip address find dynamic=yes
interface=("pppoe-out" . $i)] address]
:set new-address [:pick $new-address 0 [:find $new-address
"/"]]
:set assign-address [/ip address get [/ip address find dynamic=no
interface=("pppoe-out" . $i)] address]
:set assign-address [:pick $assign-address 0 [:find $assign-address
"/"]]
:if ($assign-address != $new-address) do={
/ip address set [/ip address find comment=("adsl" . $i)]
address=$new-address network=$new-address
broadcast=$new-address
/ip route set [/ip route find comment=("adsl" . $i)]
gateway=$new-address
}
}
}
本文使用Blog_Backup未注册版本导出,请到soft.pt42.com注册。
ROS单线多拨pppoe的更多相关文章
- OpenWrt > ADSL单线多拨,负载均衡(仅供参考)
前题 硬件:路由器,刷入OpenWrt 一些背景知识和动手能力 目标效果图 步骤 使用SSH 登陆路由器.I.e. ssh root@192.168.2.1 运行/usr/bin/duobo.日志类似 ...
- 单线多拨,傻瓜式openwrt单线多拨叠加速率教程
http://bbs.pceva.com.cn/thread-98362-1-1.html
- [RouterOS] ROS对接碧海威或PA等流控实现完美流控详细教程(附脚本全免费)
前言: 经常在群里看到不少朋友争论海蜘蛛 ROS 维盟 爱快 碧海威 流控大师 Woyos等等软路由,哪个好.实际上,网络产品是复杂的,现在的软路由功能上已经远远不是单独的路由了.每种产品都有他本身的 ...
- OPENWRT X86 安装使用教程 (未完成)
目 录 一 下载 Openwrt 镜像文件 二 将镜像文件写入目标磁盘 2.1 写盘工具 2.2 Physdiskwrite 写盘 2.3 win32diskimager 写盘 三 管理界面 3. ...
- !!!!OpenWrt系列教程汇总
OpenWrt FAQ https://dev.openwrt.org.cn/wiki/faqs OpenWrt编译教程 完全新手教程:openwrt编译全过程(sse) 直接编译出带中文的openw ...
- 7620N路由器刷openwrt系统并配置***
之前一直用goAgent***,主要用gmail.逛逛twitter.youtube.维基百科.加速stackoverflow等等.但goAgent只能PC使用,手机.iPad都不能用,直到我拿到了一 ...
- 小记——GTMD校园网
前言 学校一年前开通了校园网,然鹅信号未覆盖我们住的公寓,又多忍受了一年的小破宽带(10M带宽,100块300个小时) 上个星期,架设了一年的校园网终于通了,然后我们发现——校园网69元一个月,一个用 ...
- ros使用pppoe拨号获取ipv6,并且下发IPV6的dns到客户机win7
原文: https://www.mobile01.com/topicdetail.php?f=110&t=3405680 http://forum.mikrotik.com/viewtopic ...
- 软路由OpenWrt(LEDE)2020.5.10更新 UPnP+NAS+多拨+网盘+DNS优化
近期更新:2020.05.10更新-基于OpenWrt R2020.5.9版本,源码截止2020.05.10. 交流群:QQ 1030484865 电报 t.me/t_homelede 版本说 ...
随机推荐
- 安装完MongoDB后尝试mongod -dbpath命令为什么会一直卡在连接端口?
1.现象如下 Linux Windows 2.原因 其实,这不是卡住了,而是告诉我们.数据库已经启动,而且这个东东还不能关掉,关掉意味着数据库也关了.一开始我也是傻逼逼的在那等了一天,哎.... 3. ...
- java如何设置文件的权限
import java.io.File; 2.import java.io.IOException; 3./× 4.×只能给当前用户赋予对该文件的权限,调用createNewFile()方法默认的权限 ...
- 关于angular双向绑定的一个问题,百度无果,还请帮忙解惑。
用了一段时间anjular蛮好用的.其实用的功能不多.主要用于列表数据绑定以及一些简单效果的绑定,但是最近出现一个现象,百度无果,居然没有人遇到.现在描述一下,截图不方便,希望有人解惑. 列表ng-r ...
- Deutsch lernen (14)
1. das Abseits, - 越位 Der Linienrichter winkte Abseits. winken - winkte - gewunken 示意 2. abs ...
- std::string格式化输入输出
在C语言中: C函数有sprintf函数, 比较方便, 但是需要知道所需要的内存空间是多少. 在C++的框架MFC中: 在MFC中CString 有Format函数来格式化字符串. 很方便. 难过的是 ...
- tee
功能说明:把数据重定向到给定文件和屏幕上. 参数选项: -a 向文件追加内容,而不是覆盖. tee命令允许标准输出同时把内容写入(覆盖)到文件中的实践. tee命令允许标准输出同时把内容 ...
- 微信jssdk图片上传
一.html页面如下: <div class="weui-cell"> <div class="weui-cell__hd"></ ...
- react工具库
采用了react框架后,需要找到一些常用的库,常见的需求比如: 1)react生成二维码 2)react的轮播banner图 随着react的社区的壮大,以上的需求都有专门的库帮我们做这个: 1)re ...
- Java 将File转换为MultipartFile类型
首先转换时需要用到commons-fileupload-1.3.2.jar包,若项目中没有就先加入jar包,实现代码如下: 1.根据File创建FileItem import java.io.File ...
- 【转载】java中的反射
主要介绍以下几方面内容 理解 Class 类 理解 Java 的类加载机制 学会使用 ClassLoader 进行类加载 理解反射的机制 掌握 Constructor.Method.Field 类的用 ...