Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jun 2010 15:30:43 +0400
From:      =?koi8-r?B?5M3VyMEg7snLz8zByg==?= <cosmic17@yandex.ru>
To:        freebsd-ipfw@freebsd.org
Subject:   ipfw3 pipe more than 24000Kbit/s
Message-ID:  <640531276774244@web141.yandex.ru>

next in thread | raw e-mail | index | archive | help
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?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?640531276774244>