Hi, 1. instead of "ExecStart=ip netns exec ...." you should use the systemd option to run in specific netns: NetworkNamespacePath=/var/run/netns/yourNamespace 2. a) imho LCP plugin (vpp 22.06) configuration option "lcp default netns" is useless. This setting only specifies where lcp should creare interfaces. If VPP runs in a specific namespace (systemd NetworkNamespacePath...), LCP does work inside this namespace. 2. b) VPP linux_nl_plugin plugin sync routes with namespace where VPP runs => VPP should run in a specific namespace (systemd NetworkNamespacePath...). In my test, linux_nl_plugin plugin ignore "lcp default netns".
Petr B. st 8. 6. 2022 v 11:22 odesílatel Pim van Pelt <p...@ipng.nl> napsal: > Hoi, > > Please take a look at the following - it describes how to add Bird into a > dedicated *network namespace* (typically 'dataplane') precisely so that > the default kernel table is not impacted. From there, the LinuxCP plugin > listens to that 'dataplane' namespace instead and installs all routes. > https://ipng.ch/s/articles/2021/09/02/vpp-5.html > > To take an Ubuntu server and walk through the entire install, so that it > is built/configured as a full router, take a look at this article: > https://ipng.ch/s/articles/2021/09/21/vpp-7.html > > The thing you're missing, and may not be obvious from the articles, is > that you will run bird (and other things, like sshd or snmpd, etc) in this > new namespace, like so (note the bold part in ExecStart): > > pim@nlams0:~$ cat << EOF | sudo tee > /usr/lib/systemd/system/bird-dataplane.service > [Unit] > Description=BIRD Internet Routing Daemon > After=network.target netns-dataplane.service > > [Service] > EnvironmentFile=/etc/bird/envvars > ExecStartPre=/usr/lib/bird/prepare-environment > ExecStartPre=/usr/sbin/bird -p > ExecReload=/usr/sbin/birdc configure > ExecStart=*/sbin/ip netns exec dataplane */usr/sbin/bird -f -u > $BIRD_RUN_USER -g $BIRD_RUN_GROUP $BIRD_ARGS > Restart=on-abort > > [Install] > WantedBy=multi-user.target > EOF > > After that, you can stop, disable and mask the 'bird' systemd unit, and > enable the 'bird-dataplane' unit, after creating the network namespace ( > https://ipng.ch/s/articles/2021/09/21/vpp-7.html describes this in > detail). > > groet, > Pim > > On Wed, Jun 8, 2022 at 11:11 AM 李海艳 <haiyan...@ilinkall.cn> wrote: > >> Thanks very much, now my vpp and bird could work together. >> >> we hope some routes that BGP received not be added to kernel route >> table, so that the default kernel table won't be impacted, meanwhile we >> hope these routes to be added to vpp. >> >> we have tried several methods, none could acheive this goal, do you have >> any suggestions? >> >> >> ------------------------------ >> haiyan...@ilinkall.cn >> >> >> *From:* Pim van Pelt <p...@ipng.nl> >> *Date:* 2022-04-24 16:56 >> *To:* haiyan...@ilinkall.cn >> *CC:* vpp-dev <vpp-dev@lists.fd.io> >> *Subject:* Re: [vpp-dev] how BIRD routes integrate into vpp >> Hoi, >> >> 20.01 is somewhat old. Synchronizing routes from bird or frr is possible, >> although you'll want to run Linux Control Plane plugin (pertinent gerrit: >> https://gerrit.fd.io/r/c/vpp/+/31122) which was merged in time for the >> last release 21.10. I wrote a set of articles on the Linux CP plugin here: >> https://ipng.ch/s/articles/ (see the 7 posts marked "VPP Linux CP" for >> lots of background). You could try to compile the plugin on 20.01 but I'm >> certain you'll have to make some changes on your own, as the codebase has >> evolved quite a bit since your 20.01 release from 2020. >> >> You can also take a look at a screencast I made that shows the plugin >> (that reads exactly from Bird as you wish): >> https://asciinema.org/a/432943 >> >> groet, >> Pim >> >> On Sun, Apr 24, 2022 at 9:32 AM haiyan...@ilinkall.cn < >> haiyan...@ilinkall.cn> wrote: >> >>> Dear All: >>> >>> >>> I'm going to use BIRD(BGP) working together with VPP, but how can I >>> synchronize BIRD routes to VPP, any suggestions or reference? >>> >>> VPP version is 20.01, try not to update VPP to new version as possible >>> as we can . >>> >>> >>> >>> >> >> -- >> Pim van Pelt <p...@ipng.nl> >> PBVP1-RIPE - http://www.ipng.nl/ >> >> > > -- > Pim van Pelt <p...@ipng.nl> > PBVP1-RIPE - http://www.ipng.nl/ > > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#21515): https://lists.fd.io/g/vpp-dev/message/21515 Mute This Topic: https://lists.fd.io/mt/90661567/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-