All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Tsuladze <gio@ultracom.ge>
To: lartc@vger.kernel.org
Subject: [LARTC] htb 10 mbit to my router. HELP
Date: Sun, 07 Apr 2002 15:31:15 +0000	[thread overview]
Message-ID: <marc-lartc-101819354509045@msgid-missing> (raw)

As u see i have 512 kbit connection to internet. i have devided internet 
speed to some classes. i want ot have 10 mbit to my linux which  is 
shaping traffic. is this good script for it? Please help me to sellect 
traffic to  my linux and put it to 10 mbit, and internet traffic put to 
512 kbit.
give me en examples by iptables.
###################################################################
tc qdisc del dev eth0 root
#eht0 rules
tc qdisc add dev eth0 root handle 1: htb default 11
#shape interface eth0
tc class add dev eth0 parent 1: classid 1:1 htb rate 10mbit ceil 10mbit
tc class add dev eth0 parent 1:1 classid 1:2 htb rate 500kbit ceil 10mbit
tc class add dev eth0 parent 1:2 classid 1:3 htb rate 500kbit ceil 
500kbit burst 2k
tc class add dev eth0 parent 1:3 classid 1:4 htb rate 12kbit ceil 
500kbit burst 2k
#voip class
tc class add dev eth0 parent 1:3 classid 1:12 htb rate 100kbit ceil 
512kbit burst 2k
tc class add dev eth0 parent 1:3 classid 1:14 htb rate 100kbit ceil 
512kbit burst 2k
tc class add dev eth0 parent 1:3 classid 1:16 htb rate 100kbit ceil 
512kbit burst 2k
tc class add dev eth0 parent 1:3 classid 1:18 htb rate 100kbit ceil 
512kbit burst 2k
tc class add dev eth0 parent 1:3 classid 1:20 htb rate 100kbit ceil 
512kbit burst 2k
#staff class
tc class add dev eth0 parent 1:4 classid 1:11 htb rate 4kbit ceil 
512kbit burst 2k
tc class add dev eth0 parent 1:4 classid 1:13 htb rate 4kbit ceil 
512kbit burst 2k
tc class add dev eth0 parent 1:4 classid 1:15 htb rate 4kbit ceil 
512kbit burst 2k
tc class add dev eth0 parent 1:4 classid 1:17 htb rate 4kbit ceil 
512kbit burst 2k
#mark voip class
tc filter add dev eth0 parent 1: protocol ip prio 3 handle 2 fw classid 1:12
tc filter add dev eth0 parent 1: protocol ip prio 3 handle 4 fw classid 1:14
tc filter add dev eth0 parent 1: protocol ip prio 3 handle 6 fw classid 1:16
tc filter add dev eth0 parent 1: protocol ip prio 3 handle 8 fw classid 1:18
tc filter add dev eth0 parent 1: protocol ip prio 3 handle 10 fw classid 
1:20
#mark staff class
tc filter add dev eth0 parent 1: protocol ip prio 3 handle 1 fw classid 1:11
tc filter add dev eth0 parent 1: protocol ip prio 3 handle 3 fw classid 1:13
tc filter add dev eth0 parent 1: protocol ip prio 3 handle 5 fw classid 1:15
tc filter add dev eth0 parent 1: protocol ip prio 3 handle 7 fw classid 1:17
#add qdisc discipline voip
tc qdisc add dev eth0 parent 1:12 handle 32: sfq perturb 10
tc qdisc add dev eth0 parent 1:14 handle 34: sfq perturb 10
tc qdisc add dev eth0 parent 1:16 handle 36: sfq perturb 10
tc qdisc add dev eth0 parent 1:18 handle 38: sfq perturb 10
tc qdisc add dev eth0 parent 1:20 handle 40: sfq perturb 10
#add qdisc discipline staff
tc qdisc add dev eth0 parent 1:11 handle 41: sfq perturb 10
tc qdisc add dev eth0 parent 1:13 handle 43: sfq perturb 10
tc qdisc add dev eth0 parent 1:15 handle 45: sfq perturb 10
tc qdisc add dev eth0 parent 1:17 handle 47: sfq perturb 10

example ip-s
linux router ip 192.168.0.100
voip class
1:12  = 192.168.0.1
1:14  = 192.168.0.2
1:16  = 192.168.0.3
1:18  = 192.168.0.4
1:20  = 192.168.0.5
staff class
1:11 = 192.168.0.6
1:13 = 192.168.0.7
1:15 = 192.168.0.8
1;17 = 192.168.0.9


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

                 reply	other threads:[~2002-04-07 15:31 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=marc-lartc-101819354509045@msgid-missing \
    --to=gio@ultracom.ge \
    --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.