找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 9679|回复: 16

[其它] 2011我的ROS之总结

  [复制链接]
发表于 2011-12-31 17:29:28 | 显示全部楼层 |阅读模式

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

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

×
        明天就是2012了,从明年开始我也准备离开网吧这个岗位了,相信2012对我既是机遇也是挑战的一年!!!感谢论坛里朋友的热心回贴,帮我解决了很多问题,通过各种方法,我也对ros有了基本的了解,应该能够独立做一台比较好的ROS了!!!这是我两个月下来做的ROS,因为是网吧环境,电信,网通各10M光纤,重点放在了限速上,我不断调试,最终采用了这种"小包优先"的方法,电信是主线,在110台机器在线时,带宽跑满,DOTA在电信线有点卡,网通线不卡,其他游戏不卡,看电影等其他不卡,当然我的限速还存在很多问题,有些我还是不太明白,还请大家多提意见!!!
       附件中代码为
    # dec/31/2011 17:08:39 by routeros 3.30
# software id = SD2C-SUY2
#
/ip firewall mangle
add action=mark-routing chain=prerouting comment=cnc disabled=no \
    dst-address-list=cnc new-routing-mark=cnc passthrough=no
add action=change-mss chain=forward comment="" disabled=no new-mss=1472 \
    protocol=tcp tcp-flags=syn
add action=mark-connection chain=prerouting comment=p2p_conn disabled=no \
    new-connection-mark=p2p_conn p2p=all-p2p passthrough=yes
add action=mark-packet chain=prerouting comment="" connection-mark=p2p_conn \
    disabled=no new-packet-mark=p2p passthrough=no
add action=mark-packet chain=prerouting comment=!p2p_conn connection-mark=\
    !p2p_conn disabled=no new-packet-mark=general passthrough=yes
add action=mark-packet chain=prerouting comment=big disabled=no \
    new-packet-mark=big packet-size=512-1200 passthrough=yes
add action=mark-connection chain=prerouting comment="http_video in" disabled=\
    no layer7-protocol=video new-connection-mark=video passthrough=yes \
    protocol=tcp
add action=mark-packet chain=prerouting comment="" connection-mark=video \
    disabled=no new-packet-mark=http_video_in passthrough=yes protocol=tcp
add action=mark-packet chain=prerouting comment=small disabled=no \
    new-packet-mark=small packet-size=32-512 passthrough=yes
add action=mark-connection chain=prerouting comment=\
    "\D3\C5\CF\C8\B6\CB\BF\DA" disabled=no dst-port=443 new-connection-mark=\
    Port_Conn passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="" disabled=no dst-port=\
    3724 new-connection-mark=Port_Conn passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment=qq disabled=no dst-port=\
    8000 new-connection-mark=Port_Conn passthrough=yes protocol=udp
add action=mark-packet chain=prerouting comment="" connection-mark=Port_Conn \
    disabled=no new-packet-mark=Port_Packet passthrough=no
add action=mark-connection chain=prerouting comment=war3 disabled=no \
    dst-port=\
    2327,2040,2191,1845,1998,50801,2111,1590,4377,1925,1561,2191,9628 \
    new-connection-mark=Port_Conn passthrough=yes protocol=udp
add action=mark-connection chain=prerouting comment=hf_war3 disabled=no \
    dst-port=8861,1932,2287,14531,1897,2428,13735,1039,1100 \
    new-connection-mark=Port_Conn passthrough=yes protocol=udp
add action=mark-connection chain=prerouting comment=hf_war3 disabled=no \
    dst-port=1210,1381,1473,1509,1785,18979,1140,1371,1510,16434,9865 \
    new-connection-mark=Port_Conn passthrough=yes protocol=udp
add action=mark-connection chain=prerouting comment=hf disabled=no dst-port=\
    9000,1511,1203,1607 new-connection-mark=Port_Conn passthrough=yes \
    protocol=udp
add action=mark-connection chain=prerouting comment=cf disabled=no dst-port=\
    12000-12175,2349 new-connection-mark=Port_Conn passthrough=yes protocol=\
    udp
add action=mark-connection chain=prerouting comment=cf disabled=no dst-port=\
    7101-7103,10008,28012 new-connection-mark=Port_Conn passthrough=yes \
    protocol=tcp
add action=mark-connection chain=prerouting comment=http disabled=no \
    dst-address-list="" layer7-protocol=web new-connection-mark=web \
    passthrough=yes protocol=tcp
add action=mark-packet chain=prerouting comment="" connection-mark=web \
    disabled=no new-packet-mark=http_in passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting comment="http_heavy in" disabled=\
    no layer7-protocol=img1 new-connection-mark=img passthrough=yes protocol=\
    tcp
add action=mark-packet chain=prerouting comment="" connection-mark=img \
    disabled=no new-packet-mark=http_heavy_in passthrough=yes protocol=tcp











/queue type
add kind=pcq name=pcq-download pcq-classifier=dst-address pcq-limit=50 \
    pcq-rate=0 pcq-total-limit=5000
add kind=pcq name=pcq-upload pcq-classifier=src-address pcq-limit=50 \
    pcq-rate=0 pcq-total-limit=5000

/queue simple
:for chen from=0 to=253 do={/queue simple add name=("PC" . $chen) dst-address=("192.168.15." . $chen) limit-at=640000/640000 interface=all  max-limit=16M/800k burst-limit=0/0 burst-threshold=0/0 burst-time=0/0 queue=pcq-upload/pcq-download}
(限制上传,关键可以对每台机器操作,均分带宽)
/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=800k \
    max-limit=4M name=p2p packet-mark=p2p parent=host priority=8 queue=\
    default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
    max-limit=20M name=ClassA parent=host priority=8

add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=5M \
    max-limit=20M name=Leaf1 packet-mark=general parent=ClassA priority=7 \
    queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=5M \
    max-limit=20M name=Leaf2 packet-mark=big parent=ClassA priority=6 queue=\
    default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
    max-limit=0 name=Leaf3 packet-mark=small parent=ClassA priority=5 queue=\
    default
mangle.png
l7.png
pcq-download.png
pcq-upload.png
simple queue.png
queue tree.png
small.png

mangle.rar

863 Bytes, 下载次数: 14

queue.rar

725 Bytes, 下载次数: 12

routeros
发表于 2011-12-31 17:34:53 | 显示全部楼层
你还在说什么小包优先 就是还没有搞清楚
routeros
回复

使用道具 举报

 楼主| 发表于 2011-12-31 17:39:41 | 显示全部楼层
注意几点:在mangle标记前后,是件很有趣也很重要的事情,调整下顺序往往会让你有新的发现;
而且Passthrough设为yes 或no也会让你有新的发现,如果你看不到标记的流量,设为no也许就有了,哈哈,祝你好运!!!
我的疑问____小包能包括所有网络游戏吗,大包又是指哪些!!!!!
适合网吧的限速方案_____小包优先,端口优先,服务器列表,还有待大家的完善,感觉这方面网上还是很少
总的来说游戏优先,网页优先,QQ优先,其他的无所谓了,带宽有多少就能分多少给其他!!!
routeros
回复

使用道具 举报

 楼主| 发表于 2011-12-31 17:43:50 | 显示全部楼层
网大下载的,很好的资料,还有很多看不明白,比如global in 指限的哪的速度,等 网吧培训资料.pdf (1.19 MB, 下载次数: 21, 售价: 2 铜板)
routeros
回复

使用道具 举报

 楼主| 发表于 2011-12-31 17:53:03 | 显示全部楼层
网上找了很多限速,这个是第一次遇到的用"服务器列表限速方法" ROS3.30 游戏优先,网页优先,视频优先.rar (7.66 KB, 下载次数: 14) ,没有实测,不知道效果如何,思路很好!!跟大家一起分享!!!
routeros
回复

使用道具 举报

发表于 2011-12-31 18:25:35 | 显示全部楼层
11    name="queue2" target-addresses=123.179.142.176/32 dst-address=0.0.0.0/0
      interface=lan1 parent=none direction=both priority=8
      queue=default/default limit-at=640k/640k max-limit=1200k/800k
      burst-limit=16M/16M burst-threshold=800k/800k burst-time=10s/10s
      total-queue=default
我是这样限速的 你的怎么是 target-addresses=123.179.142.176/32 dst-address=0.0.0.0/0  反了吧
routeros
回复

使用道具 举报

发表于 2011-12-31 18:57:01 | 显示全部楼层
DOTA做主机卡是比较正常的了,因为做主机要消耗非常大的带宽,一般都会被判断为P2P了。而如果是ADSL线路,即使判断对了,带宽也不够,还是会卡。
routeros
回复

使用道具 举报

发表于 2011-12-31 19:00:19 | 显示全部楼层

VPN√、VLAN√、DHCP Relay×、认证计费√、防攻击×、上网控制√、透明代理×、访问日志×、无线√、单IP多域名发布×、EoIP等各种隧道×、ARP代理×、OSPF等各种动态路由协议×。
√学会了×不会。。。看WIKI看的头都大了!!!

routeros
回复

使用道具 举报

发表于 2011-12-31 23:00:18 | 显示全部楼层
bobwalker 发表于 2011-12-31 18:00
HTB确实很强大,但仍只是routeros的一个功能。
下面的功能都会用了,才能应付复杂的小区网络和企业网络:V ...

能不能做我的技术支持,呵呵...在ROS上有很多东西还没明白啊
routeros
回复

使用道具 举报

 楼主| 发表于 2012-1-1 09:35:30 | 显示全部楼层
bobwalker 发表于 2011-12-31 18:00
HTB确实很强大,但仍只是routeros的一个功能。
下面的功能都会用了,才能应付复杂的小区网络和企业网络:V ...

      进淘宝店看了下,很多宝贝和服务;确实好的优化应当收费;好的网速才能带来好的收益,花个六七百元,还是值得;网吧里真正懂技术的人员还是不多的,像我们的技术员虽然很牛,但我觉得他在ROS这方面还是有很多不足的,或者说他只是为了省事,就做个simple queue完事了!!!(当然他肯定比我强好多!!!)
       发现一个问题:我做的限速,穿越火线进游戏时除了新区外,都是红色爆满,但是进游戏不卡!!!这是什么原因呢???
routeros
回复

使用道具 举报

发表于 2012-1-1 09:56:34 | 显示全部楼层
看样子有的学了啊。 新手入门。在小公司用用,学到现在了还是不敢上线用。
routeros
回复

使用道具 举报

发表于 2012-1-1 17:40:14 | 显示全部楼层
不知道能做什么,花了十块钱,买了个邀请码,进来了。
routeros
回复

使用道具 举报

发表于 2012-1-1 17:48:12 | 显示全部楼层
对限速研究甚少,只知道用简单队列,有时候用下PCQ,HTB没有实际用过,只是玩下
routeros
回复

使用道具 举报

 楼主| 发表于 2012-1-1 19:33:32 | 显示全部楼层
jike106397 发表于 2012-1-1 17:40
不知道能做什么,花了十块钱,买了个邀请码,进来了。

这个论坛不错的,因为最重要的一点:如果你有什么问题关于路由方面,这里会有人及时回答你的问题;而其他一些论坛多是发一些教程了,转载了,等等,实际对菜鸟没有多大作用!!!!HTB很强大的,为了网吧效益,体现出网吧的网速,还是很有必要好好研究下限速的!!
routeros
回复

使用道具 举报

发表于 2012-1-1 21:15:23 | 显示全部楼层
研究ROS也有几年了,感觉ROS的功能用了很少,一部分是二级代理商的模式!
对于企业应用,市场不小!现在无线已经热起来,估计ROS会更火!
routeros
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-29 17:50 , Processed in 0.131080 second(s), 9 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

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