doc: cleanup zebra vrf docs

* Fix missing references
* Fix displaced reference target
* Fix miscellaneous typos
* Remove duplicate CLI documentation
* Rewrap lines to 80 characters

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
Quentin Young 2018-05-11 15:53:07 -04:00
parent 5456d3b844
commit 80ca5b6d75

View File

@ -43,10 +43,9 @@ Besides the common invocation options (:ref:`common-invocation-options`), the
When *Zebra* starts with this option, the VRF backend is based on Linux When *Zebra* starts with this option, the VRF backend is based on Linux
network namespaces. That implies that all network namespaces discovered by network namespaces. That implies that all network namespaces discovered by
ZEBRA will create an associated VRF. The other daemons will operate on the VRF ZEBRA will create an associated VRF. The other daemons will operate on the VRF
VRF defined by *Zebra*, as usual. More information in the :ref:`VRF Commands` VRF defined by *Zebra*, as usual.
chapter.
.. program:: configure .. seealso:: :ref:`vrf`
.. _interface-commands: .. _interface-commands:
@ -246,8 +245,8 @@ Link Parameters Commands
Static Route Commands Static Route Commands
===================== =====================
Static routing is a very fundamental feature of routing technology. It Static routing is a very fundamental feature of routing technology. It defines
defines static prefix and gateway. static prefix and gateway.
.. index:: ip route NETWORK GATEWAY .. index:: ip route NETWORK GATEWAY
.. clicmd:: ip route NETWORK GATEWAY .. clicmd:: ip route NETWORK GATEWAY
@ -265,16 +264,16 @@ defines static prefix and gateway.
ip route 10.0.0.0/8 ppp0 ip route 10.0.0.0/8 ppp0
ip route 10.0.0.0/8 null0 ip route 10.0.0.0/8 null0
First example defines 10.0.0.0/8 static route with gateway 10.0.0.2. First example defines 10.0.0.0/8 static route with gateway 10.0.0.2. Second
Second one defines the same prefix but with gateway to interface ppp0. The one defines the same prefix but with gateway to interface ppp0. The third
third install a blackhole route. install a blackhole route.
.. index:: ip route NETWORK NETMASK GATEWAY .. index:: ip route NETWORK NETMASK GATEWAY
.. clicmd:: ip route NETWORK NETMASK GATEWAY .. clicmd:: ip route NETWORK NETMASK GATEWAY
This is alternate version of above command. When NETWORK is This is alternate version of above command. When NETWORK is A.B.C.D format,
A.B.C.D format, user must define NETMASK value with A.B.C.D user must define NETMASK value with A.B.C.D format. GATEWAY is same option
format. GATEWAY is same option as above command. as above command.
.. code-block:: frr .. code-block:: frr
@ -357,36 +356,38 @@ default) should the specified gateways not be reachable. E.g.:
on Linux operating systems only, and perform AND matching on packet's on Linux operating systems only, and perform AND matching on packet's
destination and source addresses in the kernel's forwarding path. Note that destination and source addresses in the kernel's forwarding path. Note that
destination longest-prefix match is "more important" than source LPM, e.g. destination longest-prefix match is "more important" than source LPM, e.g.
*"2001:db8:1::/64 from 2001:db8::/48"* will win over ``2001:db8:1::/64 from 2001:db8::/48`` will win over
*"2001:db8::/48 from 2001:db8:1::/64"* if both match. ``2001:db8::/48 from 2001:db8:1::/64`` if both match.
.. index:: table TABLENO .. index:: table TABLENO
.. clicmd:: table TABLENO .. clicmd:: table TABLENO
Select the primary kernel routing table to be used. This only works Select the primary kernel routing table to be used. This only works for
for kernels supporting multiple routing tables (like GNU/Linux 2.2.x kernels supporting multiple routing tables (like GNU/Linux 2.2.x and later).
and later). After setting TABLENO with this command, After setting TABLENO with this command, static routes defined after this
static routes defined after this are added to the specified table. are added to the specified table.
.. _multicast-rib-commands: .. _vrf:
VRF (Virtual Routing and Forwarding) Virtual Routing and Forwarding
==================================== ==============================
FRR supports :abbr:`VRF (Virtual Routing and Forwarding)`. VRF is a way to
separate networking contexts on the same machine. Those networking contexts are
associated with separate interfaces, thus making it possible to associate one
interface with a specific VRF.
Currently, the user has the possibility to configure VRFs. VRF is a way to
separate networking contexts on the same machine. Those networking contexts
are associated with separate interfaces, thus making it possible to associate
one interface with a specific VRF.
VRF can be used, for example, when instantiating per enterprise networking VRF can be used, for example, when instantiating per enterprise networking
services, without having to instantiate the physical host machine or the routing services, without having to instantiate the physical host machine or the
management daemons for each enterprise. As a result, interfaces are separate for routing management daemons for each enterprise. As a result, interfaces are
each set of VRF, and routing daemons can have their own context for each VRF. separate for each set of VRF, and routing daemons can have their own context
for each VRF.
This conceptual view introduces the *Default VRF* case. If the user does not This conceptual view introduces the *Default VRF* case. If the user does not
configure any specific VRF, then by default, the user will however configure the configure any specific VRF, then by default, FRR uses the *Default VRF*.
*Default VRF*.
On the *Zebra* context, this can be done when being in configuration mode, when In the context of *Zebra*, this is done automatically when configuring a static
configuring a static route clicmd:`ip route NETWORK GATEWAY`. route with, for example, :clicmd:`ip route NETWORK GATEWAY`:
.. code-block:: frr .. code-block:: frr
@ -396,12 +397,12 @@ configuring a static route clicmd:`ip route NETWORK GATEWAY`.
exit exit
Configuring VRF networking contexts can be done in various ways on FRR. The VRF Configuring VRF networking contexts can be done in various ways on FRR. The VRF
interfaces can be configured by entering in interface configuration mode : interfaces can be configured by entering in interface configuration mode
:clicmd:`interface IFNAME vrf VRF`. Also, if the user wants to configure a static :clicmd:`interface IFNAME vrf VRF`. Also, if the user wants to configure a
route for a specific VRF, then a specific VRF configuration mode is available. After static route for a specific VRF, then a specific VRF configuration mode is
entering into that mode by following command: :clicmd:`vrf VRF`. the user can enter available. After entering into that mode with :clicmd:`vrf VRF` the user can
the same route command as before, but this time, the route command will apply to vrf enter the same route command as before, but this time, the route command will
VRF. apply to the VRF.
.. code-block:: frr .. code-block:: frr
@ -414,17 +415,17 @@ VRF.
A VRF backend mode is chosen when running *Zebra*. A VRF backend mode is chosen when running *Zebra*.
If no option is chosen, then the *Linux VRF* implementation as references in If no option is chosen, then the *Linux VRF* implementation as references in
`https://www.kernel.org/doc/Documentation/networking/vrf.txt` will be mapped over https://www.kernel.org/doc/Documentation/networking/vrf.txt will be mapped over
the *Zebra* VRF. The routing table associated to that VRF is a Linux table the *Zebra* VRF. The routing table associated to that VRF is a Linux table
identifier located in the same *Linux network namespace* where *Zebra* started. identifier located in the same *Linux network namespace* where *Zebra* started.
If the :option:`-n` option is chosen, then the *Linux network namespace* will be If the :option:`-n` option is chosen, then the *Linux network namespace* will
mapped over the *Zebra* VRF. That implies that *Zebra* is able to configure several be mapped over the *Zebra* VRF. That implies that *Zebra* is able to configure
*Linux network namespaces*. The routing table associated to that VRF is the whole several *Linux network namespaces*. The routing table associated to that VRF
routing tables located in that namespace. For instance, this mode matches OpenStack is the whole routing tables located in that namespace. For instance, this mode
Network Namespaces. It matches also OpenFastPath. The default behavior remains Linux matches OpenStack Network Namespaces. It matches also OpenFastPath. The default
VRF which is supported by the Linux kernel community, see behavior remains Linux VRF which is supported by the Linux kernel community,
`https://www.kernel.org/doc/Documentation/networking/vrf.txt`. see https://www.kernel.org/doc/Documentation/networking/vrf.txt.
Because of that difference, there are some subtle differences when running some Because of that difference, there are some subtle differences when running some
commands in relationship to VRF. Here is an extract of some of those commands: commands in relationship to VRF. Here is an extract of some of those commands:
@ -433,29 +434,19 @@ commands in relationship to VRF. Here is an extract of some of those commands:
.. clicmd:: vrf VRF .. clicmd:: vrf VRF
This command is available on configuration mode. By default, above command This command is available on configuration mode. By default, above command
permits accessing the vrf configuration mode. This mode is available for both permits accessing the vrf configuration mode. This mode is available for
VRFs. It is to be noted that *Zebra* does not create *Linux VRF*. Provisioning both VRFs. It is to be noted that *Zebra* does not create *Linux VRF*.
this command is used to keep the configuration intact. Provisioning this command is used to keep the configuration intact.
.. index:: netns NAMESPACE .. index:: netns NAMESPACE
.. clicmd:: netns NAMESPACE .. clicmd:: netns NAMESPACE
This command is based on VRF configuration mode. This command is available when This command is based on VRF configuration mode. This command is available
*Zebra* is run in :option:`-n` mode. This command reflects which *Linux network when *Zebra* is run in :option:`-n` mode. This command reflects which *Linux
namespace* is to be mapped with *Zebra* VRF. It is to be noted that *Zebra* network namespace* is to be mapped with *Zebra* VRF. It is to be noted that
creates and detects added/suppressed VRFs from the Linux environment (in fact, *Zebra* creates and detects added/suppressed VRFs from the Linux environment
those managed with iproute2). Provisioning this command is used to keep the (in fact, those managed with iproute2). Provisioning this command is used to
configuration intact. keep the configuration intact.
.. index:: ip route NETWORK NETMASK GATEWAY
.. clicmd:: ip route NETWORK NETMASK GATEWAY
This command is based on VRF configuration mode or in configuration mode. If
applied on configuration mode, this applies to default VRF. Otherwise, this
command applies to the VRF of the vrf configuration mode. By default, above
command permits configuring a network in the table identifier of the mentioned
VRF. If :option:`-n` option is given, the network will be configured in the
default routing table of the *Linux network namespace*.
.. index:: ip route NETWORK NETMASK GATEWAY NEXTHOPVRF .. index:: ip route NETWORK NETMASK GATEWAY NEXTHOPVRF
.. clicmd:: ip route NETWORK NETMASK GATEWAY NEXTHOPVRF .. clicmd:: ip route NETWORK NETMASK GATEWAY NEXTHOPVRF
@ -463,39 +454,35 @@ commands in relationship to VRF. Here is an extract of some of those commands:
This command is based on VRF configuration mode or in configuration mode. If This command is based on VRF configuration mode or in configuration mode. If
on configuration mode, this applies to default VRF. Otherwise, this command on configuration mode, this applies to default VRF. Otherwise, this command
applies to the VRF of the vrf configuration mode. This command is used to applies to the VRF of the vrf configuration mode. This command is used to
configure a vrf route leak across 2 VRFs. This command is only available when configure a vrf route leak across 2 VRFs. This command is only available
*Zebra* is launched without :option:`-n` option. when *Zebra* is launched without :option:`-n` option.
.. index:: ip route NETWORK NETMASK GATEWAY table TABLENO .. index:: ip route NETWORK NETMASK GATEWAY table TABLENO
.. clicmd:: ip route NETWORK NETMASK GATEWAY table TABLENO .. clicmd:: ip route NETWORK NETMASK GATEWAY table TABLENO
This command is based on VRF configuration mode. There, this command is only This command is based on configuration mode. There, for default VRF, this
available with :option:`-n` command. This commands permits configuring a network command is available for all modes. The ``TABLENO`` configured is one of the
route in the given ``TABLENO`` of the *Linux network namespace*. tables from Default *Linux network namespace*.
.. index:: ip route NETWORK NETMASK GATEWAY table TABLENO
.. clicmd:: ip route NETWORK NETMASK GATEWAY table TABLENO
This command is based on configuration mode. There, for default VRF, this command
is available for all modes. The ``TABLENO`` configured is one of the tables from
Default *Linux network namespace*.
.. index:: show ip route vrf VRF .. index:: show ip route vrf VRF
.. clicmd:: show ip route vrf VRF .. clicmd:: show ip route vrf VRF
The show command permits dumping the routing table associated to the VRF. If The show command permits dumping the routing table associated to the VRF. If
*Zebra* is launched with default settings, this will be the ``TABLENO`` of the *Zebra* is launched with default settings, this will be the ``TABLENO`` of
VRF configured on the kernel, thanks to information provided in the VRF configured on the kernel, thanks to information provided in
`https://www.kernel.org/doc/Documentation/networking/vrf.txt`. https://www.kernel.org/doc/Documentation/networking/vrf.txt. If *Zebra* is
If *Zebra* is launched with :option:`-n` option, this will be the default routing launched with :option:`-n` option, this will be the default routing table of
table of the *Linux network namespace* ``VRF``. the *Linux network namespace* ``VRF``.
.. index:: show ip route vrf VRF table TABLENO .. index:: show ip route vrf VRF table TABLENO
.. clicmd:: show ip route vrf VRF table TABLENO .. clicmd:: show ip route vrf VRF table TABLENO
The show command is only available with :option:`-n` option. The show command is only available with :option:`-n` option. This command
This command will dump the routing table ``TABLENO`` of the *Linux network will dump the routing table ``TABLENO`` of the *Linux network namespace*
namespace* ``VRF``. ``VRF``.
The usual static route commands are also available in the VRF context. When
entered within the VRF context the static routes are created in the VRF.
.. code-block:: frr .. code-block:: frr
@ -503,6 +490,8 @@ commands in relationship to VRF. Here is an extract of some of those commands:
show ip table vrf r1-cust1 table 43 show ip table vrf r1-cust1 table 43
.. _multicast-rib-commands:
Multicast RIB Commands Multicast RIB Commands
====================== ======================
@ -671,6 +660,8 @@ The FIB push interface comprises of a TCP connection between zebra and
the FPM. The connection is initiated by zebra -- that is, the FPM acts the FPM. The connection is initiated by zebra -- that is, the FPM acts
as the TCP server. as the TCP server.
.. program:: configure
The relevant zebra code kicks in when zebra is configured with the The relevant zebra code kicks in when zebra is configured with the
:option:`--enable-fpm` flag. Zebra periodically attempts to connect to :option:`--enable-fpm` flag. Zebra periodically attempts to connect to
the well-known FPM port. Once the connection is up, zebra starts the well-known FPM port. Once the connection is up, zebra starts