找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 4016|回复: 1

[限速] 关于PCQ限速的疑问。

[复制链接]
发表于 2005-5-3 14:39:41 | 显示全部楼层 |阅读模式

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

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

×
2822ghost版按以下设置adsl上网:看到很多人在问,简单说说吧,以通常的固定ip的为例:1)安装 -- 9块盘,注意硬盘内容会被删除!还有,机器内存不能小于 24 M安装过程中提示注册,注意注册码的大小写2)启动后,使用 admin 密码为空,进入3)设第一块网卡的ip: 在提示付下输入setup命令,如果你的网卡是PCI的,会提示你设置ether1(就是第一块网卡),输入ipaddress(ip地址):192.168.0.1、netmask(子网掩码):255.255.255.0、gateway:192.168.0.254、network:192.168.0.0、broadcast:192.168.0.255。默认直接回车就行了。 4)从windows端机器,ip设成192.168.0.x ,在 ie 地址栏输上 192.168.0.1出现 routeos 的欢迎画面。点击,提示下载 winbox ,保存如果不能连接,就把网线连接到另外一块网卡5)运行 winbox 输上 192.168.0.1 用户名 admin 密码 不输,选连接。会出现路由的管理界面。如果你的机器上使用网络防火墙,这里需要关闭或者修改规则6启用网卡:点击 interface ,点击第二块卡,选择对号,启用(颜色不是虚的了)7)设置地址:ip --》 address ,选择 + 号,输入第二块卡的ip地址(isp给你的)为了便于管理,最好从这里把两块卡的别名,改成 public 和 local ,另外,这里支持一个网卡多个ip,如果因为管理需要,你可以这样设8)增加静态路由:ip--》routes 选择 + 号,选中gateway,输上网关地址在这里,destination 可以使用默认 0.0.0.0 ,表示路由所有的地址,也可以根据你的需要,只对你指定的ip范围路由。静态路由可以有多条,比如可以分别指定多个ip段,达到管理的目的9)设置NAT共享上网: ip --》firewall -source nat ,选择 + 号,选择action,action里面选择 masquerade ,其余选择默认即可至此,共享上网就完成了剩下的,需要增加设置 防火墙规则,否则,安全没有保障ip -》firewall -》filter fules ,选择 + 号,in interface 选择内网网卡(local),其他默认这条路由允许来自内网的连接,如果有限制,可以修改 src address 的ip段,或者content 内容过滤ip -》firewall -》filter chains 选中 input ,选择 drop 这条规则禁止所有的外部连接按以下设置PCQ限速:1. Mark all packets with flow all:用flow all 标记所有数据包/ip firewall mangle add action=accept mark-flow=all2. Create two PCQ queue types - one for download and one for upload. For download traffic:创建两条PCQ类型,下载和上传queues will be classified by dst-address and for upload - by src-address:/queue type add name=PCQ-Download kind=pcq pcq-rate=65536 \pcq-classifier=dst-address/queue type add name=PCQ-Upload kind=pcq pcq-rate=32768 \pcq-classifier=src-address3. Add two queue rules - one for download and one for upload:添加PCQ规则,下载和上传/queue tree add parent=Local queue=PCQ-Download flow=all/queue tree add parent=Public queue=PCQ-Upload flow=all 结果只能限制下载速度,上传限制无效按以下设置PCQ限速:1. Mark all packets with flow all:用flow all 标记所有数据包/ip firewall mangle add action=accept mark-flow=all in interface=lan(内网)2. Create two PCQ queue types - one for download and one for upload. For download traffic:创建两条PCQ类型,下载和上传queues will be classified by dst-address and for upload - by src-address:/queue type add name=PCQ-Download kind=pcq pcq-rate=65536 \pcq-classifier=dst-address/queue type add name=PCQ-Upload kind=pcq pcq-rate=32768 \pcq-classifier=src-address3. Add two queue rules - one for download and one for upload:添加PCQ规则,下载和上传/queue tree add parent=Local queue=PCQ-Download flow=all/queue tree add parent=Public queue=PCQ-Upload flow=all 结果只能限制上传速度,下载限制无效请教问题出在哪里呢? 
routeros
发表于 2005-5-4 13:50:47 | 显示全部楼层
我就是按这个啊,没问题啊!1. Mark all packets with flow all:用flow all 标记所有数据包/ip firewall mangle add action=accept mark-flow=all2. Create two PCQ queue types - one for download and one for upload. For download traffic:创建两条PCQ类型,下载和上传queues will be classified by dst-address and for upload - by src-address:/queue type add name=PCQ-Download kind=pcq pcq-rate=65536 \pcq-classifier=dst-address/queue type add name=PCQ-Upload kind=pcq pcq-rate=32768 \pcq-classifier=src-address3. Add two queue rules - one for download and one for upload:添加PCQ规则,下载和上传//queue tree add parent=Local queue=PCQ-Download flow=all/queue tree add parent=Public queue=PCQ-Upload flow=all
routeros
回复

使用道具 举报

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

本版积分规则

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

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

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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