[LARTC] some prio questions

Linux Advanced Routing and Traffic Control

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

 



Hello,

I have some questions about prio queue discipline, hope somebody can
clear things up. I can't find good docs about it anywehere...


1) How does mapping works? For example, in this command

tc qdisc add dev ppp0 parent 2:1 handle 1: prio \
    bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1

Does this mean I have 16 priorities mapped this way?
Priority       BAND
   1      ->     1
   2      ->     2
   3      ->     2
   4      ->     2
   5      ->     1
   6      ->     2
   7      ->     0
   8      ->     0
   9      ->     1
  10      ->     1
  11      ->     1
  12      ->     1
  13      ->     1
  14      ->     1
  15      ->     1
  16      ->     1
 
2) On my local network, I want the machine 192.168.1.1 to have the
highest priority for every tcp/udp connection, and the 192.168.1.4 the
lowest, would the following setup correct?

tc qdisc add dev ppp0 root handle 10: prio
tc filter add dev ppp0 parent 10:0 protocol ip prio 16 u32 match ip src
192.168.1.4
tc filter add dev ppp0 parent 10:0 protocol ip prio  0 u32 match ip src
192.168.1.1

I also use ip tables to masq local machines on my DialUP linux machine,
like this:
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

I beleive the queueing is done before the packet is sent to the ppp0
interface, so I could use src 192.168.1.XX as u32 classifier, and after
that the masquerading is applied,so my rules will be matched, is that
correct?

(I use 2.4 kernel)

Thanks in advance

Nikolai



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