From owner-freebsd-questions@FreeBSD.ORG Fri Feb 6 07:35:57 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 17D6A16A4CE for ; Fri, 6 Feb 2004 07:35:57 -0800 (PST) Received: from oahu.WURLDLINK.NET (oahu.wurldlink.net [66.193.144.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2731B43D5E for ; Fri, 6 Feb 2004 07:35:55 -0800 (PST) (envelope-from vince@oahu.WURLDLINK.NET) Received: from oahu.WURLDLINK.NET (vince@localhost.WURLDLINK.NET [127.0.0.1]) by oahu.WURLDLINK.NET (8.12.9/8.12.9) with ESMTP id i16FZoqQ070301; Fri, 6 Feb 2004 05:35:51 -1000 (HST) Received: from localhost (vince@localhost)i16FZomJ070298; Fri, 6 Feb 2004 05:35:50 -1000 (HST) Date: Fri, 6 Feb 2004 05:35:50 -1000 (HST) From: Vincent Poy To: Dan Pelleg In-Reply-To: <20040206051414.D8264-100000@oahu.WURLDLINK.NET> Message-ID: <20040206052422.C8264-100000@oahu.WURLDLINK.NET> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: questions@freebsd.org Subject: Re: FreeBSD Traffic Shaping? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2004 15:35:57 -0000 On Fri, 6 Feb 2004, Vincent Poy wrote: > On 6 Feb 2004, Dan Pelleg wrote: > > > Vincent Poy writes: > > > > > Greetings all: > > > > > > I have a ADSL connection where the upstream pipe is smaller than > > > the downstream with it at 1.5Mbps/384kbps now and will be upgrading to > > > 6Mbps/608kbps soon. The issue I'm having is that whenever I upload, it > > > fills the upstream to full capacity and the downstream would lag as the > > > ACKs can't be send back in time. I was told that with traffic shaping or > > > fair queue routing would solve this issue but I only have one NIC > > > interface as I am running FreeBSD on a fully loaded notebook with a > > > Pentium 4M-2.6Ghz CPU, 2GB RAM and 60GB 7200RPM HDD with a 10/100 3COM xl0 > > > built in NIC. The problem is that I have 8 static IP's with my ISP so > > > that the LAN IP's, x.x.x.224-.231 netmask 255.255.255.0 are all locally on > > > the LAN so I want those to use the full speed of the connection without > > > traffic shaping. The NIC also has the 192.168.x.x netmask 255.255.0.0 > > > addresses for the local LAN as well so how do I setup traffic shaping in > > > this scenario so that only traffic that actually uses x.x.x.1 from the > > > x.x.x.224 IP that isn't local LAN traffic actually use traffic shaping or > > > fair queue routing while LAN traffic will just use the full speed. I > > > already have these options in the KERNEL config. > > > > > > options IPFIREWALL > > > options IPDIVERT > > > options DUMMYNET > > > options BRIDGE > > > > > > Thanks for your help in advance! > > > > See ipfw(8). You can match rules by interface or address mask, so you don't > > need to touch LAN traffic. > > That's the part I'm confused about. Since I only have one > interface, I assume I have to do it by address mask but how would one > define it as for example, > > 10.0.0.224-231 would not use the traffic shaper but 10.0.0.1-223 as well > as 10.0.0.232-254 would? > > > Correct, the problem when you upload on an assymetric link has to do with > > acknowledgment packets that downloading apps need to send back to the > > remote server, and they have to wait in the upload queue (which is > > saturated). You need to prioritize those. One way to do this is to filter > > on small iplen. This has been discussed in the mailing lists in the past > > (try the archive of the ipfw@ list). Just remember you can only shape > > outbound packets (ie, leaving your computer). Doesn't matter if they're up > > or down the DSL line, just that they go out (shaping incoming traffic makes > > no sense). > > True. But when you have the shaping, do you actually set it to > the speed of the line or do you set it to like 5% below the speed of the > line and on the acknowledgement packets, does traffic shaping actually > reserve some space for that to go back or does it just queue it a certain > way? Thanks. After reading ipfw(8), I hope I have it correct that it's like this: ipfw add queue 1 ip from any to any out xmit xl0 ipfw pipe 1 config bw 384Kbit/s ipfw queue 1 config pipe 1 weight 30 mask all Now I'm just confused how to do the IP portion so that: 192.168.0.0 255.255.0.0 209.204.138.224-231 are not included but everything else in 209.204.x.x is as well as any undefined IP. Cheers, Vince - vince@WURLDLINK.NET - Vice President ________ __ ____ Unix Networking Operations - FreeBSD-Real Unix for Free / / / / | / |[__ ] WurldLink Corporation / / / / | / | __] ] San Francisco - Honolulu - Hong Kong / / / / / |/ / | __] ] HongKong Stars/Gravis UltraSound Mailing Lists Admin /_/_/_/_/|___/|_|[____] Almighty1@IRC - oahu.DAL.NET Hawaii's DALnet IRC Network Server Admin