All of lore.kernel.org
 help / color / mirror / Atom feed
From: arindam <ahiam@yahoo.com>
To: lartc@vger.kernel.org
Subject: [LARTC] need help in shaping traffic
Date: Fri, 28 Dec 2001 03:33:58 +0000	[thread overview]
Message-ID: <marc-lartc-100951048824186@msgid-missing> (raw)

hi all,
my system with kernel 2.4.16 & 2.4.17( RH-7.2) has
netfilter-1.2.4, iproute-ss010803, squid, dns with 4
ether cards.i am trying a simple situation where i
want to shape traffic all the interfaces. at present
iam using netfilter to allow a few ips, using
transparent squid & iproute to limit bandwidth. i feel
i must give more bandwidth for my local servers for my
office & customers.
i need some help from u Gurus in knowing what i did
wrong here.
a) y no trafic is passing thru the http handle 101.
infcat only the 102 handle is working(seen below) ??
b) whats recomended--marking pkts in iproute or
iptables ??
c) if i mark pkts with iptables, will i be still able
to use transparent squid as well as shape bandwidth(i
havnt tried this so far)

[root@cab2 root]# tc -s -d class ls dev eth1
class htb 2: parent 2:
class htb 2: parent 2:
class htb 2: parent 2:
class htb 2: parent 2:
class htb 2: parent 2:
[root@cab2 root]# tc -s -d qdisc ls dev eth1
qdisc pfifo 102: limit 2p
Sent 1067212 bytes 991 pkts (dropped 114, overlimits
0)
backlog 2p
 
 qdisc pfifo 101: limit 2p
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 
 qdisc pfifo 100: limit 2p
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 
 qdisc htb 2:
 Sent 1067296 bytes 993 pkts (dropped 114, overlimits
1414)
 backlog 2p

[root@cab2 root]# cat yemp
#!/bin/sh
tc qdisc add dev eth0 root handle 1: htb default 100
tc class add dev eth0 parent 1: classid 1:1 htb rate
10mbit burst 5k
tc class add dev eth0 parent 1:1 classid 1:10 htb rate
256kbit ceil 1mbit burst 2

tc class add dev eth0 parent 1:10 classid 1:100 htb
rate 2kbit burst 2
tc class add dev eth0 parent 1:10 classid 1:101 htb
rate 4kbit burst 2
tc class add dev eth0 parent 1:10 classid 1:102 htb
rate 32kbit burst 2
 
tc filter add dev eth0 protocol ip parent 1:0 prio 1
u32 match ip dst 10.1.1.0/24 match tcp dst 25 0xffff
flowid 1:100
tc filter add dev eth0 protocol ip parent 1:0 prio 1
u32 match tcp src 80 0xffff flowid 1:101
tc filter add dev eth0 protocol ip parent 1:0 prio 1
u32 match tcp dst 80 0xffff flowid 1:101
tc filter add dev eth0 protocol ip parent 1:0 prio 2
u32 match ip dst 10.1.1.0/24 flowid 1:102
 
##tc qdisc add dev eth0 parent 1:100 handle 101 sfq
perturb 10
tc qdisc add dev eth0 parent 1:100 handle 100 pfifo
limit 2
tc qdisc add dev eth0 parent 1:101 handle 101 pfifo
limit 2
tc qdisc add dev eth0 parent 1:102 handle 102 pfifo
limit 2
 
tc qdisc add dev eth1 root handle 2: htb
tc class add dev eth1 parent 2: classid 2:1 htb rate
10mbit burst 5k
tc class add dev eth1 parent 2:1 classid 2:10 htb rate
256kbit ceil 1mbit burst 2

tc class add dev eth1 parent 2:10 classid 2:100 htb
rate 2kbit burst 2
tc class add dev eth1 parent 2:10 classid 2:101 htb
rate 4kbit burst 2
tc class add dev eth1 parent 2:10 classid 2:102 htb
rate 32kbit burst 2
 
tc filter add dev eth1 protocol ip parent 2:0 prio 1
u32 match ip dst 10.1.1.0/24 match tcp dst 25 0xffff
flowid 2:100
tc filter add dev eth1 protocol ip parent 2:0 prio 1
u32 match tcp src 80 0xffff flowid 2:101
tc filter add dev eth1 protocol ip parent 2:0 prio 1
u32 match tcp dst 80 0xffff flowid 2:101
tc filter add dev eth1 protocol ip parent 2:0 prio 2
u32 match ip dst 10.1.1.0/24 flowid 2:102
 
##tc qdisc add dev eth1 parent 2:200 handle 102 sfq
perturb 10
tc qdisc add dev eth1 parent 2:100 handle 100 pfifo
limit 2
tc qdisc add dev eth1 parent 2:101 handle 101 pfifo
limit 2
tc qdisc add dev eth1 parent 2:102 handle 102 pfifo
limit 2
 
[root@cab2 root]# tc -s -d qdisc ls dev eth1
qdisc pfifo 102: limit 2p
Sent 1372419 bytes 1210 pkts(dropped 129, overlimits
0)
 backlog 1p
 
 qdisc pfifo 101: limit 2p
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 
 qdisc pfifo 100: limit 2p
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 
 qdisc htb 2:
 Sent 1372545 bytes 1213 pkts (dropped 129, overlimits
1744)
 backlog 1p
 

thanking u all in advance..
arindam


__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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

             reply	other threads:[~2001-12-28  3:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-28  3:33 arindam [this message]
2001-12-28  7:07 ` [LARTC] need help in shaping traffic bert hubert

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-100951048824186@msgid-missing \
    --to=ahiam@yahoo.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 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.