Re: [mpls-linux-general] A smaller network for label stack example
Status: Beta
Brought to you by:
jleu
|
From: James R. L. <jl...@mi...> - 2004-11-17 14:20:12
|
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 without > success) mplsadm2 -L eth0:-1 > 2) I've test PHP way, seeing settings of LER (in the last example WINDOWS) > 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 forwarding an unlabeled IP packet without doing a IP lookup. mpls-linux will always 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 the 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->child? 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 with > 0X2 NHLFE and an other opne with 0X3, These LSP originate from the source > 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 explain > 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 using > >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=2 > > iptable -A OUTPUT -s 3.3.3.3/32 -j MARK --set-mark=3 > > > >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:nhlfe>...' > > > >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 packet > >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 stack > >the NHLFE 0x4 looks to the nfmark on the packet and uses it to forward > >it to another NHLFE, if the nfmark is 0x2 the packet is further handled > >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 two > >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 the > 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, packets > >> from > >> be with an other one). How can i do this? > >> I've seen label stack example on mailing list and my answer is: instruction > >> 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 adesione. > >> 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/ > > > -- James R. Leu jl...@mi... |