hey,
I have a question on how to best limit traffic with pf. The main
goal is not so much to limit bandwidth to a lower point all the
time but more to prevent a runaway process (or user) from
drowning the rest.
Since i do not have the means for extensive testing i hope to
get some pointers before going down a path that would only waste
time and resources. I have the following situation (simplified):
/-vlan1 <==1Gb==> desktops
internet <==512Kb==>bge0 PF
\-vlan2 <==1Gb==> production
I want to make sure production has at least 256Kb both upload as
download on the internet connection.
1) I know it will not stop flooding of the line by 3rd parties. This is
not the goal
of the rules. The goal is to prevent a download initiated by a server or
user
from taking up all the download bandwidth
2) I was thinking of using a shared queue on vlan1 and vlan2 but I could
not find
any documentation whether that is possible at all.
Would the following work and actually limit download traffic? If not
then I guess
I will have to create separate download queues of max 400Kb so ensure at
least
some bandwidth remains for the other side.
altq on bge0 cbq bandwidth 512Kb queue { ext-prod, ext-desktop }
altq on vlan1 cbq bandwidth 1Gb queue { download, default-desktop }
altq on vlan2 cbq bandwidth 1Gb queue { download, default-prod }
queue download bandwidth 512Kb { download_prod, download_desktop }
queue download_prod bandwidth 50% priority 3 cbq(borrow)
queue download_desktop bandwidth 50% priority 1 cbq(borrow)
pass in quick on bge0 from any to <production> keep state queue
download_prod
pass out quick on vlan2 from any to <production> keep state queue ext-prod
pass in quick on vlan2 from <production> to any keep state queue ext-prod
pass out quick on vlan2 from <production> to any keep state queue
download_prod
pass in quick on bge0 from any to <desktop> keep state queue
download_desktop
pass out quick on vlan2 from any to <desktop> keep state queue ext-desktop
pass in quick on vlan2 from <desktop> to any keep state queue ext-desktop
pass out quick on vlan2 from <desktop> to any keep state queue
download_desktop
Is this idea going in the right direction or is there a much better way
to do this?
Thanks,
Stefan
| Ryan Hope | reiser4 for 2.6.27-rc1 |
| David | sdhci: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter - disabling IRQ |
| H. Peter Anvin | Re: Reiser4. BEST FILESYSTEM EVER? I need help. |
| Alan Cox | [PATCH 01/20] tty: Introduce a tty_port common structure |
git: | |
| Johannes Schindelin | Re: git on MacOSX and files with decomposed utf-8 file names |
| Avery Pennarun | Re: Considering teaching plumbing to users harmful |
| Mark Levedahl | Re: [PATCH] Teach remote machinery about remotes.default config variable |
| Junio C Hamano | Re: tracking repository |
| Richard Stallman | Real men don't attack straw men |
| Tony Abernethy | Re: What is our ultimate goal?? |
| Siju George | This is what Linus Torvalds calls openBSD crowd |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Jim Winstead Jr. | Re: Root Disk/Book Disk Compatibility |
| Brandon S. Allbery | Re: mkdir says "no space left on device" and more problems... |
| Paul Douglas Page | Where is mkfs? |
| Desmond A. Kirkpatrick | ATI GUP bug with Linux 'tickler' |
