dummynet problem.

Taking care of your Linux box.

dummynet problem.

Postby azfar » Tue Mar 24, 2009 10:26 pm

I am using dummynet in bridge mode. and its working fine.

Now I have built another box (freebsd 7.1) in router mode. On this box I have two NICs, one for lan and one for wan. both networks are segmented physically and logically i-e both interfaces have different ip pools and connected to different physical networks e.g

lan has 1.2.3.4 (only IP) (le1)
wan has 2.3.4.5 including its gateway and dns servers. (le0)
Both networks are /24.

Ony my router i add a static route to forward all traffic for 1.2.3.4/24 to 2.3.4.5 (freebsd).

So far the networking is working fine. I can reach any network from 1.2.3.0/24 network and similerly any network can reach 1.2.3.0/24 network.

Now I enabled the dummynet on this box and add a teast rule like below.

$cmd pipe 78 $bwd 512kbits/s
$cmd pipe 79 $bwd 512kbits/s
$cmd add pipe 78 ip $src 1.2.3.39 $dest any
$cmd add pipe 79 ip $src any $dest 1.2.3.39

Now the problem is I am only getting the quarter of bandwidth i-e 128kbits (no other process is accessing internet).

But if i changed the rules to
$cmd pipe 78 $bwd 512kbits/s
$cmd pipe 79 $bwd 512kbits/s
$cmd add pipe 78 ip $src 1.2.3.39 $dest any out via le0
$cmd add pipe 79 ip $src any $dest 1.2.3.39 in via le0

Then I got half bandwidth. But the problem is if the client is connected over pppoe then the above rule doesnt apply on it because now the client traffic is comming from tun0. So I cant mention the interface in my rules because everytime client pppoe tunnel changes i-e tun0, tun1, tun3 etc.

As I cant mention the interface name thatswhy I am still getting quarter bandwidth on download.

Any ideas where i am wrong!
Azfar Hashmi
Email : azfarhashmi@hotmail.com
azfar
Captain
 
Posts: 598
Joined: Tue Mar 23, 2004 1:16 am
WLM: azfarhashmi@hotmail.com
Yahoo Messenger: azfarhusain@yahoo.com
Location: Karachi

Postby azfar » Tue Mar 24, 2009 11:15 pm

$cmd add pipe 100 ip $src 1.2.3.39 $dest any out via le0
$cmd add pipe 101 ip $src any $dest 1.2.3.39 in via le0

Now throtling on wan interface giving me half bandwidth.
Azfar Hashmi

Email : azfarhashmi@hotmail.com
azfar
Captain
 
Posts: 598
Joined: Tue Mar 23, 2004 1:16 am
WLM: azfarhashmi@hotmail.com
Yahoo Messenger: azfarhusain@yahoo.com
Location: Karachi


Return to “%s” Administration

Who is online

Users browsing this forum: No registered users and 1 guest

cron