有没有办法限制别的用户的使用流量呢

[复制链接]
查看11 | 回复0 | 2009-1-30 06:28:38 | 显示全部楼层 |阅读模式
多人共享一个宽带,使用路由器连接,别人一直下载东西,造成我这边很慢,而且我也想下东西,速度也变得很快.如何限制他们的使用流量呢

                                                                                                1.首先确定服务器内核已经打开qos2.从光盘上安装iproute2.光盘上有rpm包,直接rpm
-ivh
iproute2.......rpm就行了要是没出什么错的话就可以用了iproute2主要是靠tc命令来工作,具体的语法自己去看看readme,
这里我不多说了,下面我贴一个例子:tc qdisc add dev eth3 root handle 1: cbq bandwidth 10Mbit allot 1514 cell 8 avpkt 1000 mpu 64 tc class add dev eth3 parent 1:0 classid 1:1 cbq bandwidth 10Mbit rate 10Mbit maxburst 20 allot 1514 prio 0 avpkt 1000cell 8 weight 1Mbittc class add dev eth3 parent 1:1 classid 1:2 cbq bandwidth 10Mbit rate 100Kbit maxburst 20 allot 1514 prio 2 avpkt 1000 cell 8 weight 10Kbittc filter add dev eth3 parent 1:0 protocol ip prio 100 routetc filter add dev eth3 parent 1:0 protocol ip prio 100 routeto 2 flowid 1:2 ip route add 192.168.3.88/24 dev eth3 via 192.168.3.1 realm 2这里是指定192.168.3.88/255.255.255.0这台机器的带宽为10K,通过服务器的eth3出去的,机器多就为每个ip增加一个class,并指定带宽就可以最后就是把这几句都加到/etc/rc.d/rc.local里,让机器开机就执行就可以了                                       
提问者对答案的评价:
回复

使用道具 举报

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

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行