Hi,
I want to setup core routers to do both DSCP marking
and to get the DSCP and forward packets based on DS
field. I don't want to separate DSCP marking to be
done only at the edge routers.

I know that dsmark is both used for DSCP marking and
for getting the DSCP and forwarding packets according
to DSCPs. In my case, since I want to do both of these

I need two dsmarks.(?) I am not clear with how to
connect output of the outer dsmark (that does DSCP
marking) to the inner dsmark that will get the DSCP
and put the packets in related qdiscs. Are there any
samples of doing these two jobs at the same place? If
anyone has ever done this before, does it degrade
performance too much?

Below is a piece of code I use for DSCP marking at
edge:
tc qdisc add dev eth0 handle 1:0 root dsmark indices
64
tc class change dev eth0 classid 1:1 dsmark mask 0x3
value 0xb8
tc class change dev eth0 classid 1:2 dsmark mask 0x3
value 0x58
tc filter add dev eth0 parent 1:0 prio 1 u32 match ip
dport 0x%x 0xffff flowid 1:1
tc filter add dev eth0 parent 1:0 prio 2 u32 match ip
dport 0x%x 0xffff flowid 1:2

Below is a similar kind of code I use at core for
getting DSCP and distributing packets to classes:

tc qdisc add dev eth0 handle 1:0 root dsmark indices
64 set_tc_index
tc filter add dev eth0 parent 1:0 protocol ip prio 1
tcindex mask 0xfc shift 2 
tc qdisc add dev eth0 parent 1:0 handle 2:0 cbq
bandwidth 10Mbit cell 8 avpkt 1000 mpu 64 
tc class add dev eth0 parent 2:0 classid 2:1 cbq
bandwidth 10Mbit rate 1500Kbit avpkt 1000 prio 1
bounded isolated allot 1514 weight 1 maxburst 10
tc qdisc add dev eth0 parent 2:1 pfifo limit 5 
tc filter add dev eth0 parent 2:0 protocol ip prio 1
handle 0x2e tcindex classid 2:1 pass_on
...
I need to connect the two piece of code above at core
router but I need help on this. Thx in advance.

Gunes



        
                
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 
_______________________________________________
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

Reply via email to