All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] can this work?
@ 2004-08-17  5:24 Leandro Patrón
  0 siblings, 0 replies; only message in thread
From: Leandro Patrón @ 2004-08-17  5:24 UTC (permalink / raw)
  To: lartc

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/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-08-17  5:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-17  5:24 [LARTC] can this work? Leandro Patrón

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.