summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2018-06-22 16:01:07 +0200
committerPhilippe Guibert <philippe.guibert@6wind.com>2018-08-28 16:23:50 +0200
commitc94e67258c220e72d9840a2a445e10099330f147 (patch)
tree458f20687b0a8260174e2216392b7364074e72f1
parenteb6934d5c5a1937ab2d8ecab5dd5b8242f1fda3f (diff)
doc: add information about dynamic update of default vrf name
It is possible to dynamically change default VRF name, if vrf backend is a netns backend. By creating a link to the default netns in /var/run/netns folder, then the file name will be used to name the default VRF. If no backend netns is chosen, it is explained that it is still possible to statically configure the default vrf name to new define. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
-rw-r--r--doc/user/zebra.rst34
1 files changed, 34 insertions, 0 deletions
diff --git a/doc/user/zebra.rst b/doc/user/zebra.rst
index af8e4b8d47..8a394928c6 100644
--- a/doc/user/zebra.rst
+++ b/doc/user/zebra.rst
@@ -355,6 +355,40 @@ commands in relationship to VRF. Here is an extract of some of those commands:
will dump the routing table ``TABLENO`` of the *Linux network namespace*
``VRF``.
+By using the :option:`-n` option, the *Linux network namespace* will be mapped
+over the *Zebra* VRF. One nice feature that is possible by handling *Linux
+network namespace* is the ability to name default VRF. At startup, *Zebra*
+discovers the available *Linux network namespace* by parsing folder
+`/var/run/netns`. Each file stands for a *Linux network namespace*, but not all
+*Linux network namespaces* are available under that folder. This is the case for
+default VRF. It is possible to name the default VRF, by creating a file, by
+executing following commands.
+
+.. code-block:: shell
+
+ touch /var/run/netns/vrf0
+ mount --bind /proc/self/ns/net /var/run/netns/vrf0
+
+Above command illustrates what happens when the default VRF is visible under
+`var/run/netns/`. Here, the default VRF file is `vrf0`.
+At startup, FRR detects the presence of that file. It detects that the file
+statistics information matches the same file statistics information as
+`/proc/self/ns/net` ( through stat() function). As statistics information
+matches, then `vrf0` stands for the new default namespace name.
+Consequently, the VRF naming `Default` will be overriden by the new discovered
+namespace name `vrf0`.
+
+For those who don't use VRF backend with *Linux network namespace*, it is
+possible to statically configure and recompile FRR. It is possible to choose an
+alternate name for default VRF. Then, the default VRF naming will automatically
+be updated with the new name. To illustrate, if you want to recompile with
+`global` value, use the following command:
+
+.. code-block:: linux
+
+ ./configure --with-defaultvrfname=global
+
+More information about the option in :ref:`_frr-configuration`.
.. _zebra-mpls: