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 版本说 ...
随机推荐
- php数据库分页
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- C#多线程方法 可传参
//将线程执行的方法和参数都封装到一个类里面.通过实例化该类,方法就可以调用属性来实现间接的类型安全地传递参数.using System; using System.Threading; //Thre ...
- Android读写文件
1.从resource中的raw文件夹中获取文件并读取数据(资源文件只能读不能写) String res = ""; try{ InputStream in = getResour ...
- 我的C++笔记(数据的共享与保护)
*数据的共享与保护: * .作用域: * 作用域是一个标识符在程序正文中有效的区域.C++中标识符的作用域有函数原型作用域.局部作用域(块作用域).类作用域和命名空间作用域. * ().函数原型作用域 ...
- Nginx服务的地址重写
调整Nginx服务器配置,实现: 1.所有访问a.html的请求,重定向到b.html; 2.所有访问Nginx服务器(192.168.4.1)的请求重定向至www.baidu.com: 3.所有访问 ...
- :before和:after结合使用
<div class="slider-block" id="block" style="left: 15.5px;" data=&qu ...
- RecyclerView 悬浮/粘性头部效果3种方式
但是以上两种方式onDrawOver()方法实现逻辑对初次查看该段代码要花时间理解.下面代码逻辑(原理一样,同样参考大神代码)相对清晰,易理解 public class StickyDecoratio ...
- C语言开发框架、printf(day02)
C语言里包含以.c作为扩展名的文件,这种 文件叫源文件.C语言程序的绝大部分内容 应该记录在源文件里. C语言里还包括以.h作为扩展名的文件,这种 文件叫头文件. C语言程序里可以直接使用数字和加减乘 ...
- Firefly-rk3399 开发板环境搭建
Firefly教程网站:http://wiki.t-firefly.com/zh_CN/Firefly-RK3399/started.html 系统烧录: http://wiki.t-firefly. ...
- Linux 系统查看命令
1. linux CPU大小cat /proc/cpuinfo |grep "model name" && cat /proc/cpuinfo |grep &quo ...