Re: [mpls-linux-general] A smaller network for label stack example
Status: Beta
Brought to you by:
jleu
|
From: <ed...@ti...> - 2004-11-17 16:19:21
|
>-- Messaggio Originale -- >From: "James R. Leu" <jl...@mi...> I've seen that there is a mail on the mailing list that explain how MPLS for Linux works but i don't remember which it is. I'm going to revisit ma= iling list to find it >To: ed...@ti... >Cc: mpl...@li... >Subject: Re: [mpls-linux-general] A smaller network for label stack exam= ple >Reply-To: jl...@mi... >Date: Wed, 17 Nov 2004 08:20:21 -0600 > > >On Wed, Nov 17, 2004 at 11:13:49AM +0100, ed...@ti... wrote: >> Many questions for you James, please answer me: >> 1) when i pass from MPLS to IP i've seen that label space stay already= >setted, >> how can i remove this setting? (i've tryed mplsadm2 -D -L eth0:0 witho= ut >> success) > >mplsadm2 -L eth0:-1 > >> 2) I've test PHP way, seeing settings of LER (in the last example WIND= OWS) >> i've seen that it has already ILM setted, can this setting invalid my test >> in any way (if i'm right the link between the last LSR and the LER in PHP >> way must be all IP, isn't it?) > >mpls-linux does not do proper PHP. Proper PHP would result in a LSR for= warding >an unlabeled IP packet without doing a IP lookup. mpls-linux will alway= s >do an IP lookup on unlabeled packet. > >> 3) You have told me that "At the point of exiting the IP stack it is redirected >> to MPLS via the special nexthop 0x4." what dooes it mean? NHLFE is an entry >> in /mpls/out table, can you explain me better? > >I think the best way for you to understand what that means is to read th= e >code. >Start looing in linux/net/ipv4/route.c look in the function called >rt_set_nexthop(). See how it calls spec_nh->func() in the case of MPLS >spec_nh->func() is mpls_set_nexthop() which can be found in >linux/net/mpls/mpls_output.c. Notice how mpls_set_nexthop sets dst->chi= ld? >Now go look at linux/net/ipv4/ip_output.c Look for the function >ip_finish_output2(). Notice what happens is dst->child is set? >In the case of MPLS dst_output() calls mpls_output() which can be >found in linux/net/mpls/mpls_output.c > >> I'd like to send packets from different source to the same destination= >trough >> my MPLS network, if i've understtod your explanation you set an LSP wi= th >> 0X2 NHLFE and an other opne with 0X3, These LSP originate from the sou= rce >> of traffic to the LER, after you forward these packets trought LSP 0x4= . >> In my intention source and destination of packets are IP hosts, label stack >> in my idea is made by one from the I-LER to the E-LER and one that exp= lain >> which hosts has generated traffic forwarded. > >The example I sent you does exactly that. IP packets from 2 different hosts >get sent on different LSPs destined for the same host. > >> Can you help me? >> >> >> >> >> >> >> >-- Messaggio Originale -- >> >From: "James R. Leu" <jl...@mi...> >> >To: ed...@ti... >> >Cc: mpl...@li... >> >Subject: Re: [mpls-linux-general] A smaller network for label stack example >> >Reply-To: jl...@mi... >> >Date: Tue, 16 Nov 2004 11:54:30 -0600 >> > >> > >> >Lets look at the case where you want traffic from different hosts usi= ng >> >different LSPs: >> > >> >You use iptables to differentiate the traffic from the two different hosts. >> > >> > iptable -A OUTPUT -s 2.2.2.2/32 -j MARK --set-mark=3D2 >> > iptable -A OUTPUT -s 3.3.3.3/32 -j MARK --set-mark=3D3 >> > >> >You then need to make sure you have a route installed for the >> >destination which points to a NHLFE: >> > >> > ip route add 4.4.4.4/32 via 192.168.2.1 spec_nh 0x8847 0x4 >> > >> >Where 0x4 is the key for a NHLFE which was created like this: >> > >> > mplsadm2 -A -O 0 >> > (key 0x2) >> > mplsadm2 -A -O 0 >> > (key 0x3) >> > mplsadm2 -A -O 0 >> > (key 0x4) >> > mplsadm2 -O 0x2 -o push:gen:200:set:eth0:ipv4:192.168.2.1 >> > mplsadm2 -O 0x3 -o push:gen:300:set:eth0:ipv4:192.168.2.1 >> > mplsadm2 -O 0x4 -o nffwd:0xf:0x2:0x2:0x3:0x3 >> > >> >NOTE: the format of the nffwd command is '<mask>:<mark:nhlfe>:<mark:n= hlfe>...' >> > >> >Explaination: >> > >> >Traffic arrives at the LER with source 2.2.2.2 and destination 4.4.4.= 4. >> >Iptables looks at the source and 'marks' the packet with 0x2. >> >(the mark is internal to the kernel, it is called a nfmark). The pac= ket >> >continues through the IP stack. At the point of exiting the IP stack= >> >it is redirected to MPLS via the special nexthop 0x4. In the MPLS st= ack >> >the NHLFE 0x4 looks to the nfmark on the packet and uses it to forwar= d >> >it to another NHLFE, if the nfmark is 0x2 the packet is further handl= ed >> >by NHLFE 0x2. NHLFE 0x2 pushes and label and send that packet. >> > >> >If you would like to add another level of stacking you could do it tw= o >> >different ways. Either have NHFLE 0x2 and 0x3 do multiple pushes or you >> >could have the fwd to another NHLFE which does a push and the final set. >> >The details of this are left as an excersise for the reader. >> > >> > >> >On Tue, Nov 16, 2004 at 06:26:56PM +0100, ed...@ti... wrote: >> >> Hi >> >> i'd like to set a label stack between PCLENTO1 and TOSHIBA (see th= e >> attachment) >> >> After my test should be this: i receive on WINDOWS traffic from 2 host >> >(that >> >> represent 2 network) that is destinated to network >> >> linked with TOSHIBA and i would that, through my network packets are >> labelled >> >> basing on host it come from (packets from host A with a label, pac= kets >> >> from >> >> be with an other one). How can i do this? >> >> I've seen label stack example on mailing list and my answer is: in= struction >> >> for r3 in the example is for PCLENTO1, those for R4 is for TOSHIBA= >and >> >> noone >> >> for R2 in the example, aren't they? >> >> Thanks a lots for all help you give me >> >> >> >> __________________________________________________________________ >> >> Tiscali Adsl 2 Mega Free: naviga gratis tutto l'anno! >> >> Supera tutti i limiti di velocita' con Tiscali Adsl 2 Mega Free. >> >> Sei libero da costi fissi e, se ti abboni entro il 25 novembre, >> >> navighi gratis fino al 31 dicembre 2004 e non paghi il costo di ade= sione. >> >> http://abbonati.tiscali.it/adsl/ >> >> >> >> >> >> >> > >> > >> > >> >-- >> >James R. Leu >> >jl...@mi... >> > >> > >> >------------------------------------------------------- >> >This SF.Net email is sponsored by: InterSystems CACHE >> >FREE OODBMS DOWNLOAD - A multidimensional database that combines >> >robust object and relational technologies, making it a perfect match >> >for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 >> >_______________________________________________ >> >mpls-linux-general mailing list >> >mpl...@li... >> >https://lists.sourceforge.net/lists/listinfo/mpls-linux-general >> >> >> __________________________________________________________________ >> Tiscali Adsl 2 Mega Free: naviga gratis tutto l'anno! >> Supera tutti i limiti di velocita' con Tiscali Adsl 2 Mega Free. >> Sei libero da costi fissi e, se ti abboni entro il 25 novembre, >> navighi gratis fino al 31 dicembre 2004 e non paghi il costo di adesio= ne. >> http://abbonati.tiscali.it/adsl/ >> >> >> > >-- >James R. Leu >jl...@mi... > > >------------------------------------------------------- >This SF.Net email is sponsored by: InterSystems CACHE >FREE OODBMS DOWNLOAD - A multidimensional database that combines >robust object and relational technologies, making it a perfect match >for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 >_______________________________________________ >mpls-linux-general mailing list >mpl...@li... >https://lists.sourceforge.net/lists/listinfo/mpls-linux-general __________________________________________________________________ Tiscali Adsl 2 Mega Free: naviga gratis tutto l'anno! Supera tutti i limiti di velocita' con Tiscali Adsl 2 Mega Free. Sei libero da costi fissi e, se ti abboni entro il 25 novembre, navighi gratis fino al 31 dicembre 2004 e non paghi il costo di adesione.= http://abbonati.tiscali.it/adsl/ |