[LARTC] Understading details.

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,


I am implementing bandwidth control on my network and I have a few
doubts:

1. What exactly is the meaning of both sfq parameters 'quantum' and
'perturb'? When should I change them from their 'default' values - 1514b
and 15s?

2. I want to restrict 2 types of traffic: all originating in a certain
address and all originating from one other address with destination port
25. Everything else shall compete equally for the bandwidth available.
Does 2 classes shapping the first 2 types suffice or do I need to create
the third class to send everything else? If I need the third class, how
can I filter everything else to it? 

I believe I already implemented the first option (only 2 classes) with
the following lines:

/usr/local/sbin/tc qdisc add dev eth1 root handle 1: cbq bandwidth
128Kbit \
  avpkt 1000

/usr/local/sbin/tc class add dev eth1 parent 1:0 classid 1:1 cbq \
  bandwidth 128Kbit rate 128Kbit allot 1514 weight 12.8Kbit \
  prio 8 maxburst 20 avpkt 1000

/usr/local/sbin/tc class dev eth1 parent 1:1 classid 1:10 cbq \
  bandwidth 10Kbit allot 1514 weight 1Kbit prio 5 maxburst 20 \
  avpkt 1000 bounded

/usr/local/sbin/tc class dev eth1 parent 1:1 classid 1:20 cbq \
  bandwidth 30Kbit allot 1514 weight 3Kbit prio 5 maxburst 20 \
  avpkt 1000

/usr/local/sbin/tc qdisc add dev eth1 parent 1:10 sfq quantum 1514b \
  perturb 15

/usr/local/sbin/tc qdisc add dev eth1 parent 1:20 sfq quantum 1514b \
  perturb 15

/usr/local/sbin/tc filter add dev eth1 parent 1:0 protocol ip prio 10 \
  u32 match ip src 10.0.0.1 flowid 1:10

/usr/local/sbin/tc filter add dev eth1 parent 1:0 protocol ip prio 20 \
  u32 match ip src 10.0.0.2 match tcp dst 25 0xffff flowid 1:20

3. I have a 128Kbit permanent connection to the net. Actually my income
bandwidth connection is 128Kbit. My ISP is friendlier about outcome
bandwidth control. Does my root qdisc and class above limit my outcome
bandwidth to 128Kbit? If so, the solution is to raise this value, right?


Thanks in advance for your time,

Rodrigo Severo



[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux