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