Routing

Skills to be Learned

In this exercise you will learn these new skills:

  1. Add route to Linux Host routing table

  2. Add route to FD.io VPP routing table

And revisit the old ones:

  1. Examine FD.io VPP routing table

  2. Enable trace on vpp1 and vpp2

  3. ping from host to FD.io VPP

  4. Examine and clear trace on vpp1 and vpp2

  5. ping from FD.io VPP to host

  6. Examine and clear trace on vpp1 and vpp2

VPP command learned in this exercise

  1. ip route add

Topology

Connect two FD.io VPP topology

Connect two FD.io VPP topology

Initial State

The initial state here is presumed to be the final state from the exercise Connecting two FD.io VPP instances

Setup host route

$ sudo ip route add 10.10.2.0/24 via 10.10.1.2
$ ip route
default via 10.0.2.2 dev enp0s3
10.0.2.0/24 dev enp0s3  proto kernel  scope link  src 10.0.2.15
10.10.1.0/24 dev vpp1host  proto kernel  scope link  src 10.10.1.1
10.10.2.0/24 via 10.10.1.2 dev vpp1host

Setup return route on vpp2

$ sudo vppctl -s /run/vpp/cli-vpp2.sock
 vpp# ip route add 10.10.1.0/24  via 10.10.2.1

Ping from host through vpp1 to vpp2

The connection from vpp1 to vpp2 uses the memif driver, the connection to the host uses the af-packet driver. To trace packets from the host we use af-packet-input from vpp1 to vpp2 we use memif-input.

  1. Setup a trace on vpp1 and vpp2

  2. Ping 10.10.2.2 from the host

  3. Examine the trace on vpp1 and vpp2

  4. Clear the trace on vpp1 and vpp2