bandwidth throttling?

Dan Naumov dan.naumov at gmail.com
Fri Apr 9 01:29:41 UTC 2010


Hello folks

I have a 8.0 system that has 2 IPs:

ifconfig em1
em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=19b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4>
        ether 00:25:90:01:32:93
        inet 192.168.1.126 netmask 0xffffff00 broadcast 192.168.1.255
        inet 192.168.1.127 netmask 0xffffff00 broadcast 192.168.1.255
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active

The .126 is used by the host for various obvious things and I have a
jail on the same machine running off the .127 IP. Is there a quick and
easy way to have the jail host throttle bandwidth usage of everything
going to and out of the .127 jail? I don't really need anything fancy,
I just want to set hard limits for the entire jail globally, like
"don't use more than 500KB/s downstream and more than 150KB/s
upstream". What would be the best way around doing this? My
understanding is that to do this with PF, I would need ALTQ meaning I
have to use a custom kernel and that IPFW with dummynet should have
similar functionality but should also work with GENERIC?

Thanks!

- Sincerely,
Dan Naumov


More information about the freebsd-questions mailing list