blob: 25ecd38ef66adb2ec4adaef5beedd59676e66747 [file] [log] [blame]
Ed Warnickecb9cada2015-12-08 15:45:58 -07001To run vpp with the debug shell:
2
3sudo vpe unix interactive
4
5which will result in a prompt that looks like:
6
7DBGvpd#
8
9To give it a spin, we can create a tap interface and try a simple ping
10(with trace).
11
12To create the tap:
13
14DBGvpd# tap connect foobar
15Created tap-0 for Linux tap 'foobar'
16DBGvpd# show int
17
18To assign it an ip address (and 'up' the interface):
19
20DBGvpd# set int ip address tap-0 192.168.1.1/24
21DBGvpd# set int state tap-0 up
22
23To turn on packet tracing for the tap interface:
24DBGvpd# trace add tapcli-rx 10
25
26Now, to set up and try the other end from the unix prompt:
27vagrant@vagrant-ubuntu-trusty-64:~$ sudo ip addr add 192.168.1.2/24 dev foobar
28vagrant@vagrant-ubuntu-trusty-64:~$ ping -c 3 192.168.1.1
29
30To look at the trace, back in the vpp CLI:
31DBGvpd# show trace
32
33And to stop tracing:
34
35DBGvpd# clear trace
36
37Other fun things to look at:
38
39The vlib packet processing graph:
40DBGvpd# show vlib graph
41
42which will produce output like:
43
44 Name Next Previous
45ip4-icmp-input error-punt [0] ip4-local
46 ip4-icmp-echo-request [1]
47 vpe-icmp4-oam [2]
48
49To read this, the first column (Name) is the name of the node.
50The second column (Next) is the name of the children of that node.
51The third column (Previous) is the name of the parents of this node.
52
53END