summaryrefslogtreecommitdiffstats
path: root/build-root/vagrant/README
blob: 05a3c6529744a320ab2be201cb007cb04f01c293 (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
VPP has now been built, installed, and started.

To give it a spin, we can create a tap interface and try a simple ping
(with trace).

Make sure you have run:

$ vagrant ssh

To get to the vagrant VM:

vagrant@localhost:~$

Confirm that vpp is running with

vagrant@localhost:~$ sudo status vpp
vpp start/running, process 25202

To create the tap:

vagrant@localhost:~$ sudo vppctl tap connect foobar
Created tap-0 for Linux tap 'foobar'
vagrant@localhost:~$ sudo vppctl show int

To assign it an ip address (and 'up' the interface):

vagrant@localhost:~$ sudo vppctl set int ip address tap-0 192.168.1.1/24
vagrant@localhost:~$ sudo vppctl set int state tap-0 up

To turn on packet tracing for the tap interface:
vagrant@localhost:~$ sudo vppctl trace add tapcli-rx 10

Now, to set up and try the other end:
vagrant@localhost:~$ sudo ip addr add 192.168.1.2/24 dev foobar
vagrant@localhost:~$ ping -c 3 192.168.1.1

To look at the trace:
vagrant@localhost:~$ sudo vppctl show trace

And to stop tracing:

vagrant@localhost:~$ sudo vppctl clear trace

Other fun things to look at:

The vlib packet processing graph:
vagrant@localhost:~$ sudo vppctl show vlib graph

which will produce output like:

           Name                      Next                    Previous
ip4-icmp-input                  error-punt [0]               ip4-local
                                ip4-icmp-echo-request [1]
                                vpe-icmp4-oam [2]

To read this, the first column (Name) is the name of the node.
The second column (Next) is the name of the children of that node.
The third column (Previous) is the name of the parents of this node.

To see this README again:
cat /vagrant/README