Hi, I have a probleme with this tc configuration.
I send packets to destination address 10.0.0.9, but it seems not to
match my filter,
and those packets go to the 1:3 packets (when I remove split and defmap,
they go
on the qdisc default class). Here is the code and the statistics I get :

-----
CODE
-----
#!/bin/sh
TC=/sbin/tc

# Attaching the Qdisc to the eth0 device.  The maximum available
bandwidth is
# 10Mbit.
$TC qdisc add dev eth0 root handle 1: cbq bandwidth 10Mbit allot 1514
cell 8 avpkt 1000
 mpu 64

# Adding the root class to the queuing discipline. The root has 10 Mbit
# completely.
$TC class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 10Mbit rate
10Mbit allot 1514
cell 8 weight 1Mbit prio 8 maxburst 20 avpkt 1000

# Setting up the classes for the traffic appropriately.
$TC class add dev eth0 parent 1:1 classid 1:2 cbq bandwidth 10Mbit rate
1Mbit allot 1514
cell 8 weight 100Kbit prio 1 maxburst 20 avpkt 1000 split 1:0 defmap
0xc0
$TC class add dev eth0 parent 1:1 classid 1:3 cbq bandwidth 10Mbit rate
9Mbit allot 1514
cell 8 weight 900Kbit prio 7 maxburst 20 avpkt 1000 split 1:0 defmap
0xff3f

# Installing a u32 classifier for the traffic
$TC filter add dev eth0 parent 1:0 prio 8 protocol ip u32

# Creating  hash tables for classification of the packets
$TC filter add dev eth0 parent 1:0 prio 8 handle 1: u32 divisor 256

# Configuring the 6th slot (for TCP) of the hash table 1 to select
packets with
# the tos bit set to 192 (0xc0) and direct these to class 1:2
$TC filter add dev eth0 parent 1:0 prio 8 u32 ht 1:6: match ip dst
10.0.0.9 flowid 1:2

# Configuring the 17th (for UDP) slot of the hash table 1 to select
packets
# with the dst addr set to 10.0.0.9 and direct these to class 1:2
$TC filter add dev eth0 parent 1:0 prio 8 u32 ht 1:17: match ip dst
10.0.0.9 flowid 1:2

# Lookup hash table and if it is not fragmented, use the protocol as the
hash
# key.
$TC filter add dev eth0 parent 1:0 prio 8 handle ::1 u32 ht 800:: match
ip nofrag offset mask
0x0F00 shift 6 hashkey mask 0x00ff0000 at 8 link 1:

----
STATS for classes
----
class cbq 1: root rate 10Mbit cell 8b mpu 64b (bounded,isolated) prio
no-transmit/8 weight 10Mbit allot 1514b
level 2 ewma 5 avpkt 1000b maxidle 23us
 Sent 144703109 bytes 101076 pkts (dropped 0, overlimits 0)
  borrowed 0 overactions 0 avgidle 624 undertime 0
class cbq 1:1 parent 1: rate 10Mbit cell 8b prio no-transmit/8 weight
1Mbit allot 1514b
level 1 ewma 5 avpkt 1000b maxidle 23us
 Sent 144703109 bytes 101076 pkts (dropped 0, overlimits 0)
  borrowed 46787 overactions 0 avgidle 624 undertime 0
class cbq 1:2 parent 1:1 rate 1Mbit cell 8b prio 1/1 weight 100Kbit
allot 1514b
level 0 ewma 5 avpkt 1000b maxidle 6090us
split 1: defmap 000000c0
 Sent 18876 bytes 137 pkts (dropped 0, overlimits 0)
  borrowed 0 overactions 0 avgidle 159654 undertime 0
class cbq 1:3 parent 1:1 rate 9Mbit cell 8b prio 7/7 weight 900Kbit
allot 1514b
level 0 ewma 5 avpkt 1000b maxidle 74us
split 1: defmap 0000ff3f
 Sent 144684233 bytes 100939 pkts (dropped 0, overlimits 0)
  borrowed 46787 overactions 0 avgidle 1970 undertime 0

If someone could help, and tell me where I'm wrong in the
configuration...

Thx in advance,

Seb.

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to