blob: f53d62235894a0ed4d035a149c091ad9ef9d3ce5 [file] [log] [blame]
jdenisco0923a232018-08-29 13:19:43 -04001.. _tunnels:
2
3Tunnels
Neale Rannsdfd39542020-11-09 10:09:42 +00004-------
jdenisco0923a232018-08-29 13:19:43 -04005
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
Neale Rannsdfd39542020-11-09 10:09:42 +00009beforehand, so the second lookup can be avoided if the packet can follow the
jdenisco0923a232018-08-29 13:19:43 -040010already constructed data-plane graph for the tunnel's destination. This process
11of joining to DP graphs together is termed *stacking*.
12
Christian Hopps047f67e2020-08-04 06:16:12 -040013.. figure:: /_images/fib20fig11.png
jdenisco0923a232018-08-29 13:19:43 -040014
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
Neale Rannsdfd39542020-11-09 10:09:42 +000021interface is termed a 'mid-chain' since it is now present in the middle of the
jdenisco0923a232018-08-29 13:19:43 -040022graph/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
Paul Vinciguerra7fa3dd22019-10-27 17:28:10 -040026back-walk when the forwarding information for the tunnel's destination changes.
jdenisco0923a232018-08-29 13:19:43 -040027This will trigger it to restack the mid-chain adjacency on the new
28*load_balance_t* contributed by the parent *fib_entry_t*.
29
Neale Rannsdfd39542020-11-09 10:09:42 +000030If the back-walk indicates that there is no route to the tunnel's
31destination, or that the resolving route does not meet resolution
32constraints, then the tunnel can be marked as down, and fast
33convergence can be triggered in the same way as for physical interfaces (see section ...).
34
35
36Multi-Point Tunnels
37^^^^^^^^^^^^^^^^^^^
38
39Multi-point tunnels are an example of a non-broadcast multi-access
40interface. In simple terms this means there are many peers on the link
41but it is not possible to broadcast a single message to all of them at
42once, and hence the usual peer discovery mechanism (as employed,
43e.g. by ARP) is not available. Although an *ip_neighbor_t* is a
44representation of an IP peer on a link, it is not valid in this
45context as it maps the peer's identity to its MAC address. For a
46tunnel peer it is required to map the peer's overlay address (the
47attached address, the one in the same subnet as the device) with the
48peer's underlay address (probably on the other side of the
49internet). In the P2P case where there is only one peer on the link,
50the peer's underlay address is the same as the tunnel's destination
51address.
52The data structure that represents the mapping of the peer's overlay
53with underlay address is an entry in the Tunnel Endpoint Information
54Base (TEIB); the *tieb_entry_t*. TEIB entries are created by the
55control plane (e.g. NHRP (RFC2332)).
56
57Each mid-chain adjacency on a multi-point tunnel is stacked on the
58*fib_entry_t* object that resolves the peer's underlay address. The
59glean adjacency on the tunnel resolves via a drop, since broadcasts
60are not possible. A multicast adjacency on a multi-point tunnel is
61currently a work in progress.
62