Date: Wed, 22 Oct 2003 02:56:35 -0700 From: eculp@encontacto.net To: freebsd-ipfw@freebsd.org Subject: Re: Equal bandwidth sharing by all hosts using dummynet Message-ID: <1066816595.503ljw1oahog@mail.encontacto.net> In-Reply-To: <20031022044502.95474.qmail@web20505.mail.yahoo.com> References: <20031022044502.95474.qmail@web20505.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Alhagie Puye <alhagiep@yahoo.com>: | Hi all, | | First of all, I have spent a lot of time reading up on | it. | | Anyway, I live in a shared accomodation with 2 | roommates and a landlord and we share a cable internet | connection. It is 2Mbit/400Kbit connection. Sometimes | when one of us is downloading a song through Kazaa or | a new Linux or FreeBSD iso, the bandwidth gets hogged | and other users can't get through. | | I was trying to configure dummynet using Fair Queues | but I seem to be missing something. I tried to modify | some of the examples on Luigi Rizzo's web site | (http://info.iet.unipi.it/~luigi/ip_dummynet/) but it | doesn't seem to be working. | | It is a very simple setup. | | Private network (192.168.42.0/24)--------> FreeBSD 5.1 | firewall doing NAT (DHCP on external interface) | | My configuration file excerpt: | | ipfw pipe 1 config bw 400Kbit/s | ipfw pipe 2 config bw 1000Kbit/s | ipfw add queue 1 ip from 192.168.42.0/24 to any via | fxp0 | ipfw queue 1 config weight 5 pipe 1 mask src-ip | 0xffffffff | | ipfw add queue 2 ip from any to 192.168.42.0/24 via | fxp0 | ipfw queue 2 config weight 5 pipe 2 mask dst-ip | 0xfffffff I use the following and it seems to work. I haven't really looked that close though. It's a bit different to what you are doing but maybe it will help somehow. This company has some real BW hogs that is the reason for the 16kb :) $fwcmd pipe 1 config mask src-ip 0x000000ff bw 16Kbit/s queue 16Kbytes $fwcmd pipe 2 config mask dst-ip 0x000000ff bw 16Kbit/s queue 16Kbytes $fwcmd add 451 pipe 1 all from 192.168.5.0/24 to any out $fwcmd add 452 pipe 2 all from any to 192.168.5.0/24 in My ip pipe show is: /var/tmp # ipfw pipe show 00001: 16.000 Kbit/s 0 ms 16 KB 29 queues (64 buckets) droptail mask: 0x00 0x000000ff/0x0000 -> 0x00000000/0x0000 BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp 0 ip 0.0.0.32/0 0.0.0.0/0 89 5275 0 0 0 2 ip 0.0.0.1/0 0.0.0.0/0 8389 593271 0 0 0 4 ip 0.0.0.34/0 0.0.0.0/0 39 1996 0 0 0 6 ip 0.0.0.35/0 0.0.0.0/0 188 9738 0 0 0 8 ip 0.0.0.36/0 0.0.0.0/0 223 11346 0 0 0 10 ip 0.0.0.37/0 0.0.0.0/0 342 17135 0 0 0 12 ip 0.0.0.38/0 0.0.0.0/0 92 5474 0 0 0 14 ip 0.0.0.39/0 0.0.0.0/0 194 9634 0 0 0 16 ip 0.0.0.40/0 0.0.0.0/0 225 10922 0 0 0 18 ip 0.0.0.41/0 0.0.0.0/0 186 9350 0 0 0 20 ip 0.0.0.42/0 0.0.0.0/0 122 6148 0 0 0 22 ip 0.0.0.43/0 0.0.0.0/0 269 13420 0 0 0 24 ip 0.0.0.44/0 0.0.0.0/0 105 6612 0 0 0 26 ip 0.0.0.45/0 0.0.0.0/0 4 192 0 0 0 28 ip 0.0.0.46/0 0.0.0.0/0 294 14751 0 0 0 30 ip 0.0.0.47/0 0.0.0.0/0 229 13595 0 0 0 32 ip 0.0.0.48/0 0.0.0.0/0 198 9504 0 0 0 34 ip 0.0.0.49/0 0.0.0.0/0 10833 513435 0 0 0 36 ip 0.0.0.50/0 0.0.0.0/0 218 11286 0 0 0 38 ip 0.0.0.51/0 0.0.0.0/0 30 1541 0 0 0 40 ip 0.0.0.52/0 0.0.0.0/0 1131 59118 0 0 0 42 ip 0.0.0.53/0 0.0.0.0/0 1059 58867 0 0 0 44 ip 0.0.0.54/0 0.0.0.0/0 55 2700 0 0 0 52 ip 0.0.0.26/0 0.0.0.0/0 100 4800 0 0 0 54 ip 0.0.0.27/0 0.0.0.0/0 10561 514357 0 0 0 56 ip 0.0.0.28/0 0.0.0.0/0 41 2669 0 0 0 58 ip 0.0.0.29/0 0.0.0.0/0 5838 277480 0 0 0 60 ip 0.0.0.30/0 0.0.0.0/0 172 8980 0 0 0 62 ip 0.0.0.31/0 0.0.0.0/0 8 512 0 0 0 00002: 16.000 Kbit/s 0 ms 16 KB 1 queues (64 buckets) droptail mask: 0x00 0x00000000/0x0000 -> 0x000000ff/0x0000 BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp 1 ip 0.0.0.0/0 0.0.0.1/0 97482 15485004 0 0 0 So I assume it is doing what I expect or could I be missing something? ed | | When I do a "ipfw pipe show", the output is: | | firewall# ipfw pipe list | 00001: 400.000 Kbit/s 0 ms 50 sl. 0 queues (1 | buckets) droptail | mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000 | 00002: 1.000 Mbit/s 0 ms 50 sl. 0 queues (1 | buckets) droptail | mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000 | q00001: weight 5 pipe 1 50 sl. 0 queues (64 buckets) | droptail | mask: 0x00 0xffffffff/0x0000 -> 0x00000000/0x0000 | q00002: weight 5 pipe 2 50 sl. 0 queues (64 buckets) | droptail | mask: 0x00 0x00000000/0x0000 -> 0xffffffff/0x0000 | | The queues are always "0". So, it seems to me like | they are not getting created. What am I missing? I | have looked everywhere for answers. Any help would be | greatly appreciated. | | Cheers, | Alhagie. | | | __________________________________ | Do you Yahoo!? | The New Yahoo! Shopping - with improved product search | http://shopping.yahoo.com | _______________________________________________ | freebsd-ipfw@freebsd.org mailing list | http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw | To unsubscribe, send any mail to "freebsd-ipfw-unsubscribe@freebsd.org" | -------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1066816595.503ljw1oahog>