summaryrefslogtreecommitdiffstats
path: root/docs/gettingstarted/progressivevpp/runningvpp.rst
blob: 19d2f4e9eded0e73a167dccb9e395f2aa440c4c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
.. _runningvpp:

Running VPP
===========

Using the files we create in :ref`settingupenvironment` we will now start and
run VPP.

VPP runs in userspace. In a production environment you will often run it
with DPDK to connect to real NICs or vhost to connect to VMs. In those
circumstances you usually run a single instance of VPP.

For purposes of this tutorial, it is going to be extremely useful to run
multiple instances of VPP, and connect them to each other to form a
topology. Fortunately, VPP supports this.


Using the files we created in setup we will start VPP.

.. code-block:: console

   $ sudo /usr/bin/vpp -c startup1.conf
   vlib_plugin_early_init:361: plugin path /usr/lib/vpp_plugins:/usr/lib/vpp_plugins
   load_one_plugin:189: Loaded plugin: abf_plugin.so (ACL based Forwarding)
   load_one_plugin:189: Loaded plugin: acl_plugin.so (Access Control Lists)
   load_one_plugin:189: Loaded plugin: avf_plugin.so (Intel Adaptive Virtual Function (AVF) Device Plugin)
   .........
   $

If VPP does not start you can try adding **nodaemon** to the startup.conf file in the
**unix** section. This should provide more information in the output.

startup.conf example with nodaemon:

.. code-block:: console

   unix {nodaemon cli-listen /run/vpp/cli-vpp1.sock}
   api-segment { prefix vpp1 }
   plugins { plugin dpdk_plugin.so { disable } }

The command **vppctl** will launch a VPP shell with which you can run
VPP commands interactively.

We should now be able to execute the VPP shell and show the version.

.. code-block:: console

   $ sudo vppctl -s /run/vpp/cli-vpp1.sock
       _______    _        _   _____  ___
    __/ __/ _ \  (_)__    | | / / _ \/ _ \
    _/ _// // / / / _ \   | |/ / ___/ ___/
    /_/ /____(_)_/\___/   |___/_/  /_/
   
   vpp# show version
   vpp v18.07-release built by root on c469eba2a593 at Mon Jul 30 23:27:03 UTC 2018
   vpp#

.. note::

   Use ctrl-d or q to exit from the VPP shell.

If you are going to run several instances of VPP this way be sure to kill them
when you are finished.

You can use something like the following:

.. code-block:: console

    $ ps -eaf | grep vpp
    root      2067     1  2 05:12 ?        00:00:00 /usr/bin/vpp -c startup1.conf
    vagrant   2070   903  0 05:12 pts/0    00:00:00 grep --color=auto vpp
    $ kill -9 2067
    $ ps -eaf | grep vpp
    vagrant   2074   903  0 05:13 pts/0    00:00:00 grep --color=auto vpp
> 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756