blob: 05a3c6529744a320ab2be201cb007cb04f01c293 [file] [log] [blame]
Ed Warnickeb463ec82015-12-22 20:04:54 -07001VPP has now been built, installed, and started.
Ed Warnickecb9cada2015-12-08 15:45:58 -07002
3To give it a spin, we can create a tap interface and try a simple ping
4(with trace).
5
Ed Warnickeb463ec82015-12-22 20:04:54 -07006Make sure you have run:
7
8$ vagrant ssh
9
10To get to the vagrant VM:
11
12vagrant@localhost:~$
13
14Confirm that vpp is running with
15
16vagrant@localhost:~$ sudo status vpp
17vpp start/running, process 25202
18
Ed Warnickecb9cada2015-12-08 15:45:58 -070019To create the tap:
20
Ed Warnickeb463ec82015-12-22 20:04:54 -070021vagrant@localhost:~$ sudo vppctl tap connect foobar
Ed Warnickecb9cada2015-12-08 15:45:58 -070022Created tap-0 for Linux tap 'foobar'
Ed Warnickeb463ec82015-12-22 20:04:54 -070023vagrant@localhost:~$ sudo vppctl show int
Ed Warnickecb9cada2015-12-08 15:45:58 -070024
25To assign it an ip address (and 'up' the interface):
26
Ed Warnickeb463ec82015-12-22 20:04:54 -070027vagrant@localhost:~$ sudo vppctl set int ip address tap-0 192.168.1.1/24
28vagrant@localhost:~$ sudo vppctl set int state tap-0 up
Ed Warnickecb9cada2015-12-08 15:45:58 -070029
30To turn on packet tracing for the tap interface:
Ed Warnickeb463ec82015-12-22 20:04:54 -070031vagrant@localhost:~$ sudo vppctl trace add tapcli-rx 10
Ed Warnickecb9cada2015-12-08 15:45:58 -070032
Ed Warnickeb463ec82015-12-22 20:04:54 -070033Now, to set up and try the other end:
34vagrant@localhost:~$ sudo ip addr add 192.168.1.2/24 dev foobar
35vagrant@localhost:~$ ping -c 3 192.168.1.1
Ed Warnickecb9cada2015-12-08 15:45:58 -070036
Ed Warnickeb463ec82015-12-22 20:04:54 -070037To look at the trace:
38vagrant@localhost:~$ sudo vppctl show trace
Ed Warnickecb9cada2015-12-08 15:45:58 -070039
40And to stop tracing:
41
Ed Warnickeb463ec82015-12-22 20:04:54 -070042vagrant@localhost:~$ sudo vppctl clear trace
Ed Warnickecb9cada2015-12-08 15:45:58 -070043
44Other fun things to look at:
45
46The vlib packet processing graph:
Ed Warnickeb463ec82015-12-22 20:04:54 -070047vagrant@localhost:~$ sudo vppctl show vlib graph
Ed Warnickecb9cada2015-12-08 15:45:58 -070048
49which will produce output like:
50
51 Name Next Previous
52ip4-icmp-input error-punt [0] ip4-local
53 ip4-icmp-echo-request [1]
54 vpe-icmp4-oam [2]
55
56To read this, the first column (Name) is the name of the node.
57The second column (Next) is the name of the children of that node.
58The third column (Previous) is the name of the parents of this node.
59
60To see this README again:
61cat /vagrant/README