找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 5821|回复: 8

[负载平衡] ros3.30双ADSL PCC负载求助

[复制链接]
发表于 2010-12-13 19:35:11 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
本帖最后由 qinfei 于 2010-12-13 19:35 编辑

1.jpg
如图:我用单线程下载
第二条线都没有什么流量,下面是脚本:
(V3.24以上版本的PCC功能)
设置lan接口IP与DNS

/ip address add address=172.16.1.1/255.255.255.0 interface=lan comment=lan
/ip dns set primary-dns=202.96.134.133 secondary-dns=202.96.128.68 allow-remote-requests=yes

双线均衡脚本

/ip firewall mangle

add action=change-mss chain=forward comment="" disabled=no new-mss=1400 protocol=tcp tcp-flags=syn

add action=mark-connection chain=input comment="" disabled=no in-interface=pppoe-out1 new-connection-mark=pppoe-out1_conn passthrough=yes

add action=mark-connection chain=input comment="" disabled=no in-interface=pppoe-out2 new-connection-mark=pppoe-out2_conn passthrough=yes

add action=mark-routing chain=output comment="" connection-mark=pppoe-out1_conn disabled=no new-routing-mark=to_pppoe-out1 passthrough=yes

add action=mark-routing chain=output comment="" connection-mark=pppoe-out2_conn disabled=no new-routing-mark=to_pppoe-out2 passthrough=yes

add action=mark-connection chain=prerouting comment="" disabled=no dst-address-type=!local new-connection-mark=pppoe-out1_conn passthrough=yes per-connection-classifier=both-addresses:2/0 src-address=172.16.1.0/24

add action=mark-connection chain=prerouting comment="" disabled=no dst-address-type=!local new-connection-mark=pppoe-out2_conn passthrough=yes per-connection-classifier=both-addresses:2/1 src-address=172.16.1.0/24

add action=mark-routing chain=prerouting comment="" connection-mark=pppoe-out1_conn disabled=no new-routing-mark=to_pppoe-out1 passthrough=yes src-address=172.16.1.0/24

add action=mark-routing chain=prerouting comment="" connection-mark=pppoe-out2_conn disabled=no new-routing-mark=to_pppoe-out2 passthrough=yes src-address=172.16.1.0/24

/ip route

add comment=adsl1 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=to_pppoe-out1

add comment=adsl2 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out2 routing-mark=to_pppoe-out2

add check-gateway=ping comment=adsl1 disabled=no distance=10 dst-address=0.0.0.0/0 gateway=pppoe-out1

add check-gateway=ping comment=adsl2 disabled=no distance=10 dst-address=0.0.0.0/0 gateway=pppoe-out2

/ip firewall nat

add action=masquerade chain=srcnat comment="" disabled=no out-interface=pppoe-out1

add action=masquerade chain=srcnat comment="" disabled=no out-interface=pppoe-out2

routeros
发表于 2010-12-14 11:36:02 | 显示全部楼层
贴规则太抽象了,发截图吧,再仔细看看PCC教程,别邯郸学步,自己试着理解一下原理。
routeros
回复

使用道具 举报

发表于 2010-12-14 14:09:09 | 显示全部楼层
add action=mark-connection chain=input comment="" disabled=no in-interface=pppoe-out1 new-connection-mark=pppoe-out1_conn passthrough=yes

add action=mark-connection chain=input comment="" disabled=no in-interface=pppoe-out2 new-connection-mark=pppoe-out2_conn passthrough=yes

add action=mark-routing chain=output comment="" connection-mark=pppoe-out1_conn disabled=no new-routing-mark=to_pppoe-out1 passthrough=yes

add action=mark-routing chain=output comment="" connection-mark=pppoe-out2_conn disabled=no new-routing-mark=to_pppoe-out2 passthrough=yes

以上应该不需要吧??你有读ROS封包的处理规则吗?这几条是要处理ros本机的!


pppoe     gate-way  会变动你没有加如 script 去处理呢!
建议先看懂原理在做!
routeros
回复

使用道具 举报

 楼主| 发表于 2010-12-14 18:42:35 | 显示全部楼层
我就是正在理解,我感觉我没理解错,可能是哪个方面(如设置路由或者PPPOE接口)出错了。多谢指教,我想知道ADSL与固定IP的PCC也没多大区别吧?官方只有固定IP的PCC。其实我这个AD脚本是网上下来的。呵呵,这个ADSL双线设置我与官方的固定IP的PCC对比过。没什么特别大的区别。就是PPPOE前面的步骤不太理解。
pppoe     gate-way  会变动,现在不是说新的做法不用script去处理了吗?

那个官方固定IP的PCC我改造过来成ADSL的,老是登不上路由,能上网一段时间就断线了,想不明白,还望赐教。

哎,真菜我
routeros
回复

使用道具 举报

发表于 2010-12-15 14:45:09 | 显示全部楼层
routeros
回复

使用道具 举报

发表于 2010-12-15 23:05:39 | 显示全部楼层
routeros
回复

使用道具 举报

 楼主| 发表于 2010-12-22 20:40:12 | 显示全部楼层
谢谢各位,我现在搞好了。不用刷新网关的脚本的,呵呵。之前可能是我导太多DSCP和L7的东西进去了,现在不用DSCP了,我宽带足,呵呵
routeros
回复

使用道具 举报

发表于 2011-1-3 10:29:44 | 显示全部楼层
回复 qinfei 的帖子

分享出来给大家借鉴一下.
routeros
回复

使用道具 举报

 楼主| 发表于 2011-1-3 21:51:46 | 显示全部楼层
自己去看吧,我发了
ROS3.30双ADSL PCC负载
http://bbs.routerclub.com/forum. ... &fromuid=129073
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-5-18 21:22 , Processed in 0.063645 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表