John DeNisco | c8e7f41 | 2018-08-03 11:02:24 -0400 | [diff] [blame] | 1 | .. _routing: |
| 2 | |
| 3 | .. toctree:: |
| 4 | |
| 5 | Routing |
| 6 | ======= |
| 7 | |
| 8 | Skills to be Learned |
| 9 | ^^^^^^^^^^^^^^^^^^^^ |
| 10 | |
| 11 | In this exercise you will learn these new skills: |
| 12 | |
| 13 | #. Add route to Linux Host routing table |
| 14 | #. Add route to FD.io VPP routing table |
| 15 | |
| 16 | And revisit the old ones: |
| 17 | |
| 18 | #. Examine FD.io VPP routing table |
| 19 | #. Enable trace on vpp1 and vpp2 |
| 20 | #. ping from host to FD.io VPP |
| 21 | #. Examine and clear trace on vpp1 and vpp2 |
| 22 | #. ping from FD.io VPP to host |
| 23 | #. Examine and clear trace on vpp1 and vpp2 |
| 24 | |
| 25 | FD.io VPP command learned in this exercise |
| 26 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 27 | |
| 28 | #. `ip route |
| 29 | add <https://docs.fd.io/vpp/17.04/clicmd_src_vnet_ip.html#clicmd_ip_route>`__ |
| 30 | |
| 31 | Topology |
| 32 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 33 | |
| 34 | .. figure:: /_images/Connecting_two_vpp_instances_with_memif.png |
| 35 | :alt: Connect two FD.io VPP topology |
| 36 | |
| 37 | Connect two FD.io VPP topology |
| 38 | |
| 39 | Initial State |
| 40 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 41 | |
| 42 | The initial state here is presumed to be the final state from the |
| 43 | exercise `Connecting two FD.io VPP |
| 44 | instances <VPP/Progressive_VPP_Tutorial#Connecting_two_vpp_instances>`__ |
| 45 | |
| 46 | Setup host route |
| 47 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 48 | |
| 49 | .. code-block:: console |
| 50 | |
| 51 | $ sudo ip route add 10.10.2.0/24 via 10.10.1.2 |
| 52 | $ ip route |
| 53 | default via 10.0.2.2 dev enp0s3 |
| 54 | 10.0.2.0/24 dev enp0s3 proto kernel scope link src 10.0.2.15 |
| 55 | 10.10.1.0/24 dev vpp1host proto kernel scope link src 10.10.1.1 |
| 56 | 10.10.2.0/24 via 10.10.1.2 dev vpp1host |
| 57 | |
| 58 | Setup return route on vpp2 |
| 59 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 60 | |
| 61 | .. code-block:: console |
| 62 | |
| 63 | vpp# ip route add 10.10.1.0/24 via 10.10.2.1 |
| 64 | |
| 65 | Ping from host through vpp1 to vpp2 |
| 66 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 67 | |
| 68 | #. Setup a trace on vpp1 and vpp2 |
| 69 | #. Ping 10.10.2.2 from the host |
| 70 | #. Examine the trace on vpp1 and vpp2 |
| 71 | #. Clear the trace on vpp1 and vpp2 |