[mpls-linux-general] MPLS-Diffserv Instructions + Counters
Status: Beta
Brought to you by:
jleu
From: ncc49a <nc...@si...> - 2002-02-22 13:29:06
|
Hi Stefano, James and all, Stefano, when I put executed the "pop" before the exp2ds, it worked!! Thanks! However, I encountered another problem. 1) The exp->ds mapping is sometimes reflected incorrectly in the "/proc/mpls_*" files. 2) To test the exp2ds function, I have set up a couple of MPLS routers in serial, with non-MPLS hosts/routers at each ends. I then ping an end host from the other end. The non-Mpls host/router which is the origin will mark a packet's DSCP. The edge MPLS router will mark the EXP bits based on the DSCP value. The edge MPLS router at the end will re-mark the DSCP of the incoming packet, based on its EXP. As the packet returns, it will mark the outgoing EXP bits based on the new DSCP. The origin MPLS edge router will then remark the DSCP (again) based on the incoming new EXP bits. I monitor at the origin MPLS router's interfaces. I find that the new EXP bits on the shim of the returned incoming ping packet is correct. However,the returning packet on the outgoing interface of the origin MPLS edge (connected to the origin non-MPLS host/router) has its DSCP bits marked wrongly. Anyone knows what could be a possible reason? I have also tried the exp2tc.. function. I ran the following script. I think dsmark works like that: NEW_DS_FIELD = (tc_index & MASK) | VALUE. So with a MASK of 0xff and a VALUE of 0, I can check exp2tc function by setting the tc_index to the required DS field value, such that I get the desired DSCP value right? -----------------------------------SCRIPT STARTS-------------------------------------------------------- #!/bin/sh TC=tc ITF=eth1 DEST=192.168.0.1 # NEW_DS_FIELD = (tc_index & MASK) | VALUE # EF -> DSCP:0x2e DS:0xb8 # AF31-> DSCP: 0x1a DS:0x68 # AF21 -> DSCP:0x12 DS:0x48 MASK1=0xff VALUE1=0x0 $TC qdisc del dev $ITF root $TC qdisc add dev $ITF handle 1:0 root dsmark indices 64 $TC class change dev $ITF classid 1:1 dsmark mask $MASK1 value $VALUE1 $TC filter add dev $ITF parent 1:0 protocol ip prio 4 handle 1: u32 divisor 1 $TC filter add dev $ITF parent 1:0 prio 4 u32 \ match ip dst $DEST \ police rate 3Mbit burst 2K continue \ flowid 1:1 ------------------------------SCRIPT ENDS---------------------------------------------------- I have an incoming packet with label 199 and its EXP bit marked accordingly, to say 2. I execute the following command to set an incoming label. mplsadm2 -v -A -I gen:199:0 mplsadm2 -v -I gen:199:0 -i pop:exp2tc:2:184:peek As 184 is 0xb8, I should get a DS field of 0xb8 and a DSCP of 0x2e (EF), right? But, I don't. The whole DS field remains unmarked. I have tried : mplsadm2 -v -I gen:199:0 -i exp2tc:2:184:pop:peek But I dun think that worked either. Stefano, have u tried out the exp2tc function? I may have missed out things or did things wrongly... Do please correct me.. I will appreciate it greatly! Also, regarding counter support provided in /proc/net/mpls_* files. 1) Just to confirm, they are in this order -> pkts/bytes/drops ? 2) May I find out if anyone have verified these figures? Because I have tried comparing the figures of "mpls_in" of one MPLS edge router with the "mpls_out" of the MPLS edge router at the other end, when the only traffic between the 2 routers are ICMP ping packets. They do often differ. Maybe I have misunderstood what the actual figures in the /proc/net/mpls_* measure... Can anyone correct me? Sorry for the LONG mail post...:) Thanks a lot in advance. Regards, Paul |