找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 19532|回复: 48

[负载平衡] ROS3.30双ADSL PCC负载

  [复制链接]
发表于 2011-1-3 21:50:54 | 显示全部楼层 |阅读模式
购买主题 已有 51 人购买  本主题需向作者支付 2 铜板 才能浏览
routeros
发表于 2011-1-4 00:17:44 | 显示全部楼层
没有什么特别还要收钱.
routeros
回复

使用道具 举报

发表于 2011-1-4 14:41:38 | 显示全部楼层
弄个铜板闪人!!!!!
routeros
回复

使用道具 举报

发表于 2011-1-4 15:30:08 | 显示全部楼层
这百度大把啦,还要铜板啊
routeros
回复

使用道具 举报

 楼主| 发表于 2011-1-4 17:16:44 | 显示全部楼层
我只是保护一下我们论坛的权益,不要让别人在百度一搜就能看了而已。我也没说有什么特别,不顶就算了。发个贴还被说,以后还是少发。
还是希望版主整理一下坛风
routeros
回复

使用道具 举报

发表于 2011-1-13 15:59:26 | 显示全部楼层
还要钱的,
routeros
回复

使用道具 举报

发表于 2011-1-13 16:01:13 | 显示全部楼层
钱呀,怎么什么东东都得要钱叫
routeros
回复

使用道具 举报

发表于 2011-1-13 18:46:18 | 显示全部楼层
好像有问题
routeros
回复

使用道具 举报

 楼主| 发表于 2011-1-14 19:55:57 | 显示全部楼层
回复 5222beyond 的帖子

兄弟指出来看看,我没学过什么网络方面的,只是在外面瞎混,呵呵
routeros
回复

使用道具 举报

发表于 2011-1-15 15:51:17 | 显示全部楼层
骗钱的吧......这个有什么好收钱的...
routeros
回复

使用道具 举报

发表于 2011-1-15 17:18:02 | 显示全部楼层
唉.......................................唉..........................这也要钱?
routeros
回复

使用道具 举报

 楼主| 发表于 2011-1-16 16:58:30 | 显示全部楼层
应一个网友要求,发一个双ADSL PCC负载脚本

(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
自己动手建PPPOE拨号,使用默认名字
双线均衡脚本

/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


ROS小包策略
这个根据自己的宽带修改queue tree里的最大宽带数
P2P那里是没有流量的,限不到P2P
/ ip firewall mangle
add chain=forward protocol=tcp tcp-flags=syn action=change-mss new-mss=1440  comment="" disabled=no
add chain=forward p2p=all-p2p action=mark-connection  new-connection-mark=p2p_conn passthrough=yes comment="" disabled=no
add chain=forward connection-mark=p2p_conn action=mark-packet  new-packet-mark=p2p passthrough=yes comment="" disabled=no
add chain=forward connection-mark=!p2p_conn action=mark-packet  new-packet-mark=general passthrough=yes comment="" disabled=no
add chain=forward packet-size=32-512 action=mark-packet new-packet-mark=small  passthrough=yes comment="" disabled=no
add chain=forward packet-size=512-1200 action=mark-packet new-packet-mark=big  passthrough=yes comment="" disabled=no
/ queue tree
add name="p2p1" parent=wan packet-mark=p2p limit-at=600000 queue=default  priority=8 max-limit=800000 burst-limit=0 burst-threshold=0 burst-time=0s  disabled=no
add name="p2p2" parent=lan packet-mark=p2p limit-at=800000 queue=default  priority=8 max-limit=600000 burst-limit=0 burst-threshold=0 burst-time=0s  disabled=no
add name="ClassA" parent=lan packet-mark="" limit-at=0 queue=default  priority=8 max-limit=100000000 burst-limit=0 burst-threshold=0  burst-time=0s disabled=no
add name="ClassB" parent=ClassA packet-mark="" limit-at=0 queue=default  priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s  disabled=no
add name="Leaf1" parent=ClassA packet-mark=general limit-at=0 queue=default  priority=7 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s  disabled=no
add name="Leaf2" parent=ClassB packet-mark=small limit-at=0 queue=default  priority=5 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s  disabled=no
add name="Leaf3" parent=ClassB packet-mark=big limit-at=0 queue=default  priority=6 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s  disabled=no

附我的智能限速脚本,只限上传,下载不限(根据自己情况做,我宽带比较足,就是上行少 郁闷)
:for tianya88 from=2 to=254 do={queue simple add name=("qq" . $tianya88) dst-address=("172.16.1.". $tianya88) limit-at=0/64000 max-limit=0/80000 interface=all parent=none priority=8 queue=default/default burst-limit=0/160000 burst-threshold=0/80000 burst-time=0s/10s total-queue=default target-address=0.0.0.0/0 disabled=no}
最后限一下TCP连接数, 我就不写出来了,限150

以上设置好后如果感觉网页打开慢的话,请把每个PPPOE的MTU值改为1492,再不行看看你的限速脚本,当然,电脑终端也可能有问题,如上行一直处于上传状态,那肯定慢。

以上脚本纯属个人网上收集整理而来,经本人测试一个月没有什么卡机的现象。错的地方还请高手指出,谢谢


routeros
回复

使用道具 举报

 楼主| 发表于 2011-1-16 16:59:46 | 显示全部楼层
发出来了,不用买了。呵呵
routeros
回复

使用道具 举报

 楼主| 发表于 2011-1-16 17:00:20 | 显示全部楼层
有什么问题请各位高手指教。不是什么好东西,确实不是什么好东西。菜鸟用吧
routeros
回复

使用道具 举报

发表于 2011-1-17 13:50:37 | 显示全部楼层
好谢谢以后``我测试测试 楼上可以把QQ用短消息告诉我吗?我们交流下
routeros
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-18 12:37 , Processed in 0.122643 second(s), 6 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

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