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 版本说 ...
随机推荐
- 【sqli-labs】 less38 GET -Stacked Query Injection -String based (GET型堆叠查询字符型注入)
这个直接用union select就可以 http://192.168.136.128/sqli-labs-master/Less-38/?id=0' union select 1,2,3%23 看一 ...
- 【sqli-labs】 less34 POST- Bypass AddSlashes (POST型绕过addslashes() 函数的宽字节注入)
还是宽字节注入,POST版本的 uname=1&passwd=1%df' union select 1,2,3# 提交报错 列名不匹配,改一下就好了 uname=1&passwd=1% ...
- 一个完整的jmeter APP登录接口测试实例
最终效果: 知识点: 通过HTTP信息头管理器, 正则表达式提取器 提取登录要用的token,memcard,Debug Sampler,CSV Data set config参数化登录,循环控制器 ...
- sessionStorage和localStorage存储的转换不了json
先说说localStorage与sessionStorage的差别 sessionStorage是存储浏览器的暂时性的数据,当关闭浏览器下次再打开的时候就不能拿到之前存储的缓存了 localStora ...
- 学习Spider 了解 Scrapy的流程
Scrapy 先创建项目 在windows下 scrapy startproject myproject #myproject是你的项目名称 cd 项目名称 scrapy g ...
- html 报告页面样式
修改了下HTML页面样式 页面代码 <!DOCTYPE html> <html lang="en"> <head> <meta chars ...
- 【剑指Offer】55、链表中环的入口结点
题目描述: 给一个链表,若其中包含环,请找出该链表的环的入口结点,否则,输出null. 解题思路: 本题是一个比较典型的链表题目,难度适中.首先,对于大多人来说,看到这道题是比较开心的 ...
- Lua的五种变量类型、局部变量、全局变量、lua运算符、流程控制if语句_学习笔记02
Lua的五种变量类型.局部变量.全局变量 .lua运算符 .流程控制if语句 Lua代码的注释方式: --当行注释 --[[ 多行注释 ]]-- Lua的5种变量类型: 1.null 表示 ...
- php第十节课
数据访问 面向对象:类:由众多对象抽象出来的对象:由类实例化出来的,任何东西都可以看做对象来研究定义类:class 类名{ 成员变量 成员方法} 构造函数:写法特殊 执行特殊,对类里面的成员进行初始化 ...
- PL\SQL(day05)
PLSQL 1.常用的访问数据库的相关技术 1) plsql 过程化的sql 2) proc/c++ 在c/c++语言中访问oracle数据库的技术 3) ado/odbc vc中访问数据库的技术 4 ...