All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Leandro Patrón" <linuxman@adinet.com.uy>
To: lartc@vger.kernel.org
Subject: [LARTC] can this work?
Date: Tue, 17 Aug 2004 05:24:12 +0000	[thread overview]
Message-ID: <4121967C.9060306@adinet.com.uy> (raw)

Hi.
I'm newie using LARTC.
I have some pc's and one 512/192kbits conection. I do not want that one 
PC uses all the bandwidth available.
I made this script to limit, but I need that the applications (web 
browsing, messenger with cam and audo , p2p, etc) in pc's continue 
acceding normally Internet.
Would work this script?
what type of qdisc could be added to htb in order to reduce the delay of 
the applications like messenger?
Thank you very much
Leandro

/bin/sh
#


# Set the following values to somewhat less than your actual download
# and uplink speed. In kilobytes
BAJADAP
SUBIDA\x10
MINABUSE=5
MAXABUSE\x15
TARGETA0=eth0

A1\x192.168.0.3
A2\x192.168.0.4
A3\x192.168.0.5
A4\x192.168.0.6
A5\x192.168.0.7
A6\x192.168.0.8
A7\x192.168.0.9
A8\x192.168.0.10
B1\x192.168.0.11
B2\x192.168.0.12
B3\x192.168.0.13
B4\x192.168.0.14
B5\x192.168.0.15
B6\x192.168.0.16
J1\x192.168.0.100
J2\x192.168.0.101
J3\x192.168.0.103
J4\x192.168.0.105
J5\x192.168.0.104
J6\x192.168.0.102
JEJE\x192.168.0.2

# clean existing down- and uplink qdiscs, hide errors
tc qdisc del dev $TARGETA0 root 2> /dev/null > /dev/null
# tc qdisc del dev $TARGETA0 ingress 2> /dev/null > /dev/null


tc qdisc add dev $TARGETA0 root handle 1: htb default 30 r2q 1
tc class add dev $TARGETA0 parent 1: classid 1:1 htb rate 50kbps ceil 
50kbps
tc class add dev $TARGETA0 parent 1:1 classid 1:10 htb rate 
${MINABUSE}kbps ceil ${MAXABUSE}kbps
tc class add dev $TARGETA0 parent 1:1 classid 1:11 htb rate 
${MINABUSE}kbps ceil ${MAXABUSE}kbps
tc class add dev $TARGETA0 parent 1:1 classid 1:12 htb rate 
${MINABUSE}kbps ceil ${MAXABUSE}kbps
tc class add dev $TARGETA0 parent 1:1 classid 1:13 htb rate 
${MINABUSE}kbps ceil ${MAXABUSE}kbps
tc class add dev $TARGETA0 parent 1:1 classid 1:14 htb rate 
${MINABUSE}kbps ceil ${MAXABUSE}kbps
tc class add dev $TARGETA0 parent 1:1 classid 1:15 htb rate 
${MINABUSE}kbps ceil ${MAXABUSE}kbps
tc class add dev $TARGETA0 parent 1:1 classid 1:16 htb rate 
${MINABUSE}kbps ceil ${MAXABUSE}kbps
tc class add dev $TARGETA0 parent 1:1 classid 1:17 htb rate 
${MINABUSE}kbps ceil ${MAXABUSE}kbps
tc class add dev $TARGETA0 parent 1:1 classid 1:18 htb rate 
${MINABUSE}kbps ceil ${MAXABUSE}kbps
tc class add dev $TARGETA0 parent 1:1 classid 1:19 htb rate 
${MINABUSE}kbps ceil ${MAXABUSE}kbps
tc class add dev $TARGETA0 parent 1:1 classid 1:20 htb rate 
${MINABUSE}kbps ceil ${MAXABUSE}kbps
tc class add dev $TARGETA0 parent 1:1 classid 1:21 htb rate 
${MINABUSE}kbps ceil ${MAXABUSE}kbps
tc class add dev $TARGETA0 parent 1:1 classid 1:22 htb rate 
${MINABUSE}kbps ceil ${MAXABUSE}kbps
tc class add dev $TARGETA0 parent 1:1 classid 1:23 htb rate 
${MINABUSE}kbps ceil ${MAXABUSE}kbps
tc class add dev $TARGETA0 parent 1:1 classid 1:24 htb rate 
${MINABUSE}kbps ceil ${MAXABUSE}kbps
tc class add dev $TARGETA0 parent 1:1 classid 1:25 htb rate 
${MINABUSE}kbps ceil ${MAXABUSE}kbps
tc class add dev $TARGETA0 parent 1:1 classid 1:26 htb rate 
${MINABUSE}kbps ceil ${MAXABUSE}kbps
tc class add dev $TARGETA0 parent 1:1 classid 1:27 htb rate 
${MINABUSE}kbps ceil ${MAXABUSE}kbps
tc class add dev $TARGETA0 parent 1:1 classid 1:28 htb rate 
${MINABUSE}kbps ceil ${MAXABUSE}kbps
tc class add dev $TARGETA0 parent 1:1 classid 1:29 htb rate 
${MINABUSE}kbps ceil ${MAXABUSE}kbps
tc class add dev $TARGETA0 parent 1:1 classid 1:30 htb rate 2kbps ceil 5kbps





tc filter add dev $TARGETA0 protocol ip parent 1:0 prio 1 u32  match ip 
dst ${A1} flowid 1:10
tc filter add dev $TARGETA0 protocol ip parent 1:0 prio 1 u32  match ip 
dst ${A2} flowid 1:11
tc filter add dev $TARGETA0 protocol ip parent 1:0 prio 1 u32  match ip 
dst ${A3} flowid 1:12
tc filter add dev $TARGETA0 protocol ip parent 1:0 prio 1 u32  match ip 
dst ${A4} flowid 1:13
tc filter add dev $TARGETA0 protocol ip parent 1:0 prio 1 u32  match ip 
dst ${A5} flowid 1:14
tc filter add dev $TARGETA0 protocol ip parent 1:0 prio 1 u32  match ip 
dst ${A6} flowid 1:15
tc filter add dev $TARGETA0 protocol ip parent 1:0 prio 1 u32  match ip 
dst ${A7} flowid 1:16
tc filter add dev $TARGETA0 protocol ip parent 1:0 prio 1 u32  match ip 
dst ${A8} flowid 1:17
tc filter add dev $TARGETA0 protocol ip parent 1:0 prio 1 u32  match ip 
dst ${B1} flowid 1:18
tc filter add dev $TARGETA0 protocol ip parent 1:0 prio 1 u32  match ip 
dst ${B2} flowid 1:19
tc filter add dev $TARGETA0 protocol ip parent 1:0 prio 1 u32  match ip 
dst ${B3} flowid 1:20
tc filter add dev $TARGETA0 protocol ip parent 1:0 prio 1 u32  match ip 
dst ${B4} flowid 1:21
tc filter add dev $TARGETA0 protocol ip parent 1:0 prio 1 u32  match ip 
dst ${B5} flowid 1:22
tc filter add dev $TARGETA0 protocol ip parent 1:0 prio 1 u32  match ip 
dst ${B6} flowid 1:23
tc filter add dev $TARGETA0 protocol ip parent 1:0 prio 1 u32  match ip 
dst ${J1} flowid 1:24
tc filter add dev $TARGETA0 protocol ip parent 1:0 prio 1 u32  match ip 
dst ${J2} flowid 1:25
tc filter add dev $TARGETA0 protocol ip parent 1:0 prio 1 u32  match ip 
dst ${J3} flowid 1:26
tc filter add dev $TARGETA0 protocol ip parent 1:0 prio 1 u32  match ip 
dst ${J4} flowid 1:27
tc filter add dev $TARGETA0 protocol ip parent 1:0 prio 1 u32  match ip 
dst ${J5} flowid 1:28
tc filter add dev $TARGETA0 protocol ip parent 1:0 prio 1 u32  match ip 
dst ${J6} flowid 1:29
tc filter add dev $TARGETA0 protocol ip parent 1:0 prio 1 u32  match ip 
dst ${JEJE} flowid 1:30

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

                 reply	other threads:[~2004-08-17  5:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4121967C.9060306@adinet.com.uy \
    --to=linuxman@adinet.com.uy \
    --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.