All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Neil Aggarwal" <neil@JAMMConsulting.com>
To: lartc@vger.kernel.org
Subject: [LARTC] CBQ broken in RedHat 8.0?
Date: Sat, 26 Oct 2002 23:53:59 +0000	[thread overview]
Message-ID: <marc-lartc-103567646931154@msgid-missing> (raw)

Hello all:

Is CBQ broken in RedHat 8.0?
It seems that my CBQ is not using priorities.

I have this setup:

Internet <-> DSL Modem <-> Linux router <-> IP Switch <-> Laptop

The Linux computer is running a fresh, unmodified installation
of RedHat 8.0?

On the Linux computer, eth0 points to the DSL modem
and eth1 points to my internal network.
The Linux compter runs DHCP and masquerade.

I want to make sure that ssh traffic is prioritied above
all other traffic.

After reading the HOWTO and the wondershaper code, I set-up the following
tc rules on the Linux computer:

# The downlink speed, in kilobits
DOWNLINK00
# The uplink speed, in kilobits
UPLINK\x100
# The device to control
DEV=eth0
# Install the root CBQ at 1:0
tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 10mbit

# Add a cbq at 1:1 to limit the total bandwidth to the uplink speed
tc class add dev $DEV parent 1: classid 1:1 cbq rate ${UPLINK}kbit allot
1500 prio 1 bounded isolated

# Create a queue for the high priority traffic
tc class add dev $DEV parent 1:1 classid 1:10 cbq rate ${UPLINK}kbit allot
1600 prio 1 avpkt 1000 bounded isolated
tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10

# Create a queue for the low priority traffic
tc class add dev $DEV parent 1:1 classid 1:20 cbq rate $[9*$UPLINK/10]kbit
allot 1600 prio 2 avpkt 1000 bounded isolated
tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10

# Filter ssh traffic into the high prioirty queue
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 match ip sport 22
0xffff  flowid 1:10
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 match ip dport 22
0xffff  flowid 1:10

# Filter the rest of the traffic into the low priority queue, policing the
rate and dropping any overflow packets
tc filter add dev $DEV parent 1:0 protocol ip prio 13 u32 match ip dst
0.0.0.0/0 police rate $[9*$UPLINK/10]kbit burst 10k drop flowid 1:20

# Police the incoming traffic to the rate we specified
tc qdisc add dev $DEV handle ffff: ingress
tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src
0.0.0.0/0 police rate ${DOWNLINK}kbit burst 10k drop flowid :1


What I am expecting from these rules is that the ssh traffic will take
complete priority over
anything else.  Other traffic will only get what is left over.

To test this, I set-up a large FTP upload from my laptop to a machine over
the Internet
and then set up and ssh transfer of a large file to another machine.
After letting things settle down, I ran my traffic control script.

After a while, I ran this command to see the results:
tc -s qdisc ls dev eth0

Here is what I got:
 qdisc ingress ffff: ----------------
 Sent 514549 bytes 9924 pkts (dropped 0, overlimits 0)

 qdisc sfq 20: quantum 1514b perturb 10sec
 Sent 10522893 bytes 7296 pkts (dropped 0, overlimits 0)
 backlog 5p

 qdisc sfq 10: quantum 1514b perturb 10sec
 Sent 7648142 bytes 5449 pkts (dropped 0, overlimits 0)

 qdisc cbq 1: rate 10Mbit (bounded,isolated) prio no-transmit
 Sent 18173599 bytes 12771 pkts (dropped 120, overlimits 18412)
 backlog 5p
  borrowed 0 overactions 0 avgidle 624 undertime 0

The low priority traffic is getting more traffic sent thru.
This is not what I wanted.

Any ideas why this is happening?

Thanks,
	Neil.


--
Neil Aggarwal
JAMM Consulting, Inc.    (972) 612-6056, http://www.JAMMConsulting.com
Custom Internet Development    Websites, Ecommerce, Java, databases

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

             reply	other threads:[~2002-10-26 23:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-26 23:53 Neil Aggarwal [this message]
2002-10-27  3:10 ` [LARTC] CBQ broken in RedHat 8.0? Robert Davidson
2002-10-27 10:09 ` Stef Coene
2002-10-27 17:08 ` Robert Davidson
2002-10-27 17:23 ` David Boreham
2002-10-28 11:40 ` Aigars Mahinovs

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-103567646931154@msgid-missing \
    --to=neil@jammconsulting.com \
    --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 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.