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 BAJADA=50 SUBIDA=10 MINABUSE=5 MAXABUSE=15 TARGETA0=eth0
A1=192.168.0.3 A2=192.168.0.4 A3=192.168.0.5 A4=192.168.0.6 A5=192.168.0.7 A6=192.168.0.8 A7=192.168.0.9 A8=192.168.0.10 B1=192.168.0.11 B2=192.168.0.12 B3=192.168.0.13 B4=192.168.0.14 B5=192.168.0.15 B6=192.168.0.16 J1=192.168.0.100 J2=192.168.0.101 J3=192.168.0.103 J4=192.168.0.105 J5=192.168.0.104 J6=192.168.0.102 JEJE=192.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@xxxxxxxxxxxxxxx http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/