From owner-freebsd-pf@FreeBSD.ORG Fri Oct 21 13:35:26 2005 Return-Path: X-Original-To: freebsd-pf@freebsd.org Delivered-To: freebsd-pf@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A3FF16A41F for ; Fri, 21 Oct 2005 13:35:26 +0000 (GMT) (envelope-from montarotech@optusnet.com.au) Received: from mail18.syd.optusnet.com.au (mail18.syd.optusnet.com.au [211.29.132.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id E06D343D46 for ; Fri, 21 Oct 2005 13:35:25 +0000 (GMT) (envelope-from montarotech@optusnet.com.au) Received: from delta (d58-105-86-86.dsl.nsw.optusnet.com.au [58.105.86.86]) by mail18.syd.optusnet.com.au (8.12.11/8.12.11) with SMTP id j9LDZNoE022227 for ; Fri, 21 Oct 2005 23:35:23 +1000 Message-ID: <000b01c5d644$54527f20$0132a8c0@delta> From: "Josh Finlay" To: Date: Fri, 21 Oct 2005 23:35:39 +1000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Subject: FreeBSD + MPD + PF + ALTQ X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2005 13:35:26 -0000 Hi, I'm using FreeBSD 5.3-RELEASE, and PF as my firewall I realise that this e-mail is not *entirely* PF related, but I thought this might be the best place to get my questions answered. Now I have zero experience with ALTQ but I have read that this is the solution to my problems. I have an ADSL connection, 512kbps up 128kbps down. 3 machines in total on the network. a freebsd router, 2 windows machines. I want to allow a sort of "sharing" of the bandwidth. Most out-of-the-box routers already do this, but I can't afford to fork out for one of those, nor would I like to part with my FreeBSD box. I was wondering if anyone would be able to provide me with some PF/ALTQ rules that would evenly distrobute my bandwidth over the 3 computers? I want it done in a way where: - if 1 pc is using the link, it can use all available bandwidth - if 2 pcs are using the link, it gets split 50/50 - if 3 pcs are using the link, it gets spread evenly over them, etc, etc This would preferable be for downstream AND upstream, to ensure that no single computer is more lagged out than the other one.. I assume this is possible, just a bit outside my knowledge base. Any hands up to write me a quick few PF rules for this? My Local IP addresses are as follows: 192.168.0.101 - router 192.168.0.6 - windows 192.168.0.1 - windows (don't ask about my IP configuration, long story :P) my network interface (has 192.168.0.101 assigned) is de0 my internet interface (has my internet ip assigned) is ng0 (using MPD) I tried a few examples I found, no luck, found another thing I will need to fix first: pfctl: ng0: driver does not support altq I searched for a patch for the ng_iface driver, but no luck. So, now i've decided to take another approach. I've installed a second NIC in my fbsd box so now I've got de0, and vr0 I want de0 for lan traffic it will have an assigned ip 192.168.0.101 and all other machines will use that as their gateway now I want mpd to use vr0, since the vr driver supports altq. How do I go about this? and do I need to do any routing between de0 and vr0 so that client machines using 192.168.0.101 (de0) as their gateway will be able to access the outside world? And also after all that, some nice altq rules as I detailed above in this mail. I hope to hear some solutions soon, this problem has been bugging me for some time now. Regards, Montaro.