Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: Stef Coene <stef.coene@docum.org>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] newbie question
Date: Mon, 13 Oct 2003 18:46:27 +0000	[thread overview]
Message-ID: <marc-lartc-106607322216745@msgid-missing> (raw)
In-Reply-To: <marc-lartc-101480860824396@msgid-missing>

On Monday 13 October 2003 13:38, Muhammad Reza wrote:
> hi All.
> this my script for shapping with htb, to shapping my network subnet
>
> ISP--eth--eth1---lan with 4 subnet
>
>  cat /etc/shorewall/tcstart
> #!/bin/bash
> /sbin/tc qdisc add dev eth1 root handle 1: htb default 20
> /sbin/tc class add dev eth1 parent 1: classid 1:1 htb rate 2mbit ceil 2mbit
> /sbin/tc class add dev eth1 parent 1:1 classid 1:10 htb rate 512kbps
> ceil 2mbit
> /sbin/tc class add dev eth1 parent 1:1 classid 1:11 htb rate 512kbps
> ceil 2mbit
> /sbin/tc class add dev eth1 parent 1:1 classid 1:12 htb rate 512kbps
> ceil 2mbit
> /sbin/tc class add dev eth1 parent 1:1 classid 1:13 htb rate 512kbps
> ceil 2mbit
> /sbin/tc filter add dev eth1 protocol ip parent 1: prio 1 u32 match ip
> dst 172.16.0.0/24 flowid 1:10
> /sbin/tc filter add dev eth1 protocol ip parent 1: prio 1 u32 match ip
> dst 172.16.32.0/24 flowid 1:11
> /sbin/tc filter add dev eth1 protocol ip parent 1: prio 1 u32 match ip
> dst 172.16.64.0/24 flowid 1:12
> /sbin/tc filter add dev eth1 protocol ip parent 1: prio 1 u32 match ip
> dst 172.16.128.0/24 flowid 1:13
>
>
>  /sbin/tc qdisc sh
> qdisc htb 1: dev eth1 r2q 10 default 20 direct_packets_stat 0
>
> when i test with iperf  from 172.16.0.227 /usr/local/bin/iperf -c
> 172.16.0.226
> ------------------------------------------------------------
> Client connecting to 172.16.0.226, TCP port 5001
> TCP window size: 32.5 KByte (default)
> ------------------------------------------------------------
> [  5] local 172.16.0.228 port 49192 connected with 172.16.0.226 port 5001
> [ ID] Interval       Transfer     Bandwidth
> [  5]  0.0-10.0 sec   111 MBytes  92.8 Mbits/sec
>
> i dont see bandwith limited that i excpected...
> did my step correct..or i did something stupid..(again)
You are mixing bytes and bites.  512kbps is 512kiobyte/s and 2mbit is 
2megabit/s.  So 512kbps = 512 * 8 = 4mbit/s.  It's still not 92.8 Mbit/sec.

Can you also post the output of 
tc -s -d class show dev eth0

For more info about htb and the tests I did, see www.docum.org.

Stef

-- 
stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.openprojects.net

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

  parent reply	other threads:[~2003-10-13 18:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-27 11:11 [LARTC] Newbie question suresh
2002-02-28 11:44 ` Ard van Breemen
2002-02-28 12:30 ` suresh
2002-02-28 12:31 ` Arthur van Leeuwen
2002-02-28 13:24 ` Ard van Breemen
2002-12-16 15:58 ` [LARTC] newbie question Del Riesgo, Christopher D
2003-10-09 11:45 ` Muhammad Reza
2003-10-09 11:46 ` jeremie le-hen
2003-10-09 12:15 ` Muhammad Reza
2003-10-13 11:38 ` Muhammad Reza
2003-10-13 18:46 ` Stef Coene [this message]
2004-03-02 14:22 ` [LARTC] Newbie question Aravind babu
2004-03-03  5:45 ` Martin A. Brown
2004-09-28  7:35 ` Mark S. Nesterovich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-106607322216745@msgid-missing \
    --to=stef.coene@docum.org \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox