freebsd shaper
"." at babolo.ru
"." at babolo.ru
Fri Oct 10 05:37:44 PDT 2003
> 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
More information about the freebsd-net
mailing list