Bandwidth limiting with ipfw and dummynet

Jon Drukman jsd at cluttered.com
Tue Feb 13 23:21:33 UTC 2007


    I'd like to limit him to 384Kbit/sec.Can someone help me get 
bandwidth limiting working?  I've tried all the examples I could find 
via google but none of them work.  My roomate is frequently uploading 
stuff to his office, and when he does, it completely saturates our 
outbound link and makes everything very pokey.  His IP address is 
10.0.2.195 and we've got FreeBSD set up as a router for our cable modem, 
with natd.

I added the pipe to limit the bw:

  ipfw pipe 1 config bw 384Kbit

I added a rule for his IP:

  ipfw add 10 pipe 1 tcp from 10.0.2.195 to any

Doing ipfw show doesn't show any packets ever matching that rule.

# ipfw show
00010     0        0 pipe 1 tcp from 10.0.2.195 to any
00015     0        0 pipe 1 tcp from any to 10.0.2.195
00050 21745 18784920 divert 8668 ip from any to any via dc0
00100     8     1036 allow ip from any to any via lo0
00200     0        0 deny ip from any to 127.0.0.0/8
00300     0        0 deny ip from 127.0.0.0/8 to any
65000 44051 37589386 allow ip from any to any
65535     0        0 deny ip from any to any

Is the natd divert rule somehow interfering?

-jsd-



More information about the freebsd-questions mailing list