[LARTC] problem about sch_dsmark

Linux Advanced Routing and Traffic Control

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

 



Hi,everybody
I met a problem when i configured diffserv edge
router using tc.I want to use "dsmark" qdisc to
remark the DS field of the packets going through the
router and also use some other qdisc (such as
pfifo,red) to implement the EF and AF PHB.
My script is listed below:
####################################################
#!/bin/bash
tc qdisc add dev eth1 handle 1:0 root dsmark indices 64
tc class change dev eth1 classid 1:1 dsmark mask 0x3
value 0xb8
tc class change dev eth1 classid 1:2 dsmark mask 0x3
value 0x68
tc class change dev eth1 classid 1:3 dsmark mask 0x3
value 0x48
tc filter add dev eth1 parent 1:0 protocol ip prio 4
handle 1: u32 divisor 1
tc filter add dev eth1 parent 1:0 protocol ip prio 5
handle 2: u32 divisor 1
tc filter add dev eth1 parent 1:0 prio 4 u32 match
ip dst 10.15.35.167/32 match ip dport 0x15 0xffff
police rate 1Mbit burst 2K continue flowid 1:1
tc filter add dev eth1 parent 1:0 prio 5 u32 match
ip dst 10.15.35.167/32 match ip dport 0x15 0xffff
flowid 1:2
tc filter add dev eth1 parent 1:0 prio 4 u32 match
ip dst 10.15.35.167/32 match ip dport 0x17 0xffff
flowid 1:3

echo EF data ...
tc qdisc add dev eth1 parent 1:1 pfifo limit 5
echo AF1 data ...
tc qdisc add dev eth1 parent 1:2 red limit 60KB min
15KB max 45KB burst 20 avpkt 1000 bandwidth 10Mbit
probability 0.4
echo AF2 data ...
tc qdisc add dev eth1 parent 1:3 red limit 60KB min
5KB max 30KB burst 20 avpkt 1000 bandwidth 10Mbit
probability 0.4
####################################################

When I ran the script,I got such messge:
"EF data ...
AF1 data ...
RTNETLINK answers: File exists
AF2 data ...
RTNETLINK answers: File exists "

And when I typed the command "tc qdisc ls dev eth1"
to see the qdisc information,only the "dsmark" qdisc
and "pfifo" qdisc are configured,missing the "red"
qdisc:
"qdisc pfifo 800b: limit 5p
qdisc dsmark 1: indices 0x0040 "

What's wrong with my script and how can I correct my
script to meet my ends. 
Waiting for your reply...Thank you.




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