On Mon, Apr 03, 2017 at 08:37:46PM +0800, 倪红军 wrote:
> Hi Neale,
> 
> 
> The intent of this classification is to direct OSPF packet to the node  
> tap-inject-neighbor, 
> Then the OSPF packet can be redirected to BIRD in Hosting system.

You shouldn't need to use the classifier. A multicast route (and
all OSPF traffic) is automatically added to the fib when
tap-inject is enabled on an interface.

https://gerrit.fd.io/r/gitweb?p=vppsb.git;a=blob;f=router/router/tap_inject.c;h=8d6f5afde990feb0831f0182d7f904a86d041fb3;hb=fbaa56c33664c57083e6e96c7086e8afd95077b9#l106

In tap_inject.c:tap_inject_enable() you will see we register the
the router plugin's neighbor node for ARP and ICMP6, then we
register the router plugin's tx node for all ICMP, OSPF, TCP, and
UDP for both ipv4 and ipv6, as well as adding a multicast route
so we can handle OSPF.

No special commands are required, you can enable it in the config
file. This is new since the wiki was last updated.

  tap-inject {
    enable
  }

Or from the command line use "enable tap-inject".

You probably do not want to add routes directly through vpp as
they will not be mirrored in the host. You only want to add
routes through netlink (i.e. "ip route add blah blah blah").

Same goes for interface addresses, "ip addr add ...", and link
state "ip link set up dev vpp5".

-Jeff

> 
> 
> Thanks a lot,
> Hongjun
> 
> 
> 
> At 2017-04-01 17:42:28, "Neale Ranns (nranns)" <nra...@cisco.com> wrote:
> 
> 
>  
> 
> Hi Hongjun,
> 
>  
> 
> The new Multicast FIB in 17.04 removed the classify option for multicast 
> routes. May I ask the intent of the classification you want to achieve? Maybe 
> there is a way to get that behaviour with the new mechanisms.
> 
>  
> 
> Thanks,
> 
> neale
> 
>  
> 
> From: <vpp-dev-boun...@lists.fd.io> on behalf of "Ni, Hongjun" 
> <hongjun...@intel.com>
> Date: Saturday, 1 April 2017 at 07:11
> To: "Dave Barach (dbarach)" <dbar...@cisco.com>, Ed Warnicke 
> <hagb...@gmail.com>, Lukasz Chrustek <ski...@tlen.pl>
> Cc: "Shaw, Jeffrey B" <jeffrey.b.s...@intel.com>, "Damjan Marion (damarion)" 
> <damar...@cisco.com>, "vpp-dev@lists.fd.io" <vpp-dev@lists.fd.io>, Lukasz 
> Chrustek <luk...@chrustek.net>
> Subject: Re: [vpp-dev] Building router plugin
> 
>  
> 
> Hey Luk,
> 
>  
> 
> I have fixed some issues in netlink and router plugin in below patch: Now it 
> can work with VPP.
> 
> https://gerrit.fd.io/r/#/c/5881/Fix compile issue for netlink and router 
> plugin
> 
>  
> 
> Build script is:
> 
> cd /root/vpp
> 
> ln -sf /root/vpp/vppsb/netlink
> 
> ln -sf /root/vpp/vppsb/router
> 
> ln -sf /root/vpp/vppsb/netlink/netlink.mk build-data/packages/
> 
> ln -sf /root/vpp/vppsb/router/router.mk build-data/packages/
> 
>  
> 
> cd /root/vpp/build-root
> 
> make V=0 PLATFORM=vpp TAG=vpp_debug netlink-install router-install
> 
>  
> 
> ln -sf 
> /root/vpp/build-root/install-vpp_debug-native/router/lib64/router.so.0.0.0 \
> 
>          /usr/lib/vpp_plugins/router.so
> 
>  
> 
> I tested it with VPP master using  below script: and it works.
> 
> enable tap-inject
> 
>  
> 
> classify table mask l3 ip4 proto
> 
> ip route add 10.0.0.4/30 via classify 0
> 
> ip route add 10.0.0.22/32 via classify 0
> 
> classify session hit-next ip4-node tap-inject-neighbor table-index 0 match l3 
> ip4 proto 89
> 
> classify session hit-next ip4-node tap-inject-neighbor table-index 0 match l3 
> ip4 proto 2
> 
>  
> 
> But it seems that VPP master failed  to add multicast route via classify 
> table, because ip_mroute_command does not support this.
> 
> DBGvpp# ip mroute add 224.0.0.4/30 via classify 0
> 
> ip mroute: parse error `via classify 0'
> 
> I am not sure whether ip_mroute_command will add it later?
> 
>  
> 
> In VPP stable/1701, all multicast routes are added through “ip route add” 
> command, so below configuration works in stable/1701.
> 
> ip route add 224.0.0.4/30 via classify 0
> 
> I also have a patch that can work well in VPP stable/1701. If required, I can 
> send it to you.
> 
>  
> 
> Thanks Dave and Shaw, Jeffrey for your great help!
> 
>  
> 
> Regards,
> 
> Hongjun
> 
>  
> 
> From:vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
> Behalf Of Ni, Hongjun
> Sent: Wednesday, March 29, 2017 9:51 AM
> To: Dave Barach (dbarach) <dbar...@cisco.com>; Ed Warnicke 
> <hagb...@gmail.com>; Lukasz Chrustek <ski...@tlen.pl>
> Cc: Shaw, Jeffrey B <jeffrey.b.s...@intel.com>; Damjan Marion (damarion) 
> <damar...@cisco.com>; vpp-dev@lists.fd.io; Lukasz Chrustek 
> <luk...@chrustek.net>
> Subject: Re: [vpp-dev] Building router plugin
> 
>  
> 
> Thanks Dave.  Will look into it.
> 
>  
> 
> From: Dave Barach (dbarach) [mailto:dbar...@cisco.com]
> Sent: Tuesday, March 28, 2017 7:52 PM
> To: Ni, Hongjun <hongjun...@intel.com>; Ed Warnicke <hagb...@gmail.com>; 
> Lukasz Chrustek <ski...@tlen.pl>
> Cc: Shaw, Jeffrey B <jeffrey.b.s...@intel.com>; Damjan Marion (damarion) 
> <damar...@cisco.com>; vpp-dev@lists.fd.io; Lukasz Chrustek 
> <luk...@chrustek.net>
> Subject: RE: [vpp-dev] Building router plugin
> 
>  
> 
> FWIW: I sent diffs to fix the build-system integration over the weekend, as 
> well as a fair fraction of the FIB 2.0 integration...
> 
>  
> 
> Thanks… Dave
> 
>  
> 
> From:vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
> Behalf Of Ni, Hongjun
> Sent: Monday, March 27, 2017 10:32 PM
> To: Ed Warnicke <hagb...@gmail.com>; Lukasz Chrustek <ski...@tlen.pl>
> Cc: Shaw, Jeffrey B <jeffrey.b.s...@intel.com>; Damjan Marion (damarion) 
> <damar...@cisco.com>; vpp-dev@lists.fd.io; Lukasz Chrustek 
> <luk...@chrustek.net>
> Subject: Re: [vpp-dev] Building router plugin
> 
>  
> 
> Hi Luk,
> 
>  
> 
> We are using netlink and router plugin in VPP stable 17.01, and also met the 
> same issue.
> 
>  
> 
> I have submitted a patch to fix a compile issue in netlink for review, now 
> netlink could compile ok in VPP stable 17.01.
> 
> https://gerrit.fd.io/r/#/c/5881/FIx compile issue for netlink
> 
>  
> 
> I am working on router plugin now, hope to address some issues and make it 
> work again in VPP stable 17.01.
> 
>  
> 
> For VPP 17.04, make file may need to be changed as per new building system.
> 
>  
> 
> Regards,
> 
> Hongjun
> 
>  
> 
> From:vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
> Behalf Of Ed Warnicke
> Sent: Tuesday, March 28, 2017 6:10 AM
> To: Łukasz Chrustek <ski...@tlen.pl>
> Cc: Damjan Marion (damarion) <damar...@cisco.com>; Lukasz Chrustek 
> <luk...@chrustek.net>; vpp-dev@lists.fd.io; Shaw, Jeffrey B 
> <jeffrey.b.s...@intel.com>
> Subject: Re: [vpp-dev] Building router plugin
> 
>  
> 
> You might also look at 
> 
>  
> 
> https://gerrit.fd.io/r/#/c/5004/ - which introduces memif interfaces... which 
> I think Damjan eventually wants a library for so that you could
> 
> use them for things like taps for routing protocol packets...
> 
>  
> 
> Ed
> 
>  
> 
> On Mon, Mar 27, 2017 at 2:43 PM, Łukasz Chrustek <ski...@tlen.pl> wrote:
> 
> Hi,
> 
> Ok,  thank You. I will give a try with earlier version of vpp, as Jeff
> suggests.  I  have  running  netlink  plugin,  but as Ole wrote - most
> important is router plugin.
> 
> Cheers,
> Luk
> 
> 
> >> You basically have two options:
> >> 1. Teach your routing protocol daemon to directly talk to VPP for 
> >> configuring the FIB.
> >> 2. Do not modify the routing daemon and let VPP map routes written in the 
> >> kernel.
> >>
> >> For 1, you will need the router plugin, but for packet punting only.
> >>
> >> For 2., you will need both netlink+router plugins. The netlink plugin 
> >> (which actually more like a library), shouldn't require so much changes 
> >> though.
> 
> > With TCP support in VPP I was playing with the idea of integrating exaBGP 
> > as a VPP plugin.
> > Use the Python API binding to program routes, and receive the BGP
> > stream across a fifo (or even the API).
> 
> > Cheers,
> > Ole
> 
> >>> Le 26 mars 2017 à 16:31, Łukasz Chrustek <ski...@tlen.pl> a écrit :
> >>>
> >>> Hello,
> >>>
> >>> thank all of You for clarification of status router plugin.
> >>>
> >>> I'm trying to use vpp+dpdk as bare metal linux ruter with bgp and ospf 
> >>> routing protocols, goal is to make very fast router with dynamic routing 
> >>> protocols. Can You advice is there any other way to exchange dynamic 
> >>> routing information between os and vpp ?
> >>>
> >>> Regards
> >>> Lukasz
> >>>
> >>>
> >>> The mailman did not let my last message go through because it was too big 
> >>> so I am removing the previous threads to keep this message under 100KB 
> >>> limit.
> >>>
> >>> Hello,
> >>>
> >>> Dave and Pierre are correct, the router plugin is no longer being 
> >>> maintained. There was not much interest in the community for this project 
> >>> at the time and I have since moved on to other things.  I’d be happy to 
> >>> help a new maintainer with any questions they may have.
> >>>
> >>> If you really want to just test it out, I suggest attempting to checkout 
> >>> a commit of VPP close to the last commit on the router plugin. Somewhere 
> >>> closely following VPP commit 0bfe5d8c792abcdb, “A Protocol Independent 
> >>> Hierarchical FIB (VPP-352)” will work (you might have to git bisect to 
> >>> get something that compiles right away).
> >>>
> >>> If necessary, I can submit a patch to remove the router plugin from the 
> >>> VPP sandbox with a note on the wiki page mentioning the finalization of 
> >>> the project. I recall there being an 8-month time limit for these the 
> >>> sandbox projects.
> >>>
> >>> -Jeff
> >>>
> >>>
> >>>
> >>
> >> _______________________________________________
> >> vpp-dev mailing list
> >> vpp-dev@lists.fd.io
> >> https://lists.fd.io/mailman/listinfo/vpp-dev
> 
> --
> Pozdrowienia,
>  Łukasz Chrustek
> 
> 
> _______________________________________________
> vpp-dev mailing list
> vpp-dev@lists.fd.io
> https://lists.fd.io/mailman/listinfo/vpp-dev
> 
>  

> _______________________________________________
> vpp-dev mailing list
> vpp-dev@lists.fd.io
> https://lists.fd.io/mailman/listinfo/vpp-dev

_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to