Thread: Re: [mpls-linux-general] MPLS and scheduling for QoS
Status: Beta
Brought to you by:
jleu
From: lucapilosu\@libero\.it <luc...@li...> - 2008-05-13 14:23:43
|
Ok, with exp2tc I can create a MPLS command like this: var_default=`mpls nhlfe add key 0 instructions exp2tc 0x3 0x1 push gen 600 nexthop ath1 ipv4 10.0.6.4|grep key| cut -c 17-26` mpls xc add ilm_label gen 500 ilm_labelspace 0 nhlfe_key $var_default But, if I have multiple EXPs to be mapped, for instance 0x3, 0x6 and 0x0 have I got to do like in LER E1, where I created 3 mpls entries and then I mapped them with iptables specifying the target with "-j" option? (iptables -t mangle -A FORWARD -s 172.16.30.0/24 -m dscp --dscp 0x06 -j mpls --nhlfe $key_1) this way I'm still reading Layer 3 information...right? Or I can do something like this? var_default=`mpls nhlfe add key 0 instructions exp2tc 0x3 0x1 exp2tc 0x6 0x2 exp2tc 0x0 0x3 push gen 600 nexthop ath1 ipv4 10.0.6.4|grep key| cut -c 17-26` Thanks a lot, you're very helpful! Luca |
From: lucapilosu\@libero\.it <luc...@li...> - 2008-05-14 07:22:13
|
Ok, I think I've done it, thank you. Another thing, can I map directly different labels on TCs, without using exp bits? What I mean is, if I have one flow which arrives with label 300 and another one with 500, can I schedule them differently without writing EXP field? Thank you, Luca ---------- Initial Header ----------- >From : "Adrian Popa" adr...@gm... To : "luc...@li..." luc...@li... Cc : "jleu" jl...@mi...,"mpls-linux-general" mpl...@li... Date : Tue, 13 May 2008 23:03:16 +0300 Subject : Re: [mpls-linux-general] MPLS and scheduling for QoS > No need for multiple iptables targets ... > > On Tue, May 13, 2008 at 5:23 PM, luc...@li... <luc...@li...> > wrote: > > > Ok, with exp2tc I can create a MPLS command like this: > > > > var_default=`mpls nhlfe add key 0 instructions exp2tc 0x3 0x1 push gen 600 > > nexthop ath1 ipv4 10.0.6.4|grep key| cut -c 17-26` > > mpls xc add ilm_label gen 500 ilm_labelspace 0 nhlfe_key $var_default > > > > But, if I have multiple EXPs to be mapped, for instance 0x3, 0x6 and 0x0 > > have I got to do like in LER E1, where I created 3 mpls entries and then I > > mapped them with iptables specifying the target with "-j" option? > > (iptables -t mangle -A FORWARD -s 172.16.30.0/24 -m dscp --dscp 0x06 -j > > mpls --nhlfe $key_1) this way I'm still reading Layer 3 information...right? > > > > Or I can do something like this? > > var_default=`mpls nhlfe add key 0 instructions exp2tc 0x3 0x1 exp2tc 0x6 > > 0x2 exp2tc 0x0 0x3 push gen 600 nexthop ath1 ipv4 10.0.6.4|grep key| cut -c > > 17-26` > > > > You're close, but you don't need to issue multiple exp2tc parameters - you > can use multiple mappings in the same parameter: > > var_default=`mpls nhlfe add key 0 instructions exp2tc 0x3 0x1 0x6 0x2 0x0 > 0x3 push gen 600 nexthop ath1 ipv4 10.0.6.4|grep key| cut -c 17-26` > > This is how I remember it, anyway... > > > > > > > Thanks a lot, you're very helpful! > > Luca > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > mpls-linux-general mailing list > > mpl...@li... > > https://lists.sourceforge.net/lists/listinfo/mpls-linux-general > > > |
From: Adrian P. <adr...@gm...> - 2008-05-14 11:15:11
|
Hello Luca, I don't know if you can - look if the mpls command has a switch - something like --set-tcindex; if it does, you can, otherwise I don't know if you can... On Wed, May 14, 2008 at 10:22 AM, luc...@li... <luc...@li...> wrote: > Ok, I think I've done it, thank you. > Another thing, can I map directly different labels on TCs, without using > exp bits? > What I mean is, if I have one flow which arrives with label 300 and another > one with 500, can I schedule them differently without writing EXP field? > Thank you, > Luca > > > > > > ---------- Initial Header ----------- > > >From : "Adrian Popa" adr...@gm... > To : "luc...@li..." luc...@li... > Cc : "jleu" jl...@mi...,"mpls-linux-general" > mpl...@li... > Date : Tue, 13 May 2008 23:03:16 +0300 > Subject : Re: [mpls-linux-general] MPLS and scheduling for QoS > > > > > > > > > No need for multiple iptables targets ... > > > > On Tue, May 13, 2008 at 5:23 PM, luc...@li... < > luc...@li...> > > wrote: > > > > > Ok, with exp2tc I can create a MPLS command like this: > > > > > > var_default=`mpls nhlfe add key 0 instructions exp2tc 0x3 0x1 push gen > 600 > > > nexthop ath1 ipv4 10.0.6.4|grep key| cut -c 17-26` > > > mpls xc add ilm_label gen 500 ilm_labelspace 0 nhlfe_key $var_default > > > > > > But, if I have multiple EXPs to be mapped, for instance 0x3, 0x6 and > 0x0 > > > have I got to do like in LER E1, where I created 3 mpls entries and > then I > > > mapped them with iptables specifying the target with "-j" option? > > > (iptables -t mangle -A FORWARD -s 172.16.30.0/24 -m dscp --dscp 0x06 > -j > > > mpls --nhlfe $key_1) this way I'm still reading Layer 3 > information...right? > > > > > > Or I can do something like this? > > > var_default=`mpls nhlfe add key 0 instructions exp2tc 0x3 0x1 exp2tc > 0x6 > > > 0x2 exp2tc 0x0 0x3 push gen 600 nexthop ath1 ipv4 10.0.6.4|grep key| > cut -c > > > 17-26` > > > > > > > You're close, but you don't need to issue multiple exp2tc parameters - > you > > can use multiple mappings in the same parameter: > > > > var_default=`mpls nhlfe add key 0 instructions exp2tc 0x3 0x1 0x6 0x2 > 0x0 > > 0x3 push gen 600 nexthop ath1 ipv4 10.0.6.4|grep key| cut -c 17-26` > > > > This is how I remember it, anyway... > > > > > > > > > > > Thanks a lot, you're very helpful! > > > Luca > > > > > > > > > > ------------------------------------------------------------------------- > > > This SF.net email is sponsored by: Microsoft > > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > _______________________________________________ > > > mpls-linux-general mailing list > > > mpl...@li... > > > https://lists.sourceforge.net/lists/listinfo/mpls-linux-general > > > > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > mpls-linux-general mailing list > mpl...@li... > https://lists.sourceforge.net/lists/listinfo/mpls-linux-general > |
From: Adrian P. <adr...@gm...> - 2008-05-13 20:03:30
|
No need for multiple iptables targets ... On Tue, May 13, 2008 at 5:23 PM, luc...@li... <luc...@li...> wrote: > Ok, with exp2tc I can create a MPLS command like this: > > var_default=`mpls nhlfe add key 0 instructions exp2tc 0x3 0x1 push gen 600 > nexthop ath1 ipv4 10.0.6.4|grep key| cut -c 17-26` > mpls xc add ilm_label gen 500 ilm_labelspace 0 nhlfe_key $var_default > > But, if I have multiple EXPs to be mapped, for instance 0x3, 0x6 and 0x0 > have I got to do like in LER E1, where I created 3 mpls entries and then I > mapped them with iptables specifying the target with "-j" option? > (iptables -t mangle -A FORWARD -s 172.16.30.0/24 -m dscp --dscp 0x06 -j > mpls --nhlfe $key_1) this way I'm still reading Layer 3 information...right? > > Or I can do something like this? > var_default=`mpls nhlfe add key 0 instructions exp2tc 0x3 0x1 exp2tc 0x6 > 0x2 exp2tc 0x0 0x3 push gen 600 nexthop ath1 ipv4 10.0.6.4|grep key| cut -c > 17-26` > You're close, but you don't need to issue multiple exp2tc parameters - you can use multiple mappings in the same parameter: var_default=`mpls nhlfe add key 0 instructions exp2tc 0x3 0x1 0x6 0x2 0x0 0x3 push gen 600 nexthop ath1 ipv4 10.0.6.4|grep key| cut -c 17-26` This is how I remember it, anyway... > > > Thanks a lot, you're very helpful! > Luca > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > mpls-linux-general mailing list > mpl...@li... > https://lists.sourceforge.net/lists/listinfo/mpls-linux-general > |