Re: [mpls-linux-general] (no subject)
Status: Beta
Brought to you by:
jleu
From: Adrian P. <adr...@gm...> - 2008-01-28 08:55:03
|
Hello Rachid, Thanks for the attachement and sorry I didn't manage to reply this weekend (I didn't get close to the computer...). Looking into the examples, here's what you need to do: - from e1/scripts/network2/qos/e-lsp.sh: echo 'A3->A2' #do the following mapping: # DSCP EXP TCINDEX # 0x1E 3 1 # 0x00 0 3 #and push label 2000 for both of them var1=`mpls nhlfe add key 0 instructions ds2exp 0xf 0x1e 0x3 0x0 0x0 exp2tc 0x3 0x1 0x0 0x3 push gen 2000 nexthop eth3 ipv4 10.0.5.3 | grep key |cut -c 17-26` You need to create a label path with a key mapping your desired DSCP to a desired EXP. In this command, I mapped DSCP 0x1E to EXP 0x3 AND DSCP 0x00(best effort) to EXP 0x0. Furthermore, mapping DSCP to EXP is not enough - even if your packets will leave with the desired EXP values, Linux tc will not differentiate the traffic. You need to add exp2tc mapping so that packets with EXP 0x3 follow a specific tc rule and benefit from a specific bandwidth. In my case packets with EXP 0x3 have tcindex 1 (tcindex is just a number that has to be the same in the mpls command and in the tc commands) and packets with EXP 3 have tcindex 3: mpls nhlfe add key 0 instructions ds2exp 0xf 0x1e 0x3 0x0 0x0 exp2tc 0x3 0x1 0x0 0x3 push gen 2000 nexthop eth3 ipv4 10.0.5.3 The rest of the command is standard - add a new label (2000) and specify the nexthop interface (eth3) and nexthop ip (10.0.5.3). If you don't need to allocate bandwidth, you don't need the exp2tc 0x3 0x1 0x0 0x3 part. Oh, I nearly forgot - In the command ds2exp 0xf 0x1e 0x3 0x0 0x0, the 0xf is just a bit mask that is applied on the DSCP value (a logical OR), so that multiple DSCP values will be linked to a single EXP. If you want one-to-one mapping, you can set this mask to 0xf and forget about it. The new key generated by this command has to be linked with the forwarding plane by means of iptables: #create a FEC: packets with DSCP=0x1E and DSCP=0x00 go to nhlfe $var1 iptables -A FORWARD -m dscp --dscp 0x1e -j mpls --nhlfe $var1 iptables -A FORWARD -m dscp --dscp 0x0 -j mpls --nhlfe $var1 If you need to apply special bandwidth guarantees (per DSCP), you can do so with tc: #on output interface eth3, for MPLS traffic, map TCINDEX 1 to class 1:11 and TCINDEX 3 to class 1:13 tc qdisc add dev eth3 root handle 1: htb tc filter add dev eth3 parent 1:0 protocol 0x8847 prio 1 tcindex mask 0xf shift 0 pass_on tc filter add dev eth3 parent 1:0 protocol 0x8847 prio 1 handle 1 tcindex classid 1:11 tc filter add dev eth3 parent 1:0 protocol 0x8847 prio 1 handle 3 tcindex classid 1:13 #limit the output interface to 7200kbit and guarantee 2400kbit to EXP=3 traffic and 400kbit to EXP=0 traffic tc class add dev eth3 parent 1:0 classid 1:10 htb rate 7200kbit tc class add dev eth3 parent 1:10 classid 1:11 htb rate 2400kbit ceil 7200kbit tc class add dev eth3 parent 1:10 classid 1:13 htb rate 400kbit ceil 7200kbit tc qdisc add dev eth3 parent 1:11 handle 110: pfifo limit 10 tc qdisc add dev eth3 parent 1:13 handle 130: pfifo limit 10 You can find a very good tc and DSCP tutorial here: http://opalsoft.net/qos/DS.htm Now, you need to add these commands on the edge nodes of your MPLS network - both at ingress and at egress (because MPLS paths are unidirectional), and you should map them to the interface toward your MPLS cloud (in this example, eth3 goes to the P router). On the P routers you should only use exp2tc to make sure you have bandwidth guarantees for your EXP values (and also add the necessary tc rules). See e3/scripts/network2/qos/e-lsp.sh for details. Hope this helps, and good luck! On Jan 25, 2008 8:42 PM, rachid rachid <rac...@ho...> wrote: > > Hello Adrian, > I have already save your examples, you can find it attached in this mail. > > Thanks && BR, > R.Benbrahim > > ------------------------------ > Date: Fri, 25 Jan 2008 14:43:24 +0200 > From: adr...@gm... > To: rac...@ho... > Subject: Re: > > Hello Rachid, > > Sorry to dissapoint you, but it seems that the server where I hosted the > tutorials hasn't recovered yet (although the administrator had promissed me > it would be up by friday), so I don't have access to my examples. I'll look > into it this weekend and send you a reply. Sorry for the delay. > > Adrian > > On Jan 25, 2008 11:31 AM, rachid rachid <rac...@ho...> wrote: > > Hello Adrian, > Sorry to disturb you, did you remember me, i'am waiting to your response > and i can't progress, thanks to give feedback as soon as you can. > > Best regards, > R.Benbahim > > > ------------------------------ > Date: Wed, 23 Jan 2008 14:07:41 +0200 > From: adr...@gm... > To: rac...@ho... > Subject: Re: > > Hello Rachid, > > Sorry I didn't reply earlier, but it's a busy period for me. Unfortunately > I don't have access to my examples (the server they were hosted on has > crashed and is under recovery), but Thursday or Friday I should have access > to the examples, and show you what you must do. > > Adrian > > On Jan 20, 2008 2:42 PM, rachid rachid <rac...@ho...> wrote: > > Hello Adrian, > I want to make an experimentation MPLS-WIFI, the mpls clouds is composed > of three machines(R1=LER, R2=LSR, R3=LER) with Fedora 5, i have installed > the MPLS Kernel as described in your experimentation 'mpls-linux 1.950', > there is two other machine (windwosXP) wich dialog althought this mpls > clouds. > > PC1 Windows XP server---WIFI------------R1-R2-R3-------------WIFI---PC2 > Windows XP client > > I want to make an ftp tranfert from PC1 to PC2 using E-LSP, could you show > me the configuration of mapping DSCP-EXP to do. > > THANKS && BEST REGARDS, > Rachid. > > ------------------------------ > Express yourself instantly with MSN Messenger! MSN Messenger<http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/> > > > > ------------------------------ > Express yourself instantly with MSN Messenger! MSN Messenger<http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/> > > > > ------------------------------ > Express yourself instantly with MSN Messenger! MSN Messenger<http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/> > |