Hi xyxue, Ow, but if you’re running with vms, there’s no need to use net namespaces. If your vms have e1000/vmxnet3 nics you can actually run vpp with dpdk. Just configure the ip addresses in the two vpps and test with ping, from within one of the vpps, that the topology is configured correctly.
Alternatively, yes, you can run 2 vpp instances in one vm with netns. Just remember to change your config files to have the vpps run with different api-segments like: api-segment { prefix “<name_goes_here>” } Cheers, Florin > On Sep 28, 2017, at 6:40 PM, 薛欣颖 <xy...@fiberhome.com> wrote: > > > Hi, > > topology: VPP1 and VPP2 on two virtual machines, > Have you verified the VPP1 and VPP2 are connected (i.e. ping 1.1.1.2 from > vpp1) ? ---ping 1.1.1.2 from vpp1 is ok > > <Catch(09-29-09-1(09-29-09-38-55).jpg> > > The following configuration for cyberspace is on the same virtual machine: > Linux: > ip netns add vppns > ip link add veth_vpp1 type veth peer name vpp1 > ip link set dev vpp1 up > ip link set dev veth_vpp1 up netns vppns > ip link add veth_vpp2 type veth peer name vpp2 > ip link set dev vpp2 up > ip link set dev veth_vpp2 up netns vppns > > By the way, is it ok to start two vpp in the same virtual machine? > > Thanks, > xyxue > > From: Dave Wallace <mailto:dwallac...@gmail.com> > Date: 2017-09-29 00:03 > To: 薛欣颖 <mailto:xy...@fiberhome.com>; Florin Coras > <mailto:fcoras.li...@gmail.com>; John Lo (loj) <mailto:l...@cisco.com> > CC: vpp-dev <mailto:vpp-dev@lists.fd.io> > Subject: Re: [vpp-dev] Failed to use vcl_test_client > Xyxue, > > Have you verified the VPP1 and VPP2 are connected (i.e. ping 1.1.1.2 from > vpp1) ? > > The multi-host configuration has been tested using vagrant/virtualbox using > .../vpp/extras/vagrant/Vagrantfile.vcl_test. I will add a recipe to the wiki > in the next day or so. > > The socket_test.sh script is designed to auto-configure different test > configurations in an X-Window environment. It runs the client / server > configuration in xterm (or xfce4_terminal) and can optionally run gdb in the > xterm or in emacs. > > Thanks, > -daw- > > > On 09/28/2017 08:11 AM, 薛欣颖 wrote: >> >> Hi, >>> >>> I have added '#define __NR_memfd_create 319' to >>> /usr/include/x86_64-linux-gnu/asm/unistd_64.h. >> The following error still occurred during the test: >> root@ubuntu:/home/vpp_communication/vpp/build-root/install-vpp-native/vpp/bin# >> ./vcl_test_client -U 1.1.1.2 22000 >> >> CLIENT: Connecting to server... >> vl_api_connect_session_reply_t_handler:697: [9478] connect failed: Session >> failed to connect (-115) >> >> Are we missing the configuration? Or are there any problems with our testing >> methods? >> >> The kernel version: >> root@ubuntu:/home/vpp_communication/vppsb/vcl-ldpreload/src# uname -a >> Linux ubuntu 4.4.0-31-generic #50~14.04.1-Ubuntu SMP Wed Jul 13 01:07:32 UTC >> 2016 x86_64 x86_64 x86_64 GNU/Linux >> >> >> Test topology: >> <CatchAA2A(09-28-(09-29-09-39-45).jpg> >> >> >> Server vpp configure: >> create host-interface name eth1 >> set interface mac address host-eth1 00:0c:29:4c:35:65 >> set interface state host-eth1 up >> set interface ip address host-eth1 1.1.1.2/24 >> >> start VCL server : >> root@ubuntu:/home/vpp_communication/vpp/build-root/install-vpp-native/vpp/bin# >> ./vcl_test_server >> >> SERVER: Waiting for a client to connect on port 22000... >> >> vcl Client: >> create host-interface name eth1 >> set interface mac address host-eth1 00:0c:29:db:3c:8f >> set interface state host-eth1 up >> set interface ip address host-eth1 1.1.1.1/24 >> >> start VCL client: >> root@ubuntu:/home/vpp_communication/vpp/build-root/install-vpp-native/vpp/bin# >> ./vcl_test_client -U 1.1.1.2 22000 >> >> CLIENT: Connecting to server... >> vl_api_connect_session_reply_t_handler:697: [9478] connect failed: Session >> failed to connect (-115) >> >> Breakpoint 1, send_session_connected_callback (app_index=1, api_context=0, >> s=0x0, is_fail=1 '\001') >> at >> /home/vpp_communication/vpp/build-data/../src/vnet/session/session_api.c:157 >> >> >> 2. Run the test script 'socket_test.sh' directly.The error is shown below: >> -----(missing a software?) >> root@ubuntu:/home/vpp_communication/vpp/test/scripts# ./socket_test.sh -U nv >> Warning: This program is an suid-root program or is being run by the root >> user. >> The full text of the error or warning message cannot be safely formatted >> in this environment. You may get a more descriptive message by running the >> program as a non-root user or by removing the suid bit on the executable. >> Warning: This program is an suid-root program or is being run by the root >> user. >> The full text of the error or warning message cannot be safely formatted >> in this environment. You may get a more descriptive message by running the >> program as a non-root user or by removing the suid bit on the executable. >> xterm: xterm: Xt error: Can't open display: %s >> Xt error: Can't open display: %s >> xterm: xterm: DISPLAY is not set >> Warning: This program is an suid-root program or is being run by the root >> user. >> The full text of the error or warning message cannot be safely formatted >> in this environment. You may get a more descriptive message by running the >> program as a non-root user or by removing the suid bit on the executable. >> xterm: Xt error: Can't open display: %s >> xterm: DISPLAY is not set >> DISPLAY is not set >> >> Thanks, >> Xyxue >> >> From: Florin Coras <mailto:fcoras.li...@gmail.com> >> Date: 2017-09-28 02:31 >> To: John Lo (loj) <mailto:l...@cisco.com> >> CC: 薛欣颖 <mailto:xy...@fiberhome.com>; vpp-dev <mailto:vpp-dev@lists.fd.io> >> Subject: Re: [vpp-dev] Failed to use vcl_test_client >> Cool! Thanks for the info, John! >> >> Xyxue, could you try it out and see if it works? >> >> Florin >> >>> On Sep 27, 2017, at 11:25 AM, John Lo (loj) <l...@cisco.com >>> <mailto:l...@cisco.com>> wrote: >>> >>> I am able to use memfd with 14.04 by updating its kernel to 3.19 (my 14.04 >>> kernel was 3.13 before the update). >>> >>> I also had to add the following to >>> /usr/include/x86_64-linux-gnu/asm/unistd_64.h >>> #define __NR_memfd_create 319 >>> >>> Hope this works for you, >>> John >>> >>> >> >> _______________________________________________ >> vpp-dev mailing list >> vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io> >> https://lists.fd.io/mailman/listinfo/vpp-dev >> <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