Bandwidth limiting for eMule ports

Daniel O'Connor doconnor at gsoft.com.au
Wed Jan 21 20:43:02 PST 2004


On Thursday 22 January 2004 14:49, Ganbold wrote:
> Am I doing right? For what NIC should I implement filtering, outside or
> inside interface?
> When I see MRTG graphs for ipfw it still shows bandwidth more than it
> supposed to:(

A few points..
- The nic is not really relevant except as a way of selecting packets more 
  accurately.
- Incoming packets (from the outside world to you) are more difficult to limit 
  because the other end sends them and the gateway can only do the limiting 
  after they are already received. That said it DOES work but it tends to lag 
  behind reality a little.

I use dummynet to limit TCP traffic when playing games and I use the following 
rules..

ipfw pipe 1 config bw 1kbyte/sec queue 10kbytes
ipfw pipe 2 config bw 5kbyte/sec queue 10kbytes
...
ipfw add 01900 pipe 1 tcp from any to any out xmit tun0
ipfw add 02000 pipe 2 tcp from any to any in recv tun0
...

ie I limit incoming(downloads) to 5k/sec and outgoing(uploads) to 1k/sec.
I use in/out because I only want to limit packets across my tun0 (PPPoE) 
interface.

Hope that helps.

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 9A8C 569F 685A D928 5140  AE4B 319B 41F4 5D17 FDD5



More information about the freebsd-hackers mailing list