blob: 4c1dfe2a07dc0fb332c55e659cc9d8a9593d1fd0 [file] [log] [blame]
jdenisco0923a232018-08-29 13:19:43 -04001.. _tunnels:
2
3Tunnels
4---------
5
6Tunnels share a similar property to recursive routes in that after applying the
7tunnel encapsulation, a new packet must be forwarded, i.e. forwarding is
8recursive. However, as with recursive routes the tunnel's destination is known
9beforehand, so the recursive switch can be avoided if the packet can follow the
10already constructed data-plane graph for the tunnel's destination. This process
11of joining to DP graphs together is termed *stacking*.
12
13.. figure:: /_images/fib20fig2.png
14
15Figure 11: Tunnel control plane object diagram
16
17Figure 11 shows the control plane object graph for a route via a tunnel. The two
18sub-graphs for the route via the tunnel and the route for the tunnel's
19destination are shown to the right and left respectively. The red line shows the
20relationship form by stacking the two sub-graphs. The adjacency on the tunnel
21interface is termed a ԭid-chainՠthis it is now present in the middle of the
22graph/chain rather than its usual terminal location.
23
24The mid-chain adjacency is contributed by the gre_tunnel_t , which also becomes
25part of the FIB control-plane graph. Consequently it will be visited by a
26back-walk when the forwarding information for the tunnelճ destination changes.
27This will trigger it to restack the mid-chain adjacency on the new
28*load_balance_t* contributed by the parent *fib_entry_t*.
29
30If the back-walk indicates that there is no route to the tunnel, or that the
31route does not meet resolution constraints, then the tunnel can be marked as
32down, and fast convergence can be triggered in the same way as for physical
33interfaces (see section ...).