blob: c2802773d9cfa349540502cd845510b056ab846b [file] [log] [blame]
jdenisco0923a232018-08-29 13:19:43 -04001.. _attachedexport:
2
3Attached Export
4^^^^^^^^^^^^^^^^
5
6Extranets make prefixes in VRF A also reachable from VRF B. VRF A is the export VRF,
7B the import. Consider this route in the export VRF;
8
9.. code-block:: console
10
11 # ip route add table 2 1.1.1.0/24 via 10.10.10.0 GigabitEthernet0/8/0
12
13there are two ways one might consider representing this route in the import VRF:
14
15#. ip route add table 3 1.1.1.0/24 via 10.10.10.0 GigabitEthernet0/8/0
16#. ip route add table 3 1.1.1.0/24 via lookup-in-table 2
17
18where option 2) is an example of a de-aggregate route where a second lookup is
19performed in table 2, the export VRF. Option 2) is clearly less efficient, since
20the cost of the second lookup is high. Option 1) is therefore preferred. However,
21connected and attached prefixes, and specifically the adj-fibs that they cover,
22require special attention. The control plane is aware of the connected and
23attached prefixes that are required to be exported, but it is unaware of the
24adj-fibs. It is therefore the responsibility of FIB to ensure that whenever an
25attached prefix is exported, so are the adj-fibs and local prefixes that it
26covers, and only the adj-fibs and locals, not any covered more specific
27(sourced e.g. by API). The imported FIB entries are sourced as *attached-export*
28this is a low priority source, so if those prefixes already exist in the import
29VRF, sourced by the API, then they will continue to forward with that information.
30
31.. figure:: /_images/fib20fig6.png
32
33Figure 6: Attached Export Class diagram.
34
35Figure 6 shows the data structures used to perform attached export.
36
37- *fib_import_t*. A representation of the need to import covered prefixes. An instance is associated with the FIB entry in the import VRF. The need to import prefixes is recognised when an attached route is added to a table that is different to the table of the interface to which it t is attached. The creation of a *fib_import_t* will trigger the creation of a *fib_export_t*.
38- *fib_export_t*. A representation of the need to export prefixes. An instance is associated with the attached entry in the export VRF. A *fib_export_t* can have many associated *fib_import_t* objects representing multiple VRFs into which the prefix is exported.
39
40.. figure:: /_images/fib20fig6.png
41
42Figure 7: Attached Export object diagram
43
44Figure 7 shows an object instance diagram for the export of a connected from table
451 to two other tables. The /32 adj-fib and local prefix in the export VRF are
46exported into the import VRFs, where they are sourced as *attached-export* and
47inherit the forwarding information from the exported entry. The attached prefix
48in the import VRF also performs cover tracking with the connected prefix in the
49export VRF so that it can react to updates to that prefix that will require the
50removal the imported covered prefixes.