ROS3.3,ADSL双线,VRRP多拨,同网关和不同网关,PCC,成功啦,有图哟
本帖最后由 ww111222 于 2011-10-12 00:38 编辑俺的环境 有些怪:
一条电信10M光纤 ADSL ,一个账号, 可多拨。得到的IP 是同网关。
一条 联通4M ADSL ,一个账号,可多拨。得到的IP也是同网关(当然不和电信的网关相同啦),
今天测试了一下,用pcc 3线 负载。
2条 光纤 ADSL,一条 联通ADSL,
下载有 1.4M 左右。
得出一个结论,我这里虽然支持多拨,但一条线的总带宽 已经限制, 所以,和单拨没有区别。
主要是为了测试 多线 PCC。
脚本 没有 用 循环,不好意思,后期准备再 优化一下。#===================================================================================
# 多线同网关 PCC 负载
#===================================================================================
# 思路:先标记 连接,再标记路由,再添加路由,再伪装。
#===================================================================================
# 标记 连接和路由
#===================================================================================
# 先标记一个连接,并做PCC,再标记这个连接的路由,注意:路由标记的passthrough为no
#
# 变量 InInterface 内网网卡名称
:global InInterface "LAN"
/ip firewall mangle
add chain=prerouting \
in-interface=$InInterface \
action=mark-connection \
new-connection-mark="conn_1st" \
per-connection-classifier=src-address-and-port:3/0 \
passthrough=yes \
comment="PCC\CB\AB\CF\DF\B8\BA\D4\D8" \
disable=no
add chain=prerouting \
in-interface=$InInterface \
connection-mark="conn_1st" \
action=mark-routing \
new-routing-mark="route_1st" \
passthrough=no \
disable=no
/ip firewall mangle
add chain=prerouting \
in-interface=$InInterface \
action=mark-connection \
new-connection-mark="conn_2st" \
per-connection-classifier=src-address-and-port:3/1 \
passthrough=yes \
disable=no
add chain=prerouting \
in-interface=$InInterface \
connection-mark="conn_2st" \
action=mark-routing \
new-routing-mark="route_2st" \
passthrough=no \
disable=no
/ip firewall mangle
add chain=prerouting \
in-interface=$InInterface \
action=mark-connection \
new-connection-mark="conn_3st" \
per-connection-classifier=src-address-and-port:3/2 \
passthrough=yes \
disable=no
add chain=prerouting \
in-interface=$InInterface \
connection-mark="conn_3st" \
action=mark-routing \
new-routing-mark="route_3st" \
passthrough=no \
disable=no
#===================================================================================
# 路由设置
#===================================================================================
# 先添加主路由,再添加备用路由
#
#
# 配置主路由
/ip route
add dst-address=0.0.0.0/0 \
gateway="adsl-1-pppoe-out101" \
check-gateway=ping \
type=unicast \
distance=1 \
scope=30 \
target-scope=10 \
routing-mark="route_1st" \
comment="ADSL-\B2\A6\BA\C5\D6\F7\C2\B7\D3\C9" \
disable=no
add dst-address=0.0.0.0/0 \
gateway="adsl-1-pppoe-out102" \
check-gateway=ping \
type=unicast \
distance=1 \
scope=30 \
target-scope=10 \
routing-mark="route_2st" \
disable=no
add dst-address=0.0.0.0/0 \
gateway="pppoe-4M" \
check-gateway=ping \
type=unicast \
distance=1 \
scope=30 \
target-scope=10 \
routing-mark="route_3st" \
disable=no
# 配置备用路由
/ip route
add dst-address=0.0.0.0/0 \
gateway="adsl-1-pppoe-out101" \
check-gateway=ping \
type=unicast \
distance=2 \
scope=30 \
target-scope=10 \
comment="ADSL-\B2\A6\BA\C5\B1\B8\D3\C3\C2\B7\D3\C9" \
disable=no
add dst-address=0.0.0.0/0 \
gateway="adsl-1-pppoe-out102" \
check-gateway=ping \
type=unicast \
distance=2 \
scope=30 \
target-scope=10 \
disable=no
add dst-address=0.0.0.0/0 \
gateway="pppoe-4M" \
check-gateway=ping \
type=unicast \
distance=2 \
scope=30 \
target-scope=10 \
disable=no
#===================================================================================
# NAT 伪装设置
#===================================================================================
# 对每个 pppoe 连接 做伪装
#
#
/ip firewall nat
add chain=srcnat \
out-interface="adsl-1-pppoe-out101" \
action="masquerade" \
comment="ADSL\CB\AB\CF\DF\CE\B1\D7\B0" \
disable=no
add chain=srcnat \
out-interface="adsl-1-pppoe-out102" \
action="masquerade" \
disable=no
add chain=srcnat \
out-interface="pppoe-4M" \
action="masquerade" \
disable=no
我是从 这个教程 做出来的。
;P顶下你:victory: 要么不看,看了一定得帮顶,不管好坏,都发了心思的。 :victory: 期待多条线路测试 应该加分:D 照理说,ISP不会限制物理的端口的,其实楼主的多博没成功啊;或者你当地的ISP不支持的
[*]111
1
2
3 1
2
3
4
是不是啊........... 谢谢分享,在学习当中 看了一定得帮顶 你果断的是给力啊。 这个要好好看下了。 支持,严重支持,顶了先
页:
[1]
2