Limiting Bandwidth from a Jail using Dummynet/IPFW?

Status
Not open for further replies.

Supa

Patron
Joined
Jan 10, 2014
Messages
204
My current steps: (still troubleshooting)
  • Enable dummynet and ipfw the FreeBSD traffic shaping module:
    • edit /boot/loader.conf and add
    • ipfw_load="YES"
    • dummynet_load="YES"
      run kldload dummynet to load the modules or just restart the server.
  • Set up a pipe that restricts traffic
    • ipfw add 1 allow tcp from any to me 22 keep-state
    • ipfw pipe 1 config bw 20Mbit/s
    • ipfw add 1000 pipe 1 ip from 192.168.1.226 to any
  • Limit upload through the pipe (through the PMS jail)
  • systat -ifstat 1 is used to monitor bandwidth
  • You can see your pipes with ipfw pipe show (just as you see the regular rules with ipfw show.
  • ipfw pipe flush will destroy all the pipes generated.
Sources:
http://info.iet.unipi.it/~luigi/dummynet/
http://info.iet.unipi.it/~luigi/ip_dummynet/original.html
http://cs.baylor.edu/~donahoo/tools/dummy/tutorial.htm
 
Last edited:

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Did you try logging in with your plex account on the server? I haven't seen this problem before and you should ask in the plex forums.
 

Supa

Patron
Joined
Jan 10, 2014
Messages
204
So whenever I run the command:
  • ipfw add 1000 pipe 1 ip from 192.168.1.226 to any
Plex Plugin crashes.. and restarting the jail does nothing. I have to reboot the server. Any ideas why?

I grabbed a log from the Plex Jail: http://nopaste.linux-dev.org/?967950 (Error sending out discover packet: send_to: Can't assign requested address)
 
D

dlavigne

Guest
Is this now a question or a how-to? If a question, what is it?
 

hungarianhc

Patron
Joined
Mar 11, 2014
Messages
234
No trying to hijack the thread, but I'm interested in this as well, and i'm actually interested in one step further. I'd like to be able to time the throttling... I.E. Throttle my uploads from 7AM til midnight. After midnight, let it go max speed.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
No trying to hijack the thread, but I'm interested in this as well, and i'm actually interested in one step further. I'd like to be able to time the throttling... I.E. Throttle my uploads from 7AM til midnight. After midnight, let it go max speed.
Use your router for that. If your router doesn't support QOS, then get one (or build one) that does.
 
Status
Not open for further replies.
Top