Re: Dummynet

From: Robert Martin-Legène (none@robert+bsd-dk--martin-legene.dk.lh.bsd-dk.dk)
Date: Wed 25 Sep 2002 - 16:25:08 CEST


Date: Wed, 25 Sep 2002 11:25:08 -0300
From: Robert Martin-Legène <none@robert+bsd-dk--martin-legene.dk.lh.bsd-dk.dk>
To: bsd-dk@bsd-dk.dk
Subject: Re: Dummynet

On Wed, Sep 25, 2002 at 03:06:04PM +0200, Søren Elleby Sørensen wrote:
> ipfw pipe 10 config mask src-ip 0xffffff00 bw 512Kbit/s
> ipfw pipe 20 config mask dst-ip 0xffffff00 bw 512Kbit/s

Svjh, skal du ikke bruge "mask" til det du vil opnå. Så blot
ipfw pipe 10 config bw 512Kbit/s
ipfw pipe 20 config bw 512Kbit/s

> ipfw add pipe 10 all from 10.0.0.0/24 to any out via fxp0
> ipfw add pipe 20 all from 10.0.0.0/24 to any in via fxp
Og her mangler du lige at svinge rundt på IP-numrene den ene vej, men
du behøver vel nok ikke at have IP-numre på overhovedet:
ipfw add pipe 10 all from any to any out via fxp0
ipfw add pipe 20 all from any to any in via fxp0

Hvis du virkelig vil have IP-numre med, så skriv:
ipfw add pipe 10 all from 10.0.0.0/24 to any out via fxp0
ipfw add pipe 20 all from any to 10.0.0.0/24 in via fxp0

Du skal nok også være opmærksom på at køre NAT *efter* at du har
smidt pakkerne ind igennem dine pipes. Ellers er dine IP-numre jo
anderledes.

Håber det hjælper.

-- Robert Martin-Legene



This archive was generated by hypermail 2b30 : Wed 15 Nov 2006 - 18:24:23 CET