All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junus Junarto D Junus Junarto D" <junus@bigfoot.com
To: lartc@vger.kernel.org
Subject: [LARTC] Traffic shaping
Date: Sun, 07 Jan 2001 13:54:45 +0000	[thread overview]
Message-ID: <marc-lartc-98373940416829@msgid-missing> (raw)
In-Reply-To: <marc-lartc-98373940416818@msgid-missing>

<PRE>Hi Bruno Maciel Fonseca,
I try to solve your problem, if I'm wrong please somebody correct me.
The weakness of ordinary method of QoS in Linux is only working to outgoing
traffic of that interface.
But this limitation overcome by using ingress method.

&gt;<i> Router: eth0: 192.168.0.207
</I>&gt;<i>         eth1: 10.0.1.1
</I>&gt;<i> Client: 10.0.1.2
</I>is the right client 10.0.5.2 ?



There is no problem with your script with u32. But maybe it can be more
efficient that to remove classid 1:1 and change the parent of 1:10 to 1:0
like below:
 SCRIPT WITH u32:
 tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 256Kbit avpkt 1000
 cell 8

 tc class add dev eth0 parent 1:0 classid 1:10 cbq bandwidth 256Kbit rate
 64Kbit weight 6Kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000
 bounded

 tc qdisc add dev eth0 parent 1:10 tbf rate 64Kbit buffer 10Kb/8 limit
 15Kb mtu 1500

 tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src
 10.0.5.2 flowid 1:10

Hey, I got another idea if you use only one group of client you can use only
two lines below. This will make your CPU proccessor working a little. Please
let me know if I'm wrong, I never tried it before. But I have ever tried to
limit the bandwidth of interface without tc filter command, that will make
all outgoing traffic of interface eth0 will be limited to 64 Kbit.
SCRIPT WITH u32:
tc qdisc add dev eth0 root handle 1:0 tbf rate 64Kbit buffer 10Kb/8 limit
 15Kb mtu 1500

 tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src
 10.0.5.2 flowid 1:0



Let's look your main problem, you must use eth1 not eth0 to your commands.
You can't use ipchains like that because it only marking the incoming packet
of interface eth1.
And I think it's better to use tbf than sfq for limiting traffic.
The right commands is at below, but you can make more efficient like above.
SCRIPT WITH fw:
ipchains -A forward -s 10.0.5.0/24 -j MASQ

 tc qdisc add dev eth1 root handle 1: cbq bandwidth 128Kbit avpkt 1000

 tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 128Kbit rate
 128Kbit allot 1514 weight 12Kbit prio 8 maxburst 20 avpkt 1000

 tc class add dev eth1 parent 1:1 classid 1:2 cbq bandwidth 128Kbit rate
 128Kbit allot 1514 weight 12Kbit prio 8 maxburst 20 avpkt 1000

 tc class add dev eth1 parent 1:2 classid 1:11 cbq bandwidth 128Kbit rate
 128Kbit allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:2

 tc qdisc add dev eth1 parent 1:11 sfq quantum 1514b perturb 15

tc filter add dev eth1 parent 1:11 protocol ip prio 100 u32 match ip dst
 10.0.5.2 flowid 1:11

Regards,
Junus Junarto D.




</PRE>

  parent reply	other threads:[~2001-01-07 13:54 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-04 12:22 [LARTC] traffic shaping Wouter
2001-01-04 18:17 ` Sander
2001-01-05  3:52 ` Sander
2001-01-05 11:42 ` Wouter
2001-01-05 13:56 ` Junus
2001-01-05 13:56 ` Junus
2001-01-06  9:25 ` [LARTC] Traffic shaping Bruno
2001-01-07 13:54 ` Junus [this message]
2001-12-25 12:15 ` [LARTC] Traffic Shaping Sahil Gupta - NET4U
2001-12-25 12:27 ` bert hubert
2001-12-25 12:33 ` Sahil Gupta - NET4U
2001-12-25 12:34 ` Sahil Gupta - NET4U
2001-12-25 12:42 ` bert hubert
2002-01-22  4:52 ` [LARTC] traffic shaping Antonis Lazaridis
2002-01-22  7:44 ` Martin Devera
2002-01-23  8:23 ` Martin Devera
2002-01-23  9:42 ` Antonis Lazaridis
2002-01-23  9:51 ` Martin Devera
2002-01-25  8:11 ` Antonis Lazaridis
2002-01-26 23:00 ` Martin Devera
2002-01-27  1:21 ` Re[2]: " Will Lotto
2002-01-27  8:47 ` Stef Coene
2002-02-08  5:17 ` Antonis Lazaridis
2002-02-08 17:22 ` Riaz Mahmood
2006-10-04 20:45 ` Roberto Scattini
2007-05-06 20:14 ` [LARTC] Traffic Shaping Rangi Biddle
2007-05-07  8:25 ` AW: " Simo
2007-05-07 18:06 ` Rangi Biddle
2007-05-08  3:16 ` Rangi Biddle
2007-10-24 18:37 ` [LARTC] Traffic shaping Mohammad Shakir

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-98373940416829@msgid-missing \
    --to=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.