Dummynet - How Can I Verify It's Working?

Drew Tomlinson drew at mykitchentable.net
Wed Mar 26 19:41:03 PST 2003


I've implemented dummynet to prioritize traffic on my home network.  It is
my intent to give priority to a 100K video stream on my 128K upstream ADSL
Internet connection.

I created one pipe with no bandwidth limit.  Then I created two queues, one
for the video stream traffic and one for everything else.  I gave the stream
queue a weight of 99 and the other a weight of 1.  'bigdaddy' is the machine
that serves the video stream from port 8080 on my internal network.  Here's
the relevant lines from my firewall script:

$fwcmd pipe 1 config queue 64Kbyte
$fwcmd queue 1 config pipe 1 weight 99 queue 56KByte
$fwcmd queue 2 config pipe 1 weight 1 queue 8Kbyte
$fwcmd add queue 1 ip from bigdaddy 8080 to any out via $oif
$fwcmd add queue 2 ip from not bigdaddy not 8080 to any out via $oif
$fwcmd add queue 2 ip from bigdaddy not 8080 to any out via $oif


I can see the counters for the 'add queue' rules incrementing as I would
expect.  However an 'ipfw pipe show' only shows traffic from the stream and
my current ssh connection from the outside.

blacksheep# ipfw pipe show
00001: unlimited    0 ms  64 KB 0 queues (1 buckets) droptail
    mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
q00001: weight 99 pipe 1  56 KB 1 queues (1 buckets) droptail
    mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte
Drp
  0 tcp      192.168.1.3/8080    xxx.xxx.xxx.40/1435  130653 158645885  0
0   0
q00002: weight 1 pipe 1  8 KB 1 queues (1 buckets) droptail
    mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte
Drp
  0 tcp     192.168.10.2/22     xxx.xxx.xxx.110/3037  46386  8948741  0    0
0

I've tried testing by using ftp to transfer a file while the stream is
running.  I would expect to see the ftp transfer using only the remaining
28K of bandwidth but it uses more and interrupts the video stream.  I can
verify the ftp traffic is entering queue 2 via firewall logs and counters.

Also, I would expect to see the ftp connection listed when doing 'ipfw pipe
show' but it is not.  Thus I wonder if dummynet is really working as I
intend.

Can someone enlighten me on the use of dummynet for my purpose?  Links to
docs would be fine as I've been unable to turn any up with Google.

I'm really confused and stuck at this point so I'd appreciate any pointers.

Thanks,
Drew



More information about the freebsd-questions mailing list