免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2085 | 回复: 1
打印 上一主题 下一主题

[OpenBSD] openbsd 单IP限速 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-04-03 11:48 |只看该作者 |倒序浏览
6M的光纤。这样限卡的不能用。。还不如不限。。
把总带宽设为60M,每台单机限速1M。。
那样到是还可以,限速到1M,客户机载125K左右
不明白PF总带宽是怎么计算的》》
_________________________________________________
altq on $ext_if hfsc bandwidth 8Mb queue { u1, u2, u3, u4, u5, u6, u7, u8, u9, u10, u11, u12, u13, u14, u15, u16, u17, u18, u19, u20, u21, u22, u23, u24, u25, u26, u27, u28, u29, u30, u31, u32, u33, u34, u35, u36, u37, u38, u39, u40, u41, u42, u43, u44, u45, u46, u47, u48, u49, u50, u51, u52, u53, uother }
queue u1 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u2 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u3 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u4 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u5 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u6 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u7 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u8 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u9 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u10 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u11 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u12 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u13 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u14 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u15 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u16 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u17 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u18 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u19 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u20 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u21 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u22 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u23 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u24 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u25 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u26 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u27 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u28 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u29 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u30 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u31 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u32 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u33 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u34 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u35 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u36 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u37 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u38 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u39 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u40 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u41 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u42 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u43 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u44 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u45 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u46 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u47 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u48 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u49 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
queue u50 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
###shoufei
queue u51 bandwidth 100Kb hfsc ( upperlimit 128Kb red )
###games
queue u52 bandwidth 500Kb hfsc ( upperlimit 128Kb red )
###movie
queue u53 bandwidth 500Kb hfsc ( upperlimit 128Kb red )
queue uother bandwidth 1900Kb hfsc ( default upperlimit 3000Kb )

altq on $int_if hfsc bandwidth 8Mb queue{ c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36, c37, c38, c39, c40, c41, c42, c43, c44, c45, c46, c47, c48, c49, c50, c51, c52, c53,  other }
queue c1 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c2 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c3 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c4 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c5 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c6 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c7 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c8 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c9 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c10 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c11 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c12 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c13 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c14 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c15 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c16 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c17 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c18 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c19 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c20 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c21 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c22 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c23 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c24 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c25 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c26 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c27 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c28 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c29 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c30 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c31 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c32 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c33 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c34 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c35 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c36 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c37 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c38 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c39 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c40 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c41 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c42 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c43 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c44 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c45 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c46 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c47 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c48 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c49 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c50 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c51 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c52 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue c53 bandwidth 100Kb hfsc( upperlimit 128Kb red )
queue other bandwidth 2700Kb hfsc( default upperlimit 3000Kb)

pass in quick on $int_if inet from 192.168.1.2 to any keep state tag 192.168.1.2 queue c1
pass out quick on $ext_if inet all keep state tagged 192.168.1.2 queue u1

pass in quick on $int_if inet from 192.168.1.3 to any keep state tag 192.168.1.3 queue c2
pass out quick on $ext_if inet all keep state tagged 192.168.1.3 queue u2

pass in quick on $int_if inet from 192.168.1.4 to any keep state tag 192.168.1.4 queue c3
pass out quick on $ext_if inet all keep state tagged 192.168.1.4 queue u3

pass in quick on $int_if inet from 192.168.1.5 to any keep state tag 192.168.1.5 queue c4
pass out quick on $ext_if inet all keep state tagged 192.168.1.5 queue u4

pass in quick on $int_if inet from 192.168.1.6 to any keep state tag 192.168.1.6 queue c5
pass out quick on $ext_if inet all keep state tagged 192.168.1.6 queue u5

pass in quick on $int_if inet from 192.168.1.7 to any keep state tag 192.168.1.7 queue c6
pass out quick on $ext_if inet all keep state tagged 192.168.1.7 queue u6

pass in quick on $int_if inet from 192.168.1.8 to any keep state tag 192.168.1.8 queue c7
pass out quick on $ext_if inet all keep state tagged 192.168.1.8 queue u7

pass in quick on $int_if inet from 192.168.1.9 to any keep state tag 192.168.1.9 queue c8
pass out quick on $ext_if inet all keep state tagged 192.168.1.9 queue u8

pass in quick on $int_if inet from 192.168.1.10 to any keep state tag 192.168.1.10 queue c9
pass out quick on $ext_if inet all keep state tagged 192.168.1.10 queue u9

pass in quick on $int_if inet from 192.168.1.11 to any keep state tag 192.168.1.11 queue c10
pass out quick on $ext_if inet all keep state tagged 192.168.1.11 queue u10

pass in quick on $int_if inet from 192.168.1.12 to any keep state tag 192.168.1.12 queue c11
pass out quick on $ext_if inet all keep state tagged 192.168.1.12 queue u11

pass in quick on $int_if inet from 192.168.1.13 to any keep state tag 192.168.1.13 queue c12
pass out quick on $ext_if inet all keep state tagged 192.168.1.13 queue u12

pass in quick on $int_if inet from 192.168.1.14 to any keep state tag 192.168.1.14 queue c13
pass out quick on $ext_if inet all keep state tagged 192.168.1.14 queue u13

pass in quick on $int_if inet from 192.168.1.18 to any keep state tag 192.168.1.18 queue c14
pass out quick on $ext_if inet all keep state tagged 192.168.1.18 queue u14

pass in quick on $int_if inet from 192.168.1.19 to any keep state tag 192.168.1.19 queue c15
pass out quick on $ext_if inet all keep state tagged 192.168.1.19 queue u15

pass in quick on $int_if inet from 192.168.1.20 to any keep state tag 192.168.1.20 queue c16
pass out quick on $ext_if inet all keep state tagged 192.168.1.20 queue u16

pass in quick on $int_if inet from 192.168.1.21 to any keep state tag 192.168.1.21 queue c17
pass out quick on $ext_if inet all keep state tagged 192.168.1.21 queue u17

pass in quick on $int_if inet from 192.168.1.22 to any keep state tag 192.168.1.22 queue c18
pass out quick on $ext_if inet all keep state tagged 192.168.1.22 queue u18

pass in quick on $int_if inet from 192.168.1.23 to any keep state tag 192.168.1.23 queue c19
pass out quick on $ext_if inet all keep state tagged 192.168.1.23 queue u19

pass in quick on $int_if inet from 192.168.1.24 to any keep state tag 192.168.1.24 queue c20
pass out quick on $ext_if inet all keep state tagged 192.168.1.24 queue u20

pass in quick on $int_if inet from 192.168.1.25 to any keep state tag 192.168.1.25 queue c21
pass out quick on $ext_if inet all keep state tagged 192.168.1.25 queue u21

pass in quick on $int_if inet from 192.168.1.26 to any keep state tag 192.168.1.26 queue c22
pass out quick on $ext_if inet all keep state tagged 192.168.1.26 queue u22

pass in quick on $int_if inet from 192.168.1.27 to any keep state tag 192.168.1.27 queue c23
pass out quick on $ext_if inet all keep state tagged 192.168.1.27 queue u23

pass in quick on $int_if inet from 192.168.1.28 to any keep state tag 192.168.1.28 queue c24
pass out quick on $ext_if inet all keep state tagged 192.168.1.28 queue u24

pass in quick on $int_if inet from 192.168.1.29 to any keep state tag 192.168.1.29 queue c25
pass out quick on $ext_if inet all keep state tagged 192.168.1.29 queue u25

pass in quick on $int_if inet from 192.168.1.30 to any keep state tag 192.168.1.30 queue c26
pass out quick on $ext_if inet all keep state tagged 192.168.1.30 queue u26

[ 本帖最后由 sjfff99 于 2009-4-3 11:50 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2009-04-06 14:33 |只看该作者

回复 #1 sjfff99 的帖子

不错 改天测试 一下  顶起来
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP