Hi Matt I can confirm for VPP 22.10 - command "vppctl lcp default netns dataplane" enable synchronizing interfaces, synchronizing routes fail - configuration in startup.conf "linux-cp { default netns dataplane }" works fine for interfaces and routing
Petr čt 22. 12. 2022 v 16:08 odesílatel Matthew Smith via lists.fd.io <mgsmith= netgate....@lists.fd.io> napsal: > > On Thu, Dec 22, 2022 at 7:09 AM Petr Boltík <petr.bol...@gmail.com> wrote: > >> >> - To make "plugin linux_nl_plugin.so" working, you need to run VPP inside >> netns dataplane (same as bird). This can be done by editing VPP systemd >> startup file (add something like " >> NetworkNamespacePath=/var/run/netns/dataplane" ) and ensuring that netns >> "dataplane" will be started first. >> > > I run VPP in the default netns and use FRR & iproute2 in the dataplane > netns and it works fine. I test this regularly on AWS, Azure, KVM, and bare > metal. I don't set the netns with vppctl CLI commands though, I set it in > startup.conf with 'linux-cp { default netns dataplane }'. I will look into > whether something is broken with the CLI command. > > -Matt > > > >> čt 22. 12. 2022 v 13:53 odesílatel Christopher Adigun < >> future...@gmail.com> napsal: >> >>> Hi Petr, >>> >>> Thanks for the response, bird is actually running in the dataplane ns: >>> >>> root@nat-gw-697d886cb4-xn62q:/etc/bird# *ip netns exec dataplane ip a* >>> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN >>> group default qlen 1000 >>> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 >>> inet 127.0.0.1/8 scope host lo >>> valid_lft forever preferred_lft forever >>> inet6 ::1/128 scope host >>> valid_lft forever preferred_lft forever >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> *2: loop0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP >>> group default qlen 1000 link/ether de:ad:00:00:00:00 brd >>> ff:ff:ff:ff:ff:ff inet 192.168.163.2/32 <http://192.168.163.2/32> scope >>> global loop0 valid_lft forever preferred_lft forever inet6 >>> fe80::dcad:ff:fe00:0/64 scope link valid_lft forever preferred_lft >>> forever3: xe0-1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc mq state >>> UNKNOWN group default qlen 1000 link/ether 02:40:0a:84:e3:83 brd >>> ff:ff:ff:ff:ff:ff inet 10.0.5.10/24 <http://10.0.5.10/24> scope global >>> xe0-1 valid_lft forever preferred_lft forever inet6 >>> fe80::40:aff:fe84:e383/64 scope link valid_lft forever preferred_lft >>> forever* >>> root@nat-gw-697d886cb4-xn62q:/etc/bird# >>> root@nat-gw-697d886cb4-xn62q:/etc/bird# >>> root@nat-gw-697d886cb4-xn62q:/etc/bird# ip netns exec *dataplane *ip r >>> 10.0.5.0/24 dev xe0-1 proto kernel scope link src 10.0.5.10 >>> 10.45.0.0/16 via 10.0.5.9 dev xe0-1 proto bird >>> >>> One other thing, I am running this in a kubernetes POD, maybe this might >>> be affecting something. >>> >>> Also can you clarify how to perform *plugin "linux_nl_plugin.so" ignore >>> "lcp default netns" configuration?* Should this be placed in the >>> startup.conf or init.conf? >>> I want to test without netns, I tried the following in the startup >>> config but vpp was crashing >>> >>> plugin "linux_nl_plugin.so" { >>> ignore "lcp default netns" >>> } >>> >>> I also tried using the full command in init.conf but that did not work. >>> >>> >>> On Thu, Dec 22, 2022 at 4:22 AM Petr Boltík <petr.bol...@gmail.com> >>> wrote: >>> >>>> Hi, >>>> >>>> there can be a few misconfigurations: >>>> 1. "lcp default netns dataplane" start synchronizing >>>> interfaces/address/etc inside netns "dataplane" (netns "dataplane" must >>>> exist) - NOT synchronizing routes >>>> 2. plugin "linux_nl_plugin.so" ignore "lcp default netns" configuration >>>> => "linux_nl_plugin.so" will synchronize VPP with default namespace "0" >>>> >>>> Solution with netns: >>>> 0. Create netns "dataplane" with systemd >>>> 1. run VPP inside netns "dataplane" (edit systemd, start after previous >>>> point) >>>> 2. run Bird inside netns "dataplane" (edit systemd, start after >>>> previous point) >>>> 3. do not use "lcp default netns dataplane", it is controlled by VPP >>>> netns >>>> >>>> For running without netns only skip "lcp default netns dataplane". >>>> >>>> Petr >>>> >>>> čt 22. 12. 2022 v 10:07 odesílatel Pim van Pelt via lists.fd.io <pim= >>>> ipng...@lists.fd.io> napsal: >>>> >>>>> Hoi, >>>>> >>>>> Is bird running in the 'dataplane' network namespace ? >>>>> >>>>> groet, >>>>> Pim >>>>> >>>>> On Thu, Dec 22, 2022 at 12:52 AM Christopher Adigun < >>>>> future...@gmail.com> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> I am currently trying to use linx-cp plugins to sync routes learned >>>>>> via BGP, bird is seeing the BGP route but I can't see the routes in VPP. >>>>>> >>>>>> Details: >>>>>> >>>>>> *vpp v22.10-release built by root on ff42e25458af at >>>>>> 2022-10-26T14:00:24* >>>>>> >>>>>> *startup.conf:* >>>>>> >>>>>> unix { >>>>>> nodaemon >>>>>> log /tmp/vpp.log >>>>>> full-coredump >>>>>> gid vpp >>>>>> interactive >>>>>> cli-listen /run/vpp/cli.sock >>>>>> exec /etc/vpp/init.conf >>>>>> } >>>>>> >>>>>> cpu { >>>>>> main-core 1 >>>>>> corelist-workers 19 >>>>>> } >>>>>> >>>>>> memory { >>>>>> main-heap-size 2G >>>>>> } >>>>>> api-trace { >>>>>> on >>>>>> } >>>>>> >>>>>> dpdk { >>>>>> dev 0000:00:09.0 {name n6} >>>>>> dev 0000:00:07.0 {name internet} >>>>>> } >>>>>> >>>>>> api-segment { >>>>>> gid vpp >>>>>> } >>>>>> >>>>>> plugins { >>>>>> path /usr/lib/x86_64-linux-gnu/vpp_plugins/ >>>>>> plugin ping_plugin.so { disable } >>>>>> plugin linux_cp_plugin.so { enable } >>>>>> plugin linux_nl_plugin.so { enable } >>>>>> plugin dpdk_plugin.so { enable } >>>>>> } >>>>>> >>>>>> *Init.conf:* >>>>>> >>>>>> lcp default netns dataplane >>>>>> lcp lcp-sync on >>>>>> lcp lcp-auto-subint on >>>>>> create loopback interface instance 0 >>>>>> lcp create loop0 host-if loop0 >>>>>> set interface state loop0 up >>>>>> set interface ip address loop0 192.168.163.2/32 >>>>>> lcp create n6 host-if xe0-1 >>>>>> set interface mtu 9001 n6 >>>>>> set interface mtu 9001 internet >>>>>> set interface ip address n6 10.0.5.10/24 >>>>>> set interface ip address internet 10.0.4.9/24 >>>>>> set interface state n6 up >>>>>> set interface state internet up >>>>>> ip route add 0.0.0.0/0 via 10.0.4.1 internet >>>>>> set cnat snat-policy addr 10.0.4.9 >>>>>> set cnat snat-policy if-pfx >>>>>> set cnat snat-policy if table include-v4 internet >>>>>> set cnat snat-policy prefix 10.45.0.0/16 >>>>>> set interface feature internet cnat-snat-ip4 arc ip4-unicast >>>>>> >>>>>> *BIRD routes:* >>>>>> >>>>>> root@nat-gw-697d886cb4-xn62q:/etc/bird# birdc show route all >>>>>> BIRD 1.6.8 ready. >>>>>> 10.45.0.0/16 via 10.0.5.9 on xe0-1 [neighbor_v4_1 23:13:04] * >>>>>> (100) [i] >>>>>> Type: BGP unicast univ >>>>>> BGP.origin: IGP >>>>>> BGP.as_path: >>>>>> BGP.next_hop: 10.0.5.9 >>>>>> BGP.med: 0 >>>>>> BGP.local_pref: 100 >>>>>> >>>>>> root@nat-gw-697d886cb4-xn62q:/etc/bird# ip r >>>>>> 10.0.5.0/24 dev xe0-1 proto kernel scope link src 10.0.5.10 >>>>>> 10.45.0.0/16 via 10.0.5.9 dev xe0-1 proto bird >>>>>> >>>>>> >>>>>> *BIRD config:* >>>>>> >>>>>> router id 194.1.163.2; >>>>>> >>>>>> protocol device { scan time 30; } >>>>>> protocol kernel kernel4 { >>>>>> import none; >>>>>> export where source != RTS_DEVICE; >>>>>> learn off; >>>>>> scan time 300; >>>>>> } >>>>>> >>>>>> protocol bgp neighbor_v4_1 { >>>>>> local as 65001; >>>>>> direct; >>>>>> neighbor 10.0.5.9 as 65001; >>>>>> } >>>>>> >>>>>> Need any hint on troubleshooting this. >>>>>> >>>>>> Thanks >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> -- >>>>> Pim van Pelt <p...@ipng.nl> >>>>> PBVP1-RIPE - http://www.ipng.nl/ >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>>> >>> >>> >>> >> >> >> > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#22372): https://lists.fd.io/g/vpp-dev/message/22372 Mute This Topic: https://lists.fd.io/mt/95817807/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] -=-=-=-=-=-=-=-=-=-=-=-