Ed Warnicke | b463ec8 | 2015-12-22 20:04:54 -0700 | [diff] [blame] | 1 | VPP has now been built, installed, and started. |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 2 | |
| 3 | To give it a spin, we can create a tap interface and try a simple ping |
| 4 | (with trace). |
| 5 | |
Ed Warnicke | b463ec8 | 2015-12-22 20:04:54 -0700 | [diff] [blame] | 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 | |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 19 | To create the tap: |
| 20 | |
Ed Warnicke | b463ec8 | 2015-12-22 20:04:54 -0700 | [diff] [blame] | 21 | vagrant@localhost:~$ sudo vppctl tap connect foobar |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 22 | Created tap-0 for Linux tap 'foobar' |
Ed Warnicke | b463ec8 | 2015-12-22 20:04:54 -0700 | [diff] [blame] | 23 | vagrant@localhost:~$ sudo vppctl show int |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 24 | |
| 25 | To assign it an ip address (and 'up' the interface): |
| 26 | |
Ed Warnicke | b463ec8 | 2015-12-22 20:04:54 -0700 | [diff] [blame] | 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 |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 29 | |
| 30 | To turn on packet tracing for the tap interface: |
Ed Warnicke | b463ec8 | 2015-12-22 20:04:54 -0700 | [diff] [blame] | 31 | vagrant@localhost:~$ sudo vppctl trace add tapcli-rx 10 |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 32 | |
Ed Warnicke | b463ec8 | 2015-12-22 20:04:54 -0700 | [diff] [blame] | 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 |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 36 | |
Ed Warnicke | b463ec8 | 2015-12-22 20:04:54 -0700 | [diff] [blame] | 37 | To look at the trace: |
| 38 | vagrant@localhost:~$ sudo vppctl show trace |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 39 | |
| 40 | And to stop tracing: |
| 41 | |
Ed Warnicke | b463ec8 | 2015-12-22 20:04:54 -0700 | [diff] [blame] | 42 | vagrant@localhost:~$ sudo vppctl clear trace |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 43 | |
| 44 | Other fun things to look at: |
| 45 | |
| 46 | The vlib packet processing graph: |
Ed Warnicke | b463ec8 | 2015-12-22 20:04:54 -0700 | [diff] [blame] | 47 | vagrant@localhost:~$ sudo vppctl show vlib graph |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 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 |