From: Chandrashekhar Joshi <shekhar@dishatech.com>
To: lartc@vger.kernel.org
Subject: [LARTC] am i on the right track ?
Date: Mon, 14 Jan 2002 01:44:44 +0000 [thread overview]
Message-ID: <marc-lartc-101099113808821@msgid-missing> (raw)
hi,
i am trying to have bandwidth shaping on my linux router.
i have a 64kbps link, on which i want to restrict the link use for http
/ftp access and give more bandwidth priority for vpn access. thanks to
martin devera i am using the htb for this.
|-----------| |-----------|
| MAIN LINK |-----+------| CLASS A |
|-----------| | |-----------|
|
|------+-----|
| CLASS B |
|------------|
MAIN LINK = 64kbps
CLASS A = 24kbps (for HTTP/ FTP and other internet related activities )
CLASS B = 40kbps ( reserved for PPTP-VPN access incoming and outgoing)
requirements :
each class should be able to borrow bandwidth from the other class when
excess is available
incoming vpn connections should come through the class B bandwidth policy
outgoing vpn connections should go through the class B bandwidth policy
following is the command set (lifted from the htb manual :-) ) i am
trying to use :
# tc qdisc add dev eth0 root handle 1: htb default 11
# tc class add dev eth0 parent 1: classid 1:1 htb rate 64kbps ceil 64
kbps burst 2k
# tc class add dev eth0 parent 1: classid 1:10 htb rate 64kbps ceil 64
kbps burst 2k
# tc class add dev eth0 parent 1: classid 1:11 htb rate 64kbps ceil 64
kbps burst 2k
# tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src
192.168.1.0 match tcp dst 21 0xffff flowid \ 1:10
# tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src
192.168.1.0 match tcp dst 80 0xffff flowid \ 1:10
# tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src
192.168.1.0 match tcp dst 443 0xffff flowid \ 1:10
# tc qdisc add dev eth0 parent 1:10 handle 20: pfifo limit 5
# tc qdisc add dev eth0 parent 1:11 handle 30: sfq perturb 10
first i would like to know whether what i have done is correct or not in
context with my problem , i think i am on right track ?
why i did what i did
now to meet the above requirements what i did was to define bandwidth
shaping only for http, https & ftp (the major bandwidth guzzlers to
class A and made the class B as default.
but because of above rulesets my other inet services (like domain, ssh,
whois, ping etc) will go through the default policy of class B, which i
want to avoid without adding additional rulesets; can i define a ruleset
for VPN something like below : (and remove the rulesets for class A
and make clas A as default)
# tc filter add dev eth0 protocol 47 parent 1:0 prio 1 u32 match ip src
192.168.1.0 flowid 1:11
# tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src
192.168.1.0 match tcp dst 1723 0xffff \
flowid 1:11
but how do i define the ruleset for incoming connections, can the
following be true
# tc filter add dev eth0 protocol 47 parent 1:0 prio 1 u32 match ip dst
192.168.1.0 flowid 1:11
# tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dst
192.168.1.0 match tcp dst 1723 0xffff \
flowid 1:11
thanx in advance
regards / shekhar
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/
next reply other threads:[~2002-01-14 1:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-14 1:44 Chandrashekhar Joshi [this message]
2002-01-14 9:44 ` [LARTC] am i on the right track ? Martin Devera
2002-01-14 12:38 ` Chandrashekhar Joshi
2002-01-14 12:52 ` Martin Devera
2002-01-14 12:57 ` Rob Kaper
2002-01-14 13:01 ` Martin Devera
2002-01-14 13:04 ` Rob Kaper
2002-01-14 13:18 ` Martin Devera
2002-01-14 13:57 ` Chandrashekhar Joshi
2002-01-16 9:39 ` Martin Devera
-- strict thread matches above, loose matches on Subject: below --
2002-01-14 14:08 [LARTC] Am I on the right Track? Sahil Gupta - NET4U
2002-01-15 0:52 ` Brendan Alderslade
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-101099113808821@msgid-missing \
--to=shekhar@dishatech.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox