eb6aa2fdebc2fa6047f03a2ecfab5aca9a5a854d
[vpp.git] / extras / vagrant / WELCOME
1 VPP has now been built, installed, and started.
2
3 To give it a spin, we can create a tap interface and try a simple ping
4 (with trace).
5
6 Make sure you have run:
7
8 $ vagrant ssh
9
10 To get to the vagrant VM:
11
12 vagrant@localhost:~$
13
14 Confirm that vpp is running with
15
16 vagrant@localhost:~$ sudo status vpp
17 vpp start/running, process 25202
18
19 To create the tap:
20
21 vagrant@localhost:~$ sudo vppctl tap connect foobar
22 Created tap-0 for Linux tap 'foobar'
23 vagrant@localhost:~$ sudo vppctl show int
24
25 To assign it an ip address (and 'up' the interface):
26
27 vagrant@localhost:~$ sudo vppctl set int ip address tap-0 192.168.1.1/24
28 vagrant@localhost:~$ sudo vppctl set int state tap-0 up
29
30 To turn on packet tracing for the tap interface:
31 vagrant@localhost:~$ sudo vppctl trace add tapcli-rx 10
32
33 Now, to set up and try the other end:
34 vagrant@localhost:~$ sudo ip addr add 192.168.1.2/24 dev foobar
35 vagrant@localhost:~$ ping -c 3 192.168.1.1
36
37 To look at the trace:
38 vagrant@localhost:~$ sudo vppctl show trace
39
40 And to stop tracing:
41
42 vagrant@localhost:~$ sudo vppctl clear trace
43
44 Other fun things to look at:
45
46 The vlib packet processing graph:
47 vagrant@localhost:~$ sudo vppctl show vlib graph
48
49 which will produce output like:
50
51            Name                      Next                    Previous
52 ip4-icmp-input                  error-punt [0]               ip4-local
53                                 ip4-icmp-echo-request [1]
54                                 vpe-icmp4-oam [2]
55
56 To read this, the first column (Name) is the name of the node.
57 The second column (Next) is the name of the children of that node.
58 The third column (Previous) is the name of the parents of this node.
59
60 To see this README again:
61 cat /vagrant/README