tcng configuration question??
Linux Advanced Routing and Traffic Control
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Greetings all,
OK - just started playing around with
traffic shaping - have imq and htb and (I think) everything else I need
in the kernel and running well. My initial lab task was to protect
a H.323 session over a simulated half T1 while adding bulk traffic - got
that accomplished after slogging through learning tc and decided in short
order that a more intuitive interface would be required to scale this to
multiple networks with more complex traffic patterns. I settles in
on tcng because I thought the architecture looked pretty snifty - still
do though I'm open to suggestions.
I do have a tcng configuration question
though. I'm trying to replicate my earlier simple configuration with
TC. I'm sure what I have is far from optimal - but I wanted to stick
as close to my original tc architecture as I could so:
dev "imq0"
{
egress
{
class
(<$four_vip>)
if ip_src == 192.168.4.2/32;
class
(<$six_vip>)
if ip_src == 192.168.6.2/32;
class
(<$four_all>)
if ip_src == 192.168.4.0/24;
class
(<$six_all>)
if ip_src == 192.168.6.0/24;
htb
(rate 1600 kbps)
{
class (rate 800 kbps)
{
$four_vip
= class (prio 1)
{
sfq;
}
$four_all
= class (prio 2)
{
sfq;
}
}
class (rate 800 kbps)
{
$six_vip
= class (prio 1)
{
sfq;
}
$six_all
= class (prio 2)
{
sfq;
}
}
}
}
}
This config compiles with no errors
to:
tc qdisc del dev imq0 root
# ================================ Device imq0 ================================
tc qdisc add dev imq0 handle 1:0 root dsmark indices 8 default_index 0
tc qdisc add dev imq0 handle 2:0 parent 1:0 htb
tc class add dev imq0 parent 2:0 classid 2:1 htb rate 100000bps
tc class add dev imq0 parent 2:1 classid 2:2 htb rate 100000bps prio 1
tc qdisc add dev imq0 handle 3:0 parent 2:2 sfq
tc class add dev imq0 parent 2:1 classid 2:3 htb rate 100000bps prio 2
tc qdisc add dev imq0 handle 4:0 parent 2:3 sfq
tc class add dev imq0 parent 2:0 classid 2:4 htb rate 100000bps
tc class add dev imq0 parent 2:4 classid 2:5 htb rate 100000bps prio 1
tc qdisc add dev imq0 handle 5:0 parent 2:5 sfq
tc class add dev imq0 parent 2:4 classid 2:6 htb rate 100000bps prio 2
tc qdisc add dev imq0 handle 6:0 parent 2:6 sfq
tc filter add dev imq0 parent 2:0 protocol all prio 1 tcindex mask 0x7
shift 0
tc filter add dev imq0 parent 2:0 protocol all prio 1 handle 4 tcindex
classid 2:6
tc filter add dev imq0 parent 2:0 protocol all prio 1 handle 3 tcindex
classid 2:3
tc filter add dev imq0 parent 2:0 protocol all prio 1 handle 2 tcindex
classid 2:5
tc filter add dev imq0 parent 2:0 protocol all prio 1 handle 1 tcindex
classid 2:2
tc filter add dev imq0 parent 1:0 protocol all prio 1 u32 match u32 0xc0a80402
0xffffffff at 12 classid 1:1
tc filter add dev imq0 parent 1:0 protocol all prio 1 u32 match u32 0xc0a80602
0xffffffff at 12 classid 1:2
tc filter add dev imq0 parent 1:0 protocol all prio 1 u32 match u32 0xc0a80400
0xffffffff at 12 classid 1:3
tc filter add dev imq0 parent 1:0 protocol all prio 1 u32 match u32 0xc0a80600
0xffffffff at 12 classid 1:4
My question is regarding the last two
lines - shouldn't the masks for this be 0xffffff00 instead of 0xffffffff??
If I manually change them as noted then
the system works like a champ - if I leave them the way they are obviously
traffic from 192.168.4.1 (my traffic generation machine) doesn't get properly
categorized and falls totally outside of the htb structure.
Am I doing something incorrectly or
is this a bug? TCNG version 9m by the way.
John Dunning
Asst Dir Net and Tech Svcs
Wayne State College
[Index of Archives]
[LARTC Home Page]
[Netfilter]
[Netfilter Development]
[Network Development]
[Bugtraq]
[GCC Help]
[Yosemite News]
[Linux Kernel]
[Fedora Users]