Re: [mpls-linux-devel] About mpls-packet to ip-packet process
Status: Beta
Brought to you by:
jleu
From: James R. L. <jl...@mi...> - 2008-05-01 17:36:00
|
On Thu, May 01, 2008 at 03:55:33PM +0000, =?GB2312?B?wfXA2iA8b3JwaGVuX2xlaWxpdUBtc24uY29tPg==?= wrote: > > I'm sorry for my poor english. > Just like the follow instance. > > < Client Router>-------| LER |--------{ MPLS NETWORK } > > The packet from Client got into MPLS NETWORK, will through 'ip_rcv, ip_rcv_finish (ip_route_input ip_route_input_slow ip_mkroute_input __mkroute_input rt_set_nexthop mpls_set_nexthop mpl_set_nexthop2) ip_forward ip_forward_finish ip_output ip_finish_output ip_finish_output2 mpls_output mpls_output_shim mpls_output2 mpls_send'. Am I right? > And the packet from MPLS NETWORK to client, will through 'mpls_skb_recv mpls_input mpls_switch mpls_output2 mpls_send neighbour->output'. > If I want to the packet out from mpls_send got into ip_rcv ......, how to config it? > "mpls nhlfe add key 0 instruction pop nexthop ethX ipv4 (Client Router's IP)"? Right? This is a PHP config, IE no IPv4 route lookup is being done on the LER when the packet goes from MPLS to IPv4. For the packet to go through the IPv4 stack you will want your ILM to be something like: mpls ilm add label gen 200 labelspace 0 That is it. The default instruction on a ILM are "pop peek". Which results in mpls_input() returning MPLS_RESULT_DLV which ends up with the packet being handle via the IPv4 protocol driver's (net/ipv4/mpls4.c) local_deliver function. > ---------------------------------------- > > Date: Thu, 1 May 2008 06:45:41 -0500 > > From: jl...@mi... > > To: @mindspring.com > > CC: mpl...@li... > > Subject: Re: [mpls-linux-devel] About mpls-packet to ip-packet process > > > > Just to make sure I understand what you're trying to do: > > > > You want to get hooked into the PREROUTE netfilter chain for packets > > coming to a LER from MPLS. To do this the normal 'pop peek' instructions > > should work just. If you want to 'force' the trasistion from MPLS to > > IPv4 for packets coming to a LER from MPLS you can use the 'deliver' > > instruction on the associated ILM. > > > > On Thu, May 01, 2008 at 10:44:42AM +0000, =?GB2312?B?wfXA2iA8b3JwaGVuX2xlaWxpdUBtc24uY29tPg==?= wrote: > >> > >> I was follow the example of "IPv4 over MPLS: two LER example for mpls-linux-1.95x". > >> Do you means I have to change the "mpls nhlfe add key 0 instructions nexthop eth3 ipv4 192.168.1.4 > >> (returns key 0x2)" to "mpls nhlfe add key 0 instructions deliver nexthop eth3 ipv4 192.168.1.4 > >> (returns key 0x2)" ? > >> > >> ---------------------------------------- > >>> Date: Wed, 30 Apr 2008 21:16:22 -0500 > >>> From: jl...@mi... > >>> To: @mindspring.com > >>> CC: mpl...@li... > >>> Subject: Re: [mpls-linux-devel] About mpls-packet to ip-packet process > >>> > >>> Hmm. I think you are looking at the PHP code. Take a look at > >>> the 'deliver' instruction. It will show you that packets destined from > >>> IPv4 may be configured to go through 'ip_rcv' which will result in > >>> the packet travesing all of the IPv4 netfilter hooks. > >>> > >>> On Wed, Apr 30, 2008 at 03:56:51AM +0000, =?GB2312?B?wfXA2iA8b3JwaGVuX2xlaWxpdUBtc24uY29tPg==?= wrote: > >>>> > >>>> Hi all: > >>>> I found that the packet which from ip stack to mpls stack in the ip_finish_output2 had passed POSTROUTING hook in netfilter. > >>>> BUT the packet from mpls stack to ip stack just use neighbour->output, which NOT hook in PREROUTING in netfilter. > >>>> > >>>> In this way, if I do SNAT for ip packet and send into mpls stack, will NOT do Un-SNAT for the reply packet. > >>>> > >>>> Is my understand right? How to solved it? > >>>> _________________________________________________________________ > >>>> 用手机MSN聊天写邮件看空间,无限沟通,分享精彩! > >>>> http://mobile.msn.com.cn/ > >>>> > >>> > >>>> ------------------------------------------------------------------------- > >>>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > >>>> Don't miss this year's exciting event. There's still time to save $100. > >>>> Use priority code J8TL2D2. > >>>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > >>>> _______________________________________________ > >>>> mpls-linux-devel mailing list > >>>> mpl...@li... > >>>> https://lists.sourceforge.net/lists/listinfo/mpls-linux-devel > >>> > >>> > >>> -- > >>> James R. Leu > >>> jl...@mi... > >> > >> _________________________________________________________________ > >> MSN 中文网,最新时尚生活资讯,白领聚集门户。 > >> http://cn.msn.com > > > > -- > > James R. Leu > > jl...@mi... > > _________________________________________________________________ > MSN 中文网,最新时尚生活资讯,白领聚集门户。 > http://cn.msn.com -- James R. Leu jl...@mi... |