(yet another) HTB question(s)

Linux Advanced Routing and Traffic Control

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

 



Hi, I've read the documentation about HTB and I pretty much
managed to grasp how it works. In theory. But there still
are some questions and I want to check with you to see if I
understand things correctly. So here goes:
1) when used on a router for shaping traffic done by
clients connected to it, shaping is done on the interface
connected to the cable/dsl modem. If I wanted to create
classes for every client on the network, I would have to
use iptables to mark packets (using -j MARK) and not
filters because, according to
http://www.docum.org/docum.org/kptd/ the shaping is done
after the SNAT, so all the clients would have the src
address rewritten with the public IP. Am I getting this
right?
2) shaping inbound traffic is tricky because you can't
control the rate that the packets come to you. Is it a good
idea to shape the outgoing traffic to the clients on the
LAN side NIC? Would I achieve both upload and download
shaping using the same htb script (a script that does
shaping using iptables for marking packets and fw for
matching them) on both NICs (LAN side and ISP side)?
3) I've tried to find an answer to this question but all I
got was some similar question a couple of years ago from
Martin Brown. What happens if shaping a variable bandwidth
link and, at one moment, for a period of time, the
available bandwidth goes beyond the rate specified for the
class 1:1 (the class attached to the root qdisc)? How will
htb act in such a situation?
4) related to 3), I've tried to use a syntax like this: "tc
clas add dev $ETH parent 1:0 classid 1:1 htb rate $RATE
ceil $CEIL", where CEIL > RATE , but the  max speed I
achieved was the RATE speed. After further reading, I found
out that you can't (well, you can, there's no syntax error,
but it's useless) specify CEIL for the class attached to
the root qdisc because it doesn't have a parent to borrow
from. So is there a way to simulate a variable bandwidth
link or should I just set RATE to the highest possible
value the bandwidth can reach?
5) related to 1). Is there a (major) difference between -j
MARK and -j CLASSIFY? From what I've read, -j CLASSIFY sets
both the major and minor (major:minor) numbers to be
matched while -j MARK only sets the minor.

That's about it for now. :) Thanks


		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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