Date: Fri, 10 Oct 2003 16:38:49 +0400 (MSD) From: "."@babolo.ru To: Aleksandar Simonovski <aleksandar@unet.com.mk> Cc: freebsd-net@freebsd.org Subject: Re: freebsd shaper Message-ID: <1065789529.667131.94708.nullmailer@cicuta.babolo.ru> In-Reply-To: <20031010120717.53f2637c.aleksandar@unet.com.mk>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1065789529.667131.94708.nullmailer>