Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4177123
  • 博文数量: 601
  • 博客积分: 15410
  • 博客等级: 上将
  • 技术积分: 6884
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-16 08:11
个人简介

独学而无友,则孤陋而寡闻!

文章分类

全部博文(601)

文章存档

2020年(1)

2018年(4)

2017年(7)

2016年(42)

2015年(25)

2014年(15)

2013年(36)

2012年(46)

2011年(117)

2010年(148)

2009年(82)

2008年(37)

2007年(41)

分类: BSD

2011-01-10 19:10:45

Hello.
We have the computer - if_bridge1.
uname -a:
FreeBSD 8.0-STABLE FreeBSD 8.0-STABLE #4: Thu May 13 13:08:53 MSD 2010 /usr/src/sys/amd64/compile/MYKERNEL amd64

There are only ipfw+dummynet on this computer. IPFW was updated to version 3 from Luigi Rizzo because of packet scheduling.

Kernel options for ipfw are:
# IPFW
options IPFIREWALL
options IPFIREWALL_VERBOSE
options IPFIREWALL_VERBOSE_LIMIT=10
options IPFIREWALL_DEFAULT_TO_ACCEPT
options DUMMYNET
options HZ=2000

When we try to shape speed less than 24000Kbit/s - it is OK. But when we try to shape speed more than 24000Kbit/s - we have no result.
/etc/rc.firewall:
$IPFW pipe 27 config bw 32000Kbit/s mask dst-ip 0xffffffff
$IPFW pipe 28 config bw 34000Kbit/s mask src-ip 0xffffffff

########pipe 27
$IPFW sched 27 config type QFQ mask dst-ip 0xffffff00
$IPFW queue 271 config sched 27 weight 10
$IPFW queue 272 config sched 27 weight 8
$IPFW queue 273 config sched 27 weight 4
$IPFW queue 274 config sched 27 weight 1
$IPFW add queue 271 ip from any to table\(112\) via igb0 out proto udp src-port 5060
$IPFW add queue 272 ip from any to table\(112\) via igb0 out proto tcp src-port 80,443,8080
$IPFW add queue 273 ip from any to table\(112\) via igb0 out proto tcp src-port 5223, 2009, 2106, 3724, 6112, 6881-6999, 7777, 27000-27050, 42292
$IPFW add queue 273 ip from any to table\(112\) via igb0 out proto udp src-port 53, 5223, 3478, 3479, 3658, 1200, 5000-5009, 6112-6119, 6881-6999, 7777, 7788
$IPFW add queue 273 ip from any to table\(112\) via igb0 out proto icmp
$IPFW add queue 274 ip from any to table\(112\) via igb0 out
########pipe 28
$IPFW sched 28 config type QFQ mask src-ip 0xffffff00
$IPFW queue 281 config sched 28 weight 10
$IPFW queue 282 config sched 28 weight 8
$IPFW queue 283 config sched 28 weight 4
$IPFW queue 284 config sched 28 weight 1
$IPFW add queue 281 ip from table\(113\) to any via igb1 out proto udp dst-port 5060
$IPFW add queue 282 ip from table\(113\) to any via igb1 out proto tcp dst-port 80,443,8080
$IPFW add queue 283 ip from table\(113\) to any via igb1 out proto tcp dst-port 5223, 2009, 2106, 3724, 6112, 6881-6999, 7777, 27000-27050, 42292
$IPFW add queue 283 ip from table\(113\) to any via igb1 out proto udp dst-port 53, 5223, 3478, 3479, 3658, 1200, 5000-5009, 6112-6119, 6881-6999, 7777, 7788
$IPFW add queue 283 ip from table\(113\) to any via igb1 out proto icmp
$IPFW add queue 284 ip from table\(113\) to any via igb1 out

P.S. we have another computer if_bridge2.
uanme -a:
FreeBSD 7.2-STABLE-200906 FreeBSD 7.2-STABLE-200906 #1: Tue Oct 6 10:26:41 MSD 2009 /usr/src/sys/amd64/compile/MYKERNEL amd64

We have no any problems with ipfw or shaping on this machine. We use this config on it:
$IPFW pipe 27 config bw 32000Kbit/s mask dst-ip 0xffffffff
$IPFW pipe 28 config bw 34000Kbit/s mask src-ip 0xffffffff

$IPFW add pipe 27 ip from any to table\(112\) via igb0 out
$IPFW add pipe 28 ip from table\(113\) to any via igb1 out
$IPFW add pipe 27 ip from any to table\(112\) via igb2 out
$IPFW add pipe 28 ip from table\(113\) to any via igb3 out
$IPFW add allow ip from any to table\(112\)
$IPFW add allow ip from table\(113\) to any

We try to shape speed on if_bridge1 with config like on if_bridge2 - but the problem repeated.

Maybe you deal with this problem?
阅读(2579) | 评论(2) | 转发(0) |
给主人留下些什么吧!~~

lsstarboy2011-01-18 15:03:35

beyondfly: 果真有这么快吗?.....
24M还快吗?我现在用的防火墙正常的流量是30Mbyte/s。

beyondfly2011-01-17 19:33:14

果真有这么快吗?