From owner-freebsd-net@FreeBSD.ORG Fri Oct 10 05:37:44 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D0FBB16A4BF for ; Fri, 10 Oct 2003 05:37:44 -0700 (PDT) Received: from ints.mail.pike.ru (ints.mail.pike.ru [195.9.45.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id D961A43FBF for ; Fri, 10 Oct 2003 05:37:40 -0700 (PDT) (envelope-from babolo@cicuta.babolo.ru) Received: (qmail 69854 invoked from network); 10 Oct 2003 12:59:57 -0000 Received: from babolo.ru (HELO cicuta.babolo.ru) (194.58.226.160) by ints.mail.pike.ru with SMTP; 10 Oct 2003 12:59:57 -0000 Received: (nullmailer pid 94709 invoked by uid 136); Fri, 10 Oct 2003 12:38:49 -0000 X-ELM-OSV: (Our standard violations) hdr-charset=KOI8-R; no-hdr-encoding=1 In-Reply-To: <20031010120717.53f2637c.aleksandar@unet.com.mk> To: Aleksandar Simonovski Date: Fri, 10 Oct 2003 16:38:49 +0400 (MSD) From: "."@babolo.ru X-Mailer: ELM [version 2.4ME+ PL99b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Message-Id: <1065789529.667131.94708.nullmailer@cicuta.babolo.ru> cc: freebsd-net@freebsd.org Subject: Re: freebsd shaper X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2003 12:37:44 -0000 > Hi, > This is my scenario, now it is working on Slackware 9.1 with CBQ > but i wanna do it on FreeBSD 5.1 > > 1.--------- > | > 2.--------- > | <-------> HUB <-----> ETH1 <--- SHAPER ---> ETH0 <-----> INTERNET > 3.--------- > | > 4.--------- > > 1,2,3 and 4 are all different networks > 1 has 192.168.0.199/24 that is 192.168.0.199 is alias on ETH1 > so a need NAT for this one. > ETH1 has four aliases which are gateways for 1,2,3, and 4 > this is working on the linux box but i have some troubles with limiting thr traffic with CBQ > so am asking if anyone knows how to do this on FreeBSD 5.1 with IPFW and DUMMYNET One possible way for 4.8-STABLE: sysctl net.inet.ip.fw.one_pass=0 pipes 1,2,3,4 descriptions add 100 skipto 30000 ip from any to any out add 200 pipe 1 ip from 192.168.0.0/24 to any in recv eth1 add 200 pipe 2 ip from net2 to any in recv eth1 add 200 pipe 3 ip from net3 to any in recv eth1 add 200 pipe 4 ip from net4 to any in recv eth1 add 300 divert 300 ip from any to NATIP in .... some rules to enable traffic .... add 29900 deny log ip from any to any in .... some rules to enable traffic .... add 50000 divert 30000 ip from 192.168.0.0/24 to any out add 50100 allow ip from NATIP to any out and lounch natd -a NATIP -i 300 -o 30000 -d Where NATIP - some properly routable address Sorry, not tested in 5.X