Merge pull request #2039 from qlyoung/docuser

doc: more cleanup, config syntax highlighting
This commit is contained in:
Rafael Zalamena 2018-04-12 18:02:22 -03:00 committed by GitHub
commit a6528075a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
50 changed files with 973 additions and 794 deletions

View File

@ -264,4 +264,5 @@ EXTRA_DIST = frr-sphinx.mk \
figures/ospf_api_architecture.png \
figures/ospf_api_msghdr.png \
figures/ospf_api_msgs1.png \
figures/ospf_api_msgs2.png
figures/ospf_api_msgs2.png \
extra/frrlexer.py

View File

@ -2,3 +2,7 @@
div.body {
max-width: none;
}
pre {
background-color: #e2e2e2;
}

View File

@ -125,7 +125,7 @@ Get FRR, compile it and install it (from Git)
using any packages**
Add frr groups and user
~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^
::
@ -135,7 +135,7 @@ Add frr groups and user
-c "FRR FRRouting suite" -d /var/run/frr frr
Download Source, configure and compile it
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(You may prefer different options on configure statement. These are just
an example.)
@ -176,7 +176,7 @@ an example.)
sudo make SPHINXBUILD=sphinx-build2.7 install
Create empty FRR configuration files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -198,7 +198,7 @@ Create empty FRR configuration files
sudo chmod 640 /etc/frr/*.conf
Install daemon config file
~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -206,13 +206,13 @@ Install daemon config file
sudo chown frr:frr /etc/frr/daemons
Edit /etc/frr/daemons as needed to select the required daemons
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Look for the section with ``watchfrr_enable=...`` and ``zebra=...`` etc.
Enable the daemons as required by changing the value to ``yes``
Enable IP & IPv6 forwarding
~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Edit ``/etc/sysctl.conf`` and set the following values (ignore the other
settings)
@ -233,7 +233,7 @@ Load the modifed sysctl's on the system:
sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
Add init.d startup files
~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -241,14 +241,14 @@ Add init.d startup files
sudo chkconfig --add frr
Enable frr daemon at startup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
sudo chkconfig frr on
Start FRR manually (or reboot)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::

View File

@ -31,7 +31,7 @@ Get FRR, compile it and install it (from Git)
using any packages**
Add frr groups and user
~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^
::
@ -41,7 +41,7 @@ Add frr groups and user
-c "FRR FRRouting suite" -d /var/run/frr frr
Download Source, configure and compile it
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(You may prefer different options on configure statement. These are just
an example.)
@ -83,7 +83,7 @@ an example.)
sudo make install
Create empty FRR configuration files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -106,7 +106,7 @@ Create empty FRR configuration files
sudo chmod 640 /etc/frr/*.conf
Install daemon config file
~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -114,13 +114,13 @@ Install daemon config file
sudo chown frr:frr /etc/frr/daemons
Edit /etc/frr/daemons as needed to select the required daemons
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Look for the section with ``watchfrr_enable=...`` and ``zebra=...`` etc.
Enable the daemons as required by changing the value to ``yes``
Enable IP & IPv6 forwarding
~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Create a new file ``/etc/sysctl.d/90-routing-sysctl.conf`` with the
following content:
@ -140,7 +140,7 @@ Load the modifed sysctl's on the system:
sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
Install frr Service and redhat init files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -148,21 +148,21 @@ Install frr Service and redhat init files
sudo install -p -m 755 redhat/frr.init /usr/lib/frr/frr
Register the systemd files
~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^
::
sudo systemctl preset frr.service
Enable required frr at startup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
sudo systemctl enable frr
Reboot or start FRR manually
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::

View File

@ -32,7 +32,7 @@ Get FRR, compile it and install it (from Git)
using any packages**
Add frr groups and user
~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^
::
@ -43,7 +43,7 @@ Add frr groups and user
sudo usermod -a -G frrvty frr
Download Source, configure and compile it
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(You may prefer different options on configure statement. These are just
an example.)
@ -80,7 +80,7 @@ an example.)
sudo make install
Create empty FRR configuration files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -99,7 +99,7 @@ Create empty FRR configuration files
sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
Enable IP & IPv6 forwarding
~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the
other settings)
@ -118,7 +118,7 @@ other settings)
system
Troubleshooting
~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^
**Local state directory**

View File

@ -19,7 +19,7 @@ Get FRR, compile it and install it (from Git)
using any packages**
Add frr groups and user
~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^
::
@ -30,7 +30,7 @@ Add frr groups and user
sudo usermod -a -G frrvty frr
Download Source, configure and compile it
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(You may prefer different options on configure statement. These are just
an example.)
@ -68,7 +68,7 @@ an example.)
sudo make install
Create empty FRR configuration files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -88,7 +88,7 @@ Create empty FRR configuration files
sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
Enable IP & IPv6 forwarding
~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the
other settings)
@ -110,7 +110,7 @@ Troubleshooting
---------------
Shared library error
~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^
If you try and start any of the frrouting daemons you may see the below
error due to the frrouting shared library directory not being found:

View File

@ -24,7 +24,7 @@ Get FRR, compile it and install it (from Git)
using any packages**
Add frr groups and user
~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^
::
@ -34,7 +34,7 @@ Add frr groups and user
-c "FRR FRRouting suite" -d /var/run/frr frr
Download Source, configure and compile it
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(You may prefer different options on configure statement. These are just
an example.)
@ -75,7 +75,7 @@ an example.)
sudo make install
Create empty FRR configuration files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -99,7 +99,7 @@ Create empty FRR configuration files
sudo chmod 640 /etc/frr/*.conf
Install daemon config file
~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -107,13 +107,13 @@ Install daemon config file
sudo chown frr:frr /etc/frr/daemons
Edit /etc/frr/daemons as needed to select the required daemons
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Look for the section with ``watchfrr_enable=...`` and ``zebra=...`` etc.
Enable the daemons as required by changing the value to ``yes``
Enable IP & IPv6 forwarding (and MPLS)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Create a new file ``/etc/sysctl.d/90-routing-sysctl.conf`` with the
following content: (Please make sure to list all interfaces with
@ -155,7 +155,7 @@ And load the kernel modules on the running system:
sudo modprobe mpls-router mpls-iptunnel
Install frr Service and redhat init files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -163,14 +163,14 @@ Install frr Service and redhat init files
sudo install -p -m 755 redhat/frr.init /usr/lib/frr/frr
Enable required frr at startup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
sudo systemctl enable frr
Reboot or start FRR manually
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::

View File

@ -34,7 +34,7 @@ Get FRR, compile it and install it (from Git)
using any packages**
Add frr group and user
~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^
::
@ -76,7 +76,7 @@ an example)
sudo gmake install
Create empty FRR configuration files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -95,7 +95,7 @@ Create empty FRR configuration files
sudo chmod 640 /usr/local/etc/frr/*.conf
Enable IP & IPv6 forwarding
~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Add the following lines to the end of ``/etc/sysctl.conf``:

View File

@ -34,7 +34,7 @@ Get FRR, compile it and install it (from Git)
using any packages**
Add frr group and user
~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^
::
@ -76,7 +76,7 @@ an example)
sudo gmake install
Create empty FRR configuration files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -95,7 +95,7 @@ Create empty FRR configuration files
sudo chmod 640 /usr/local/etc/frr/*.conf
Enable IP & IPv6 forwarding
~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Add the following lines to the end of ``/etc/sysctl.conf``:

View File

@ -47,7 +47,7 @@ Get FRR, compile it and install it (from Git)
using any packages**
Add frr group and user
~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^
::
@ -89,7 +89,7 @@ an example)
sudo gmake install
Create empty FRR configuration files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -108,7 +108,7 @@ Create empty FRR configuration files
sudo chmod 640 /usr/local/etc/frr/*.conf
Enable IP & IPv6 forwarding
~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Add the following lines to the end of ``/etc/sysctl.conf``:

View File

@ -98,11 +98,11 @@ DAEMONS= or don't install unneded packages For example: zebra bgpd ldpd
isisd nhrpd ospfd ospf6d pimd ripd ripngd
Enable the serivce
~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^
- service frr enable
Start the service
~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^
- service frr start

View File

@ -44,7 +44,7 @@ Get FRR, compile it and install it (from Git)
---------------------------------------------
Add frr groups and user
~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^
::
@ -54,7 +54,7 @@ Add frr groups and user
-d /nonexistent -s /sbin/nologin frr
Download Source, configure and compile it
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(You may prefer different options on configure statement. These are just
an example)
@ -89,7 +89,7 @@ an example)
sudo gmake install
Create empty FRR configuration files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -109,7 +109,7 @@ Create empty FRR configuration files
sudo chmod 640 /usr/pkg/etc/frr/*.conf
Enable IP & IPv6 forwarding
~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Add the following lines to the end of ``/etc/sysctl.conf``:
@ -123,7 +123,7 @@ Add the following lines to the end of ``/etc/sysctl.conf``:
system
Install rc.d init files
~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^
::
@ -131,7 +131,7 @@ Install rc.d init files
chmod 555 /etc/rc.d/*.sh
Enable FRR processes
~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^
(Enable the required processes only)

View File

@ -35,7 +35,7 @@ Get FRR, compile it and install it (from Git)
---------------------------------------------
Add frr groups and user
~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^
::
@ -45,7 +45,7 @@ Add frr groups and user
-d /nonexistent -s /sbin/nologin frr
Download Source, configure and compile it
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(You may prefer different options on configure statement. These are just
an example)
@ -80,7 +80,7 @@ an example)
sudo gmake install
Create empty FRR configuration files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -99,7 +99,7 @@ Create empty FRR configuration files
sudo chmod 640 /usr/pkg/etc/frr/*.conf
Enable IP & IPv6 forwarding
~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Add the following lines to the end of ``/etc/sysctl.conf``:
@ -113,7 +113,7 @@ Add the following lines to the end of ``/etc/sysctl.conf``:
system
Install rc.d init files
~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^
::
@ -121,7 +121,7 @@ Install rc.d init files
chmod 555 /etc/rc.d/*.sh
Enable FRR processes
~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^
(Enable the required processes only)

View File

@ -9,7 +9,7 @@ OmniOS restrictions:
use without MPLS
Enable IP & IPv6 forwarding
~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -93,7 +93,7 @@ Get FRR, compile it and install it (from Git)
using any packages**
Add frr group and user
~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^
::
@ -138,7 +138,7 @@ an example)
sudo gmake install
Enable IP & IPv6 forwarding
~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^
::

View File

@ -30,7 +30,7 @@ Get FRR, compile it and install it (from Git)
using any packages**
Add frr group and user
~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^
::
@ -40,7 +40,7 @@ Add frr group and user
-d /nonexistent -s /sbin/nologin _frr
Download Source, configure and compile it
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(You may prefer different options on configure statement. These are just
an example)
@ -75,7 +75,7 @@ an example)
doas gmake install
Create empty FRR configuration files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -100,7 +100,7 @@ Create empty FRR configuration files
doas chmod 640 /etc/frr/*.conf
Enable IP & IPv6 forwarding
~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Add the following lines to the end of ``/etc/rc.conf``:
@ -113,7 +113,7 @@ Add the following lines to the end of ``/etc/rc.conf``:
**Reboot** to apply the config to the system
Enable MPLS Forwarding
~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^
To enable MPLS forwarding on a given interface, use the following
command:
@ -132,7 +132,7 @@ Example:
inet 10.0.1.1 255.255.255.0 mpls
Install rc.d init files
~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^
(create them in /etc/rc.d - no example are included at this time with
FRR source)
@ -152,7 +152,7 @@ Example (for zebra - store as ``/etc/rc.d/frr_zebra.sh``)
rc_cmd $1
Enable FRR processes
~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^
(Enable the required processes only)

View File

@ -70,7 +70,7 @@ Get FRR, compile it and install it (from Git)
using any packages**
Add frr groups and user
~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^
::
@ -81,7 +81,7 @@ Add frr groups and user
sudo usermod -a -G frrvty frr
Download Source, configure and compile it
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(You may prefer different options on configure statement. These are just
an example.)
@ -116,7 +116,7 @@ an example.)
sudo make install
Create empty FRR configuration files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -135,7 +135,7 @@ Create empty FRR configuration files
sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
Enable IP & IPv6 forwarding
~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the
other settings)
@ -154,7 +154,7 @@ other settings)
system
Install the init.d service
~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -164,7 +164,7 @@ Install the init.d service
sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf
Enable daemons
~~~~~~~~~~~~~~
^^^^^^^^^^^^^^
| Edit ``/etc/frr/daemons`` and change the value from "no" to "yes" for
those daemons you want to start by systemd.
@ -181,7 +181,7 @@ Enable daemons
isisd=yes
Start the init.d service
~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^
- /etc/init.d/frr start
- use ``/etc/init.d/frr status`` to check its status.

View File

@ -24,7 +24,7 @@ Get FRR, compile it and install it (from Git)
using any packages**
Add frr groups and user
~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^
::
@ -35,7 +35,7 @@ Add frr groups and user
sudo usermod -a -G frrvty frr
Download Source, configure and compile it
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(You may prefer different options on configure statement. These are just
an example.)
@ -71,7 +71,7 @@ an example.)
sudo make install
Create empty FRR configuration files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -90,7 +90,7 @@ Create empty FRR configuration files
sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
Enable IP & IPv6 forwarding
~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the
other settings)
@ -106,7 +106,10 @@ other settings)
net.ipv6.conf.all.forwarding=1
**Reboot** or use ``sysctl -p`` to apply the same config to the running
system ### Install the init.d service
system
Install the init.d service
^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -116,7 +119,7 @@ system ### Install the init.d service
sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf
Enable daemons
~~~~~~~~~~~~~~
^^^^^^^^^^^^^^
| Edit ``/etc/frr/daemons`` and change the value from "no" to "yes" for
those daemons you want to start by systemd.
@ -133,7 +136,7 @@ Enable daemons
isisd=yes
Start the init.d service
~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^
- /etc/init.d/frr start
- use ``/etc/init.d/frr status`` to check its status.

View File

@ -25,7 +25,7 @@ Get FRR, compile it and install it (from Git)
using any packages**
Add frr groups and user
~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^
::
@ -36,7 +36,7 @@ Add frr groups and user
sudo usermod -a -G frrvty frr
Download Source, configure and compile it
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(You may prefer different options on configure statement. These are just
an example.)
@ -72,7 +72,7 @@ an example.)
sudo make install
Create empty FRR configuration files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -91,7 +91,7 @@ Create empty FRR configuration files
sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
Enable IPv4 & IPv6 forwarding
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the
other settings)
@ -107,7 +107,7 @@ other settings)
net.ipv6.conf.all.forwarding=1
Enable MPLS Forwarding (with Linux Kernel >= 4.5)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Edit ``/etc/sysctl.conf`` and the following lines. Make sure to add a
line equal to ``net.mpls.conf.eth0.input`` or each interface used with
@ -122,7 +122,7 @@ MPLS
net.mpls.platform_labels=100000
Add MPLS kernel modules
~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^
Add the following lines to ``/etc/modules-load.d/modules.conf``:
@ -136,7 +136,7 @@ Add the following lines to ``/etc/modules-load.d/modules.conf``:
system
Install the systemd service (if rebooted from last step, change directory back to frr directory)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -148,7 +148,7 @@ Install the systemd service (if rebooted from last step, change directory back t
sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf
Enable daemons
~~~~~~~~~~~~~~
^^^^^^^^^^^^^^
| Edit ``/etc/frr/daemons`` and change the value from "no" to "yes" for
those daemons you want to start by systemd.
@ -165,12 +165,12 @@ Enable daemons
isisd=yes
Enable the systemd service
~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^
- systemctl enable frr
Start the systemd service
~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^
- systemctl start frr
- use ``systemctl status frr`` to check its status.

View File

@ -20,7 +20,7 @@ Get FRR, compile it and install it (from Git)
using any packages**
Add frr groups and user
~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^
::
@ -31,7 +31,7 @@ Add frr groups and user
sudo usermod -a -G frrvty frr
Download Source, configure and compile it
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(You may prefer different options on configure statement. These are just
an example.)
@ -67,7 +67,7 @@ an example.)
sudo make install
Create empty FRR configuration files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -86,7 +86,7 @@ Create empty FRR configuration files
sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
Enable IPv4 & IPv6 forwarding
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the
other settings)
@ -102,7 +102,7 @@ other settings)
net.ipv6.conf.all.forwarding=1
Enable MPLS Forwarding (with Linux Kernel >= 4.5)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Edit ``/etc/sysctl.conf`` and the following lines. Make sure to add a
line equal to ``net.mpls.conf.eth0.input`` or each interface used with
@ -117,7 +117,7 @@ MPLS
net.mpls.platform_labels=100000
Add MPLS kernel modules
~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^
Add the following lines to ``/etc/modules-load.d/modules.conf``:
@ -131,7 +131,7 @@ Add the following lines to ``/etc/modules-load.d/modules.conf``:
system
Install the systemd service (if rebooted from last step, change directory back to frr directory)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@ -143,7 +143,7 @@ Install the systemd service (if rebooted from last step, change directory back t
sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf
Enable daemons
~~~~~~~~~~~~~~
^^^^^^^^^^^^^^
| Edit ``/etc/frr/daemons`` and change the value from "no" to "yes" for
those daemons you want to start by systemd.
@ -160,12 +160,12 @@ Enable daemons
isisd=yes
Enable the systemd service
~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^
- systemctl enable frr
Start the systemd service
~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^
- systemctl start frr
- use ``systemctl status frr`` to check its status.

View File

@ -1,5 +1,6 @@
************
Building FRR
=========================
************
.. toctree::
:maxdepth: 2

View File

@ -15,6 +15,8 @@
import sys
import os
import re
import pygments
from sphinx.highlighting import lexers
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@ -51,7 +53,7 @@ master_doc = 'index'
# General information about the project.
project = u'FRR'
copyright = u'2017, FRR'
author = u'FRR'
author = u'FRR authors'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@ -67,34 +69,40 @@ release = u'?.?-?'
# Extract values from codebase for substitution into docs.
# -----------------------------------------------------------------------------
# Various installation prefixes. Reasonable defaults are set where possible.
# Values are overridden by logic below.
# Various installation prefixes. Values are extracted from config.status.
# Reasonable defaults are set in case that file does not exist.
replace_vars = {
'AUTHORS': 'Kunihiro Ishiguro, et al.',
'AUTHORS': author,
'COPYRIGHT_YEAR': '1999-2005',
'COPYRIGHT_STR': None,
'COPYRIGHT_STR': 'Copyright (c) 1999-2005',
'PACKAGE_NAME': project.lower(),
'PACKAGE_TARNAME': project.lower(),
'PACKAGE_STRING': None,
'PACKAGE_STRING': project.lower() + ' latest',
'PACKAGE_URL': 'https://frrouting.org/',
'PACKAGE_VERSION': None,
'INSTALL_PREFIX_ETC': None,
'INSTALL_PREFIX_SBIN': None,
'INSTALL_PREFIX_STATE': None,
'INSTALL_PREFIX_MODULES': None,
'INSTALL_USER': None,
'INSTALL_GROUP': None,
'INSTALL_VTY_GROUP': None,
'PACKAGE_VERSION': 'latest',
'INSTALL_PREFIX_ETC': '/etc/frr',
'INSTALL_PREFIX_SBIN': '/usr/lib/frr',
'INSTALL_PREFIX_STATE': '/var/run/frr',
'INSTALL_PREFIX_MODULES': '/usr/lib/frr/modules',
'INSTALL_USER': 'frr',
'INSTALL_GROUP': 'frr',
'INSTALL_VTY_GROUP': 'frrvty',
'GROUP': 'frr',
'USER': 'frr',
}
# extract version information, installation location, other stuff we need to
# use when building final documents
val = re.compile('^S\["([^"]+)"\]="(.*)"$')
with open('../../config.status', 'r') as cfgstatus:
try:
with open('../../config.status', 'r') as cfgstatus:
for ln in cfgstatus.readlines():
m = val.match(ln)
if not m or m.group(1) not in replace_vars.keys(): continue
replace_vars[m.group(1)] = m.group(2)
except IOError:
# if config.status doesn't exist, just ignore it
pass
# manually fill out some of these we can't get from config.status
replace_vars['COPYRIGHT_STR'] = "Copyright (c)"
@ -341,3 +349,13 @@ def setup(app):
app.add_object_type('clicmd', 'clicmd')
# css overrides for HTML theme
app.add_stylesheet('overrides.css')
# load Pygments lexer for FRR config syntax
#
# NB: in Pygments 2.2+ this can be done with `load_lexer_from_file`, but we
# do it manually since not all of our supported build platforms have 2.2
# yet.
#
# frrlexer = pygments.lexers.load_lexer_from_file('../extra/frrlexer.py', lexername="FRRLexer")
custom_namespace = {}
exec(open('../extra/frrlexer.py', 'rb').read(), custom_namespace)
lexers['frr'] = custom_namespace['FRRLexer']()

View File

@ -1,5 +1,6 @@
libfrr library facilities
=========================
***************************
Library Facilities (libfrr)
***************************
.. toctree::
:maxdepth: 2

View File

@ -6,7 +6,7 @@ Memtypes
FRR includes wrappers arround ``malloc()`` and ``free()`` that count the number
of objects currently allocated, for each of a defined ``MTYPE``.
To this extent, there are `memory groups` and `memory types`. Each memory
To this extent, there are *memory groups* and *memory types*. Each memory
type must belong to a memory group, this is used just to provide some basic
structure.

View File

@ -100,7 +100,7 @@ Design
------
Modules
~~~~~~~
^^^^^^^
The core design introduces an "nht" (next hop tracking) module in BGP
and "rnh" (recursive nexthop) module in Zebra. The "nht" module
@ -178,7 +178,7 @@ The next hop notification control flow is the following:
zclient message format
~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^
ZEBRA_NEXTHOP_REGISTER and ZEBRA_NEXTHOP_UNREGISTER messages are
encoded in the following way:
@ -233,7 +233,7 @@ encoded in the following way:
BGP data structure
~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^
Legend:
::
@ -260,7 +260,7 @@ Legend:
Zebra data structure
~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^
RNH table::
@ -279,7 +279,7 @@ RNH table::
};
User interface changes
~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^
::
@ -338,7 +338,7 @@ User interface changes
+ no shut all links to r4
Future work
~~~~~~~~~~~
^^^^^^^^^^^
- route-policy for next hop validation (e.g. ignore default route)
- damping for rapid next hop changes

View File

@ -29,7 +29,7 @@ Implementation details
----------------------
Concepts
~~~~~~~~
^^^^^^^^
Segment Routing used 3 differents OPAQUE LSA in OSPF to carry the various
information:
@ -47,7 +47,7 @@ Segment Routing functions (see below) when an Extended Link / Prefix or Router
Information LSA s are received.
Overview
~~~~~~~~
^^^^^^^^
Following files where modified or added:
@ -113,7 +113,7 @@ The figure below shows the relation between the various files:
Figure 1: Overview of Segment Routing interaction
Module interactions
~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^
To process incoming LSA, the code is based on the capability to call `hook()`
functions when LSA are inserted or delete to / from the LSDB and the
@ -186,7 +186,7 @@ Configuration
-------------
Linux Kernel
~~~~~~~~~~~~
^^^^^^^^^^^^
In order to use OSPF Segment Routing, you must setup MPLS data plane. Up to
know, only Linux Kernel version >= 4.5 is supported.
@ -231,7 +231,7 @@ especially the `lo` one. For that purpose, disable RP filtering with:
sysctl -w net.ipv4.conf.lo.rp_filter=0
OSPFd
~~~~~
^^^^^
Here it is a simple example of configuration to enable Segment Routing. Note
that `opaque capability` and `router information` must be set to activate

View File

@ -775,27 +775,33 @@ FRR uses Sphinx+RST as its documentation system. The document you are currently
reading was generated by Sphinx from RST source in
:file:`doc/developer/workflow.rst`. The documentation is structured as follows:
+-----------------------+--------------------------------------------------------------+
+-----------------------+-------------------------------------------+
| Directory | Contents |
+=======================+==============================================================+
| :file:`doc/user` | User documentation; configuration guides; protocol overviews |
+-----------------------+--------------------------------------------------------------+
| :file:`doc/developer` | Developer's documentation; API specs; datastructures; |
| | architecture overviews; project management procedure |
+-----------------------+--------------------------------------------------------------+
+=======================+===========================================+
| :file:`doc/user` | User documentation; configuration guides; |
| | protocol overviews |
+-----------------------+-------------------------------------------+
| :file:`doc/developer` | Developer's documentation; API specs; |
| | datastructures; architecture overviews; |
| | project management procedure |
+-----------------------+-------------------------------------------+
| :file:`doc/manpages` | Source for manpages |
+-----------------------+--------------------------------------------------------------+
+-----------------------+-------------------------------------------+
| :file:`doc/figures` | Images and diagrams |
+-----------------------+--------------------------------------------------------------+
+-----------------------+-------------------------------------------+
| :file:`doc/extra` | Miscellaneous Sphinx extensions, scripts, |
| | customizations, etc. |
+-----------------------+-------------------------------------------+
Each of these directories, with the exception of :file:`doc/figures`, contains
a Sphinx-generated Makefile and configuration script :file:`conf.py` used to
set various document parameters. The makefile can be used for a variety of
targets; invoke `make help` in any of these directories for a listing of
available output formats. For convenience, there is a top-level
:file:`Makefile.am` that has targets for PDF and HTML documentation for both
developer and user documentation, respectively. That makefile is also
responsible for building manual pages packed with distribution builds.
Each of these directories, with the exception of :file:`doc/figures` and
:file:`doc/extra`, contains a Sphinx-generated Makefile and configuration
script :file:`conf.py` used to set various document parameters. The makefile
can be used for a variety of targets; invoke `make help` in any of these
directories for a listing of available output formats. For convenience, there
is a top-level :file:`Makefile.am` that has targets for PDF and HTML
documentation for both developer and user documentation, respectively. That
makefile is also responsible for building manual pages packed with distribution
builds.
Indent and styling should follow existing conventions:
@ -890,6 +896,15 @@ your implementation of a new BGP draft should go in the BGP chapter instead of
being its own chapter. If you are adding a new protocol daemon, please create a
new chapter.
FRR Specific Markup
-------------------
FRR has some customizations applied to the Sphinx markup that go a long way
towards making documentation easier to use, write and maintain.
CLI Commands
^^^^^^^^^^^^
When documenting CLI please use a combination of the ``.. index::`` and
``.. clicmd::`` directives. For example, the command :clicmd:`show pony` would
be documented as follows:
@ -923,6 +938,29 @@ When documented this way, CLI commands can be cross referenced with the
This is very helpful for users who want to quickly remind themselves what a
particular command does.
Configuration Snippets
^^^^^^^^^^^^^^^^^^^^^^
When putting blocks of example configuration please use the
``.. code-block::`` directive and specify ``frr`` as the highlighting language,
as in the following example. This will tell Sphinx to use a custom Pygments
lexer to highlight FRR configuration syntax.
.. code-block:: rest
.. code-block:: frr
!
! Example configuration file.
!
log file /tmp/log.log
service integrated-vtysh-config
!
ip route 1.2.3.0/24 reject
ipv6 route de:ea:db:ee:ff::/64 reject
!
.. _GitHub: https://github.com/frrouting/frr
.. _GitHub issues: https://github.com/frrouting/frr/issues

38
doc/extra/frrlexer.py Normal file
View File

@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Vincent Bernat <bernat@luffy.cx>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from pygments.lexer import RegexLexer, bygroups
from pygments.token import Text, Comment, Keyword
from pygments.token import String, Number, Name
class FRRLexer(RegexLexer):
name = "frr"
aliases = ["frr"]
tokens = {
'root': [
(r'^[ \t]*!.*?\n', Comment.Singleline),
(r'"(\\\\|\\"|[^"])*"', String.Double),
(r'[a-f0-9]*:[a-f0-9]*:[a-f0-9:]*(:\d+\.\d+\.\d+\.\d+)?(/\d+)?',
Number), # IPv6
(r'\d+\.\d+\.\d+\.\d+(/\d+)?', Number), # IPv4
(r'^([ \t]*)(no[ \t]+)?([-\w]+)',
bygroups(Text, Keyword, Name.Function)),
(r'[ \t]+', Text),
(r'\n', Text),
(r'\d+', Number),
(r'\S+', Text),
],
}

View File

@ -51,7 +51,7 @@ master_doc = 'index'
# General information about the project.
project = u'FRR'
copyright = u'2017, FRR'
author = u'Kunihiro Ishiguro, et al.'
author = u'FRR authors'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@ -67,24 +67,24 @@ release = u'?.?-?'
# Extract values from codebase for substitution into docs.
# -----------------------------------------------------------------------------
# Various installation prefixes. Reasonable defaults are set where possible.
# Values are overridden by logic below.
# Various installation prefixes. Values are extracted from config.status.
# Reasonable defaults are set in case that file does not exist.
replace_vars = {
'AUTHORS': author,
'COPYRIGHT_YEAR': '1999-2005',
'COPYRIGHT_STR': None,
'COPYRIGHT_STR': 'Copyright (c) 1999-2005',
'PACKAGE_NAME': project.lower(),
'PACKAGE_TARNAME': project.lower(),
'PACKAGE_STRING': None,
'PACKAGE_STRING': project.lower() + ' latest',
'PACKAGE_URL': 'https://frrouting.org/',
'PACKAGE_VERSION': None,
'INSTALL_PREFIX_ETC': None,
'INSTALL_PREFIX_SBIN': None,
'INSTALL_PREFIX_STATE': None,
'INSTALL_PREFIX_MODULES': None,
'INSTALL_USER': None,
'INSTALL_GROUP': None,
'INSTALL_VTY_GROUP': None,
'PACKAGE_VERSION': 'latest',
'INSTALL_PREFIX_ETC': '/etc/frr',
'INSTALL_PREFIX_SBIN': '/usr/lib/frr',
'INSTALL_PREFIX_STATE': '/var/run/frr',
'INSTALL_PREFIX_MODULES': '/usr/lib/frr/modules',
'INSTALL_USER': 'frr',
'INSTALL_GROUP': 'frr',
'INSTALL_VTY_GROUP': 'frrvty',
'GROUP': 'frr',
'USER': 'frr',
}
@ -92,11 +92,15 @@ replace_vars = {
# extract version information, installation location, other stuff we need to
# use when building final documents
val = re.compile('^S\["([^"]+)"\]="(.*)"$')
with open('../../config.status', 'r') as cfgstatus:
try:
with open('../../config.status', 'r') as cfgstatus:
for ln in cfgstatus.readlines():
m = val.match(ln)
if not m or m.group(1) not in replace_vars.keys(): continue
replace_vars[m.group(1)] = m.group(2)
except IOError:
# if config.status doesn't exist, just ignore it
pass
# manually fill out some of these we can't get from config.status
replace_vars['COPYRIGHT_STR'] = "Copyright (c)"

View File

@ -2,3 +2,7 @@
div.body {
max-width: none;
}
pre {
background-color: #e2e2e2;
}

View File

@ -42,7 +42,7 @@ Config files are generally found in |INSTALL_PREFIX_ETC|.
Each of the daemons has its own config file. The daemon name plus ``.conf`` is
the default config file name. For example, zebra's default config file name is
:file:`zebra.conf`. You can specify a config file using the :option:`-f` or
:option:`--config-file` options when starting the daemon.
:option:`--config_file` options when starting the daemon.
.. _basic-config-commands:
@ -261,7 +261,7 @@ Sample Config File
Below is a sample configuration file for the zebra daemon.
::
.. code-block:: frr
!
! Zebra configuration file
@ -279,7 +279,7 @@ Below is a sample configuration file for the zebra daemon.
is one of the comment characters then from the rest of the line forward
will be ignored as a comment.
::
.. code-block:: frr
password zebra!password
@ -358,13 +358,11 @@ Common Invocation Options
These options apply to all |PACKAGE_NAME| daemons.
.. option:: -d
.. option:: --daemon
.. option:: -d, --daemon
Run in daemon mode.
.. option:: -f <file>
.. option:: --config-file <file>
.. option:: -f, --config_file <file>
Set configuration file name.
@ -372,8 +370,7 @@ These options apply to all |PACKAGE_NAME| daemons.
Display this help and exit.
.. option:: -i <file>
.. option:: --pid-file <file>
.. option:: -i, --pid_file <file>
Upon startup the process identifier of the daemon is written to a file,
typically in :file:`/var/run`. This file can be used by the init system
@ -386,25 +383,21 @@ These options apply to all |PACKAGE_NAME| daemons.
machine can be used to collect differing routing views from differing
points in the network.
.. option:: -A <address>
.. option:: --vty-addr <address>
.. option:: -A, --vty_addr <address>
Set the VTY local address to bind to. If set, the VTY socket will only
be bound to this address.
.. option:: -P <port>
.. option:: --vty-port <port>
.. option:: -P, --vty_port <port>
Set the VTY TCP port number. If set to 0 then the TCP VTY sockets will not
be opened.
.. option:: -u <user>
.. option:: --vty_addr <user>
Set the user and group to run as.
.. option:: -v
.. option:: --version
.. option:: -v, --version
Print program version.
@ -418,8 +411,7 @@ unloading modules at runtime is not supported (yet). To load a module, use
the following command line option at daemon startup:
.. option:: -M <module:options>
.. option:: --module <module:options>
.. option:: -M, --module <module:options>
Load the specified module, optionally passing options to it. If the module
name contains a slash (/), it is assumed to be a full pathname to a file to
@ -636,7 +628,7 @@ insta-help, and VTY session management.
:kbd:`?`
You can use command line help by typing `help` at the beginning of
the line. Typing :kbd:`?` at any point in the line will show possible
You can use command line help by typing ``help`` at the beginning of the
line. Typing :kbd:`?` at any point in the line will show possible
completions.

View File

@ -26,19 +26,16 @@ be specified (:ref:`common-invocation-options`).
.. program:: bgpd
.. option:: -p <port>
.. option:: --bgp_port <port>
.. option:: -p, --bgp_port <port>
Set the bgp protocol's port number. When port number is 0, that means do not
listen bgp port.
.. option:: -r
.. option:: --retain
.. option:: -r, --retain
When program terminates, retain BGP routes added by zebra.
.. option:: -l
.. option:: --listenon
.. option:: -l, --listenon
Specify a specific IP address for bgpd to listen on, rather than its
default of INADDR_ANY / IN6ADDR_ANY. This can be useful to constrain bgpd
@ -473,7 +470,9 @@ BGP route
.. index:: network A.B.C.D/M
.. clicmd:: network A.B.C.D/M
This command adds the announcement network.::
This command adds the announcement network.
.. code-block:: frr
router bgp 1
address-family ipv4 unicast
@ -606,7 +605,9 @@ Defining Peer
.. clicmd:: neighbor PEER remote-as ASN
Creates a new neighbor whose remote-as is ASN. PEER can be an IPv4 address
or an IPv6 address or an interface to use for the connection.::
or an IPv6 address or an interface to use for the connection.
.. code-block:: frr
router bgp 1
neighbor 10.0.0.1 remote-as 2
@ -614,7 +615,7 @@ Defining Peer
In this case my router, in AS-1, is trying to peer with AS-2 at 10.0.0.1.
This command must be the first command used when configuring a neighbor. If
the remote-as is not specified, *bgpd* will complain like this:::
the remote-as is not specified, *bgpd* will complain like this: ::
can't find neighbor 10.0.0.1
@ -714,7 +715,9 @@ required.
Specify the IPv4 source address to use for the :abbr:`BGP` session to this
neighbour, may be specified as either an IPv4 address directly or as an
interface name (in which case the *zebra* daemon MUST be running in order
for *bgpd* to be able to retrieve interface state).::
for *bgpd* to be able to retrieve interface state).
.. code-block:: frr
router bgp 64555
neighbor foo update-source 192.168.0.1
@ -1190,7 +1193,10 @@ Following configuration is the most typical usage of BGP communities
attribute. AS 7675 provides upstream Internet connection to AS 100.
When following configuration exists in AS 7675, AS 100 networks
operator can set local preference in AS 7675 network by setting BGP
communities attribute to the updates.::
communities attribute to the updates.
.. code-block:: frr
router bgp 7675
neighbor 192.168.0.1 remote-as 100
@ -1221,7 +1227,9 @@ communities attribute to the updates.::
Following configuration announce 10.0.0.0/8 from AS 100 to AS 7675.
The route has communities value 7675:80 so when above configuration
exists in AS 7675, announced route's local preference will be set to
value 80.::
value 80.
.. code-block:: frr
router bgp 100
network 10.0.0.0/8
@ -1241,7 +1249,9 @@ Following configuration is an example of BGP route filtering using
communities attribute. This configuration only permit BGP routes
which has BGP communities value 0:80 or 0:90. Network operator can
put special internal communities value at BGP border router, then
limit the BGP routes announcement into the internal network.::
limit the BGP routes announcement into the internal network.
.. code-block:: frr
router bgp 7675
neighbor 192.168.0.1 remote-as 100
@ -1257,7 +1267,9 @@ limit the BGP routes announcement into the internal network.::
Following exmaple filter BGP routes which has communities value 1:1.
When there is no match community-list returns deny. To avoid
filtering all of routes, we need to define permit any at last.::
filtering all of routes, we need to define permit any at last.
.. code-block:: frr
router bgp 7675
neighbor 192.168.0.1 remote-as 100
@ -1276,7 +1288,9 @@ Communities value keyword `internet` has special meanings in
standard community lists. In below example `internet` act as
match any. It matches all of BGP routes even if the route does not
have communities attribute at all. So community list ``INTERNET``
is same as above example's ``FILTER``.::
is same as above example's ``FILTER``.
.. code-block:: frr
ip community-list standard INTERNET deny 1:1
ip community-list standard INTERNET permit internet
@ -1285,7 +1299,9 @@ is same as above example's ``FILTER``.::
Following configuration is an example of communities value deletion.
With this configuration communities value 100:1 and 100:2 is removed
from BGP updates. For communities value deletion, only `permit`
community-list is used. `deny` community-list is ignored.::
community-list is used. `deny` community-list is ignored.
.. code-block:: frr
router bgp 7675
neighbor 192.168.0.1 remote-as 100
@ -1382,9 +1398,7 @@ Lists.
.. clicmd:: show ip extcommunity-list NAME
This command displays current extcommunity-list information. When `name` is
specified the community list's information is shown.
::
specified the community list's information is shown.::
# show ip extcommunity-list
@ -1933,7 +1947,9 @@ neighbor. If a user manually disables the feature, the community attribute is
not sent to the neighbor. When ``bgp config-type cisco`` is specified, the
community attribute is not sent to the neighbor by default. To send the
community attribute user has to specify *neighbor A.B.C.D send-community*
command.::
command.
.. code-block:: frr
!
router bgp 1
@ -1969,7 +1985,7 @@ multiple instance feature is enabled.
Make a new BGP instance. You can use an arbitrary word for the `name`.
::
.. code-block:: frr
bgp multiple-instance
!
@ -1994,7 +2010,7 @@ routing information.
With this command, you can setup Route Server like below.
::
.. code-block:: frr
bgp multiple-instance
!
@ -2013,7 +2029,9 @@ Routing policy
--------------
You can set different routing policy for a peer. For example, you can set
different filter for a peer.::
different filter for a peer.
.. code-block:: frr
bgp multiple-instance
!
@ -2087,10 +2105,10 @@ _
How to set up a 6-Bone connection
=================================
::
.. code-block:: frr
bgpd configuration
==================
! bgpd configuration
! ==================
!
! MP-BGP configuration
!
@ -2174,7 +2192,9 @@ Dump BGP packets and table
BGP Configuration Examples
==========================
Example of a session to an upstream, advertising only one prefix to it.::
Example of a session to an upstream, advertising only one prefix to it.
.. code-block:: frr
router bgp 64512
bgp router-id 10.236.87.1
@ -2199,7 +2219,7 @@ feature to support selective advertising of prefixes. This example is intended
as guidance only, it has NOT been tested and almost certainly containts silly
mistakes, if not serious flaws.
::
.. code-block:: frr
router bgp 64512
bgp router-id 10.236.87.1

View File

@ -15,6 +15,8 @@
import sys
import os
import re
import pygments
from sphinx.highlighting import lexers
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@ -51,7 +53,7 @@ master_doc = 'index'
# General information about the project.
project = u'FRR'
copyright = u'2017, FRR'
author = u'FRR'
author = u'FRR authors'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@ -67,34 +69,40 @@ release = u'?.?-?'
# Extract values from codebase for substitution into docs.
# -----------------------------------------------------------------------------
# Various installation prefixes. Reasonable defaults are set where possible.
# Values are overridden by logic below.
# Various installation prefixes. Values are extracted from config.status.
# Reasonable defaults are set in case that file does not exist.
replace_vars = {
'AUTHORS': 'Kunihiro Ishiguro, et al.',
'AUTHORS': author,
'COPYRIGHT_YEAR': '1999-2005',
'COPYRIGHT_STR': None,
'COPYRIGHT_STR': 'Copyright (c) 1999-2005',
'PACKAGE_NAME': project.lower(),
'PACKAGE_TARNAME': project.lower(),
'PACKAGE_STRING': None,
'PACKAGE_STRING': project.lower() + ' latest',
'PACKAGE_URL': 'https://frrouting.org/',
'PACKAGE_VERSION': None,
'INSTALL_PREFIX_ETC': None,
'INSTALL_PREFIX_SBIN': None,
'INSTALL_PREFIX_STATE': None,
'INSTALL_PREFIX_MODULES': None,
'INSTALL_USER': None,
'INSTALL_GROUP': None,
'INSTALL_VTY_GROUP': None,
'PACKAGE_VERSION': 'latest',
'INSTALL_PREFIX_ETC': '/etc/frr',
'INSTALL_PREFIX_SBIN': '/usr/lib/frr',
'INSTALL_PREFIX_STATE': '/var/run/frr',
'INSTALL_PREFIX_MODULES': '/usr/lib/frr/modules',
'INSTALL_USER': 'frr',
'INSTALL_GROUP': 'frr',
'INSTALL_VTY_GROUP': 'frrvty',
'GROUP': 'frr',
'USER': 'frr',
}
# extract version information, installation location, other stuff we need to
# use when building final documents
val = re.compile('^S\["([^"]+)"\]="(.*)"$')
with open('../../config.status', 'r') as cfgstatus:
try:
with open('../../config.status', 'r') as cfgstatus:
for ln in cfgstatus.readlines():
m = val.match(ln)
if not m or m.group(1) not in replace_vars.keys(): continue
replace_vars[m.group(1)] = m.group(2)
except IOError:
# if config.status doesn't exist, just ignore it
pass
# manually fill out some of these we can't get from config.status
replace_vars['COPYRIGHT_STR'] = "Copyright (c)"
@ -341,3 +349,13 @@ def setup(app):
app.add_object_type('clicmd', 'clicmd')
# css overrides for HTML theme
app.add_stylesheet('overrides.css')
# load Pygments lexer for FRR config syntax
#
# NB: in Pygments 2.2+ this can be done with `load_lexer_from_file`, but we
# do it manually since not all of our supported build platforms have 2.2
# yet.
#
# frrlexer = pygments.lexers.load_lexer_from_file('../extra/frrlexer.py', lexername="FRRLexer")
custom_namespace = {}
exec(open('../extra/frrlexer.py', 'rb').read(), custom_namespace)
lexers['frr'] = custom_namespace['FRRLexer']()

View File

@ -60,8 +60,7 @@ Certain signals have special meanings to *eigrpd*.
.. program:: eigrpd
.. option:: -r
.. option:: --retain
.. option:: -r, --retain
When the program terminates, retain routes added by *eigrpd*.
@ -100,7 +99,7 @@ EIGRP Configuration
Below is very simple EIGRP configuration. Interface `eth0` and
interface which address match to `10.0.0.0/8` are EIGRP enabled.
::
.. code-block:: frr
!
router eigrp 1

View File

@ -18,7 +18,7 @@ IP Access List
Basic filtering is done by `access-list` as shown in the
following example.
::
.. code-block:: frr
access-list filter deny 10.0.0.0/9
access-list filter permit 10.0.0.0/8

View File

@ -559,7 +559,9 @@ Debugging ISIS
ISIS Configuration Examples
===========================
A simple example, with MD5 authentication enabled:::
A simple example, with MD5 authentication enabled:
.. code-block:: frr
!
interface eth0
@ -575,7 +577,9 @@ A simple example, with MD5 authentication enabled:::
A Traffic Engineering configuration, with Inter-ASv2 support.
First, the 'zebra.conf' part:::
First, the :file:`zebra.conf` part:
.. code-block:: frr
hostname HOSTNAME
password PASSWORD
@ -614,7 +618,9 @@ First, the 'zebra.conf' part:::
neighbor 10.1.1.2 as 65000
Then the 'isisd.conf' itself:::
Then the :file:`isisd.conf` itself:
.. code-block:: frr
hostname HOSTNAME
password PASSWORD

View File

@ -52,7 +52,9 @@ hub nodes, these routes should be internally redistributed using some
routing protocol (e.g. iBGP) to allow hubs to be able to relay all traffic.
This can be achieved in hubs with the following bgp configuration (network
command defines the GRE subnet):::
command defines the GRE subnet):
.. code-block:: frr
router bgp 65555
address-family ipv4 unicast
@ -82,7 +84,7 @@ using NFLOG. Typically you want to send Traffic Indications for network
traffic that is routed from gre1 back to gre1 in rate limited manner.
This can be achieved with the following iptables rule.
::
.. code-block:: shell
iptables -A FORWARD -i gre1 -o gre1 \\
-m hashlimit --hashlimit-upto 4/minute --hashlimit-burst 1 \\
@ -95,16 +97,21 @@ announce internal, add additional IP range matches, or rate limitation
if needed. However, the above should be good in most cases.
This kernel NFLOG target's nflog-group is configured in global nhrp config
with:::
with:
.. code-block:: frr
nhrp nflog-group 1
To start sending these traffic notices out from hubs, use the nhrp
per-interface directive:::
per-interface directive:
.. code-block:: frr
interface gre1
ip nhrp redirect
.. _integration-with-ike:
Integration with IKE

View File

@ -49,7 +49,9 @@ OSPF6 router
will cause the holdtime to be increased by `initial-holdtime`, bounded
by the `maximum-holdtime` configured with this command. If the adaptive
hold-time elapses without any SPF-triggering event occuring then
the current holdtime is reset to the `initial-holdtime`.::
the current holdtime is reset to the `initial-holdtime`.
.. code-block:: frr
router ospf6
timers throttle spf 200 400 10000
@ -187,7 +189,7 @@ OSPF6 Configuration Examples
Example of ospf6d configured on one interface and area:
::
.. code-block:: frr
interface eth0
ipv6 ospf6 instance-id 0

View File

@ -163,7 +163,7 @@ writing, *ospfd* does not support multiple OSPF processes.
holdtime can be viewed with :clicmd:`show ip ospf`, where it is expressed as
a multiplier of the `initial-holdtime`.
::
.. code-block:: frr
router ospf
timers throttle spf 200 400 10000
@ -249,12 +249,11 @@ writing, *ospfd* does not support multiple OSPF processes.
on this interface so router can provide network information to the other
ospf routers via this interface.
::
.. code-block:: frr
router ospf
network 192.168.1.0/24 area 0.0.0.0
Prefix length in interface must be equal or bigger (ie. smaller network) than
prefix length in network statement. For example statement above doesn't enable
ospf on interface with address 192.168.1.1/23, but it does on interface with
@ -294,7 +293,7 @@ OSPF area
be summarized. Type-5 AS-external-LSAs can't be summarized - their scope is AS.
Summarizing Type-7 AS-external-LSAs isn't supported yet by FRR.
::
.. code-block:: frr
router ospf
network 192.168.1.0/24 area 0.0.0.0
@ -324,7 +323,7 @@ OSPF area
Substitute summarized prefix with another prefix.
::
.. code-block:: frr
router ospf
network 192.168.1.0/24 area 0.0.0.0
@ -421,7 +420,7 @@ OSPF area
Filter Type-3 summary-LSAs announced to other areas originated from intra-
area paths from specified area.
::
.. code-block:: frr
router ospf
network 192.168.1.0/24 area 0.0.0.0
@ -431,7 +430,6 @@ OSPF area
access-list foo permit 10.10.0.0/16
access-list foo deny any
With example above any intra-area paths from area 0.0.0.10 and from range
10.10.0.0/16 (for example 10.10.1.0/24 and 10.10.2.128/30) are announced into
other areas as Type-3 summary-LSA's, but any others (for example 10.11.0.0/16
@ -452,8 +450,8 @@ OSPF area
.. index:: no area (0-4294967295) import-list NAME
.. clicmd:: no area (0-4294967295) import-list NAME
Same as export-list, but it applies to paths announced into specified area as
Type-3 summary-LSAs.
Same as export-list, but it applies to paths announced into specified area
as Type-3 summary-LSAs.
.. index:: area A.B.C.D filter-list prefix NAME in
.. clicmd:: area A.B.C.D filter-list prefix NAME in
@ -568,12 +566,11 @@ OSPF interface
Set OSPF authentication key to a cryptographic password. The cryptographic
algorithm is MD5.
KEYID identifies secret key used to create the message digest. This ID
is part of the protocol and must be consistent across routers on a
link.
KEYID identifies secret key used to create the message digest. This ID is
part of the protocol and must be consistent across routers on a link.
KEY is the actual message digest key, of up to 16 chars (larger strings
will be truncated), and is associated with the given KEYID.
KEY is the actual message digest key, of up to 16 chars (larger strings will
be truncated), and is associated with the given KEYID.
.. index:: ip ospf cost (1-65535)
.. clicmd:: ip ospf cost (1-65535)
@ -581,8 +578,8 @@ OSPF interface
.. index:: no ip ospf cost
.. clicmd:: no ip ospf cost
Set link cost for the specified interface. The cost value is set to router-LSA's
metric field and used for SPF calculation.
Set link cost for the specified interface. The cost value is set to
router-LSA's metric field and used for SPF calculation.
.. index:: ip ospf dead-interval (1-65535)
.. clicmd:: ip ospf dead-interval (1-65535)
@ -635,10 +632,9 @@ OSPF interface
.. index:: no ip ospf priority
.. clicmd:: no ip ospf priority
Set RouterPriority integer value. The router with the highest priority
will be more eligible to become Designated Router. Setting the value
to 0, makes the router ineligible to become Designated Router. The
default value is 1.
Set RouterPriority integer value. The router with the highest priority will
be more eligible to become Designated Router. Setting the value to 0, makes
the router ineligible to become Designated Router. The default value is 1.
.. index:: ip ospf retransmit-interval (1-65535)
.. clicmd:: ip ospf retransmit-interval (1-65535)
@ -646,9 +642,9 @@ OSPF interface
.. index:: no ip ospf retransmit interval
.. clicmd:: no ip ospf retransmit interval
Set number of seconds for RxmtInterval timer value. This value is used
when retransmitting Database Description and Link State Request packets.
The default value is 5 seconds.
Set number of seconds for RxmtInterval timer value. This value is used when
retransmitting Database Description and Link State Request packets. The
default value is 5 seconds.
.. index:: ip ospf transmit-delay
.. clicmd:: ip ospf transmit-delay
@ -657,8 +653,7 @@ OSPF interface
.. clicmd:: no ip ospf transmit-delay
Set number of seconds for InfTransDelay value. LSAs' age should be
incremented by this value when transmitting.
The default value is 1 seconds.
incremented by this value when transmitting. The default value is 1 second.
.. index:: ip ospf area (A.B.C.D|(0-4294967295))
.. clicmd:: ip ospf area (A.B.C.D|(0-4294967295))
@ -702,16 +697,16 @@ Redistribute routes to OSPF
.. _ospf-redistribute:
Redistribute routes of the specified protocol
or kind into OSPF, with the metric type and metric set if specified,
filtering the routes using the given route-map if specified.
Redistributed routes may also be filtered with distribute-lists, see
Redistribute routes of the specified protocol or kind into OSPF, with the
metric type and metric set if specified, filtering the routes using the
given route-map if specified. Redistributed routes may also be filtered
with distribute-lists, see
:ref:`ospf distribute-list configuration <ospf-distribute-list>`.
Redistributed routes are distributed as into OSPF as Type-5 External
LSAs into links to areas that accept external routes, Type-7 External LSAs
for NSSA areas and are not redistributed at all into Stub areas, where
external routes are not permitted.
Redistributed routes are distributed as into OSPF as Type-5 External LSAs
into links to areas that accept external routes, Type-7 External LSAs for
NSSA areas and are not redistributed at all into Stub areas, where external
routes are not permitted.
Note that for connected routes, one may instead use the `passive-interface`
configuration.
@ -747,10 +742,10 @@ Redistribute routes to OSPF
.. index:: no default-information originate
.. clicmd:: no default-information originate
Originate an AS-External (type-5) LSA describing a default route into
all external-routing capable areas, of the specified metric and metric
type. If the 'always' keyword is given then the default is always
advertised, even when there is no default present in the routing table.
Originate an AS-External (type-5) LSA describing a default route into all
external-routing capable areas, of the specified metric and metric type. If
the 'always' keyword is given then the default is always advertised, even
when there is no default present in the routing table.
.. index:: distribute-list NAME out (kernel|connected|static|rip|ospf
.. clicmd:: distribute-list NAME out (kernel|connected|static|rip|ospf
@ -760,9 +755,9 @@ Redistribute routes to OSPF
.. _ospf-distribute-list:
Apply the access-list filter, NAME, to
redistributed routes of the given type before allowing the routes to
redistributed into OSPF (:ref:`ospf redistribution <ospf-redistribute>`).
Apply the access-list filter, NAME, to redistributed routes of the given
type before allowing the routes to redistributed into OSPF
(:ref:`ospf redistribution <ospf-redistribute>`).
.. index:: default-metric (0-16777214)
.. clicmd:: default-metric (0-16777214)
@ -850,7 +845,8 @@ Showing OSPF information
.. index:: show ip ospf route
.. clicmd:: show ip ospf route
Show the OSPF routing table, as determined by the most recent SPF calculation.
Show the OSPF routing table, as determined by the most recent SPF
calculation.
.. _opaque-lsa:
@ -869,9 +865,9 @@ Opaque LSA
.. index:: no capability opaque
.. clicmd:: no capability opaque
*ospfd* support Opaque LSA (RFC2370) as fondment for MPLS Traffic Engineering
LSA. Prior to used MPLS TE, opaque-lsa must be enable in the configuration
file. Alternate command could be "mpls-te on"
*ospfd* support Opaque LSA (:rfc:`2370`) as fondment for MPLS Traffic
Engineering LSA. Prior to used MPLS TE, opaque-lsa must be enable in the
configuration file. Alternate command could be "mpls-te on"
(:ref:`ospf-traffic-engineering`).
.. index:: show ip ospf database (opaque-link|opaque-area|opaque-external)
@ -982,17 +978,18 @@ Router Information
.. clicmd:: no pce scope
The commands are conform to :rfc:`5088` and allow OSPF router announce Path
Compuatation Elemenent (PCE) capabilities through the Router Information (RI)
LSA. Router Information must be enable prior to this. The command set/unset
respectively the PCE IP adress, Autonomous System (AS) numbers of controlled
domains, neighbor ASs, flag and scope. For flag and scope, please refer to
:rfc`5088` for the BITPATTERN recognition. Multiple 'pce neighbor' command
could be specified in order to specify all PCE neighbours.
Compuatation Elemenent (PCE) capabilities through the Router Information
(RI) LSA. Router Information must be enable prior to this. The command
set/unset respectively the PCE IP adress, Autonomous System (AS) numbers of
controlled domains, neighbor ASs, flag and scope. For flag and scope, please
refer to :rfc`5088` for the BITPATTERN recognition. Multiple 'pce neighbor'
command could be specified in order to specify all PCE neighbours.
.. index:: show ip ospf router-info
.. clicmd:: show ip ospf router-info
Show Router Capabilities flag.
.. index:: show ip ospf router-info pce
.. clicmd:: show ip ospf router-info pce
@ -1028,10 +1025,10 @@ This is an EXPERIMENTAL support of Segment Routing as per draft
.. index:: [no] segment-routing prefix A.B.C.D/M index (0-65535) [no-php-flag]
.. clicmd:: [no] segment-routing prefix A.B.C.D/M index (0-65535) [no-php-flag]
Set the Segment Rounting index for the specifyed prefix. Note
that, only prefix with /32 corresponding to a loopback interface are
currently supported. The 'no-php-flag' means NO Penultimate Hop Popping that
allows SR node to request to its neighbor to not pop the label.
Set the Segment Rounting index for the specifyed prefix. Note that, only
prefix with /32 corresponding to a loopback interface are currently
supported. The 'no-php-flag' means NO Penultimate Hop Popping that allows SR
node to request to its neighbor to not pop the label.
.. index:: show ip ospf database segment-routing <adv-router ADVROUTER|self-originate> [json]
.. clicmd:: show ip ospf database segment-routing <adv-router ADVROUTER|self-originate> [json]
@ -1140,7 +1137,7 @@ OSPF Configuration Examples
A simple example, with MD5 authentication enabled:
::
.. code-block:: frr
!
interface bge0
@ -1155,7 +1152,7 @@ A simple example, with MD5 authentication enabled:
An :abbr:`ABR` router, with MD5 authentication and performing summarisation
of networks between the areas:
::
.. code-block:: frr
!
password ABCDEF
@ -1189,7 +1186,9 @@ of networks between the areas:
A Traffic Engineering configuration, with Inter-ASv2 support.
First, the 'zebra.conf' part:::
First, the :file:`zebra.conf` part:
.. code-block:: frr
interface eth0
ip address 198.168.1.1/24
@ -1262,7 +1261,9 @@ First, the 'zebra.conf' part:::
unrsv-bw 7 1.25e+06
neighbor 192.168.2.2 as 65000
Then the 'ospfd.conf' itself:::
Then the :file:`ospfd.conf` itself:
.. code-block:: frr
hostname HOSTNAME
password PASSWORD
@ -1288,8 +1289,9 @@ Then the 'ospfd.conf' itself:::
!
line vty
A router information example with PCE advsertisement:
A router information example with PCE advsertisement:::
.. code-block:: frr
!
router ospf

View File

@ -214,8 +214,8 @@ is in a vrf, enter the interface command with the vrf keyword at the end.
.. _pim-multicast-rib-insertion:
PIM Multicast RIB insertion::
=============================
PIM Multicast RIB insertion:
============================
In order to influence Multicast RPF lookup, it is possible to insert
into zebra routes for the Multicast RIB. These routes are only

View File

@ -60,8 +60,7 @@ Certain signals have special meaningss to *ripd*.
*ripd* invocation options. Common options that can be specified
(:ref:`common-invocation-options`).
.. option:: -r
.. option:: --retain
.. option:: -r, --retain
When the program terminates, retain routes added by *ripd*.
@ -147,7 +146,7 @@ RIP Configuration
Below is very simple RIP configuration. Interface `eth0` and interface which
address match to `10.0.0.0/8` are RIP enabled.
::
.. code-block:: frr
!
router rip
@ -355,7 +354,7 @@ RIP routes can be filtered by a distribute-list.
the distribute-list command. For example, in the following configuration
``eth0`` will permit only the paths that match the route 10.0.0.0/8
::
.. code-block:: frr
!
router rip
@ -447,7 +446,7 @@ Usage of *ripd*'s route-map support.
Optional argument route-map MAP_NAME can be added to each `redistribute`
statement.
::
.. code-block:: frr
redistribute static [route-map MAP_NAME]
redistribute connected [route-map MAP_NAME]
@ -573,7 +572,7 @@ To prevent such unauthenticated querying of routes disable RIPv1,
Specifiy Keyed MD5 chain.
::
.. code-block:: frr
!
key chain test

View File

@ -302,7 +302,7 @@ Route Map Examples
A simple example of a route-map:
::
.. code-block:: frr
route-map test permit 10
match ip address 10

View File

@ -246,7 +246,7 @@ against the other two routers. These peerings have In and Out route-maps
configured, named like 'PEER-X-IN' or 'PEER-X-OUT'. For example the
configuration file for router RA could be the following:
::
.. code-block:: frr
#Configuration for router 'RA'
!
@ -319,7 +319,7 @@ modify the configuration of routers RA, RB and RC. Now they must not peer
between them, but only with the route server. For example, RA's
configuration would turn into:
::
.. code-block:: frr
# Configuration for router 'RA'
!
@ -362,7 +362,7 @@ server.
This is a fragment of the route server configuration (we only show
the policies for client RA):
::
.. code-block:: frr
# Configuration for Route Server ('RS')
!
@ -487,7 +487,7 @@ any limitation, as all kinds of filters can be included in import/export
route-maps. For example suppose that in the non-route-server scenario peer
RA had the following filters configured for input from peer B:
::
.. code-block:: frr
neighbor 2001:0DB8::B prefix-list LIST-1 in
neighbor 2001:0DB8::B filter-list LIST-2 in
@ -507,7 +507,7 @@ the three filters (the community-list, the prefix-list and the
route-map). That route-map can then be used inside the Import
policy in the route server. Lets see how to do it:
::
.. code-block:: frr
neighbor 2001:0DB8::A route-map RSCLIENT-A-IMPORT import
...

View File

@ -164,7 +164,7 @@ Validating BGP Updates
In the following example, the router prefers valid routes over invalid
prefixes because invalid routes have a lower local preference.
::
.. code-block:: frr
! Allow for invalid routes in route selection process
route bgp 60001
@ -213,7 +213,7 @@ Displaying RPKI
RPKI Configuration Example
--------------------------
::
.. code-block:: frr
hostname bgpd1
password zebra

View File

@ -42,9 +42,7 @@ master SNMP agent (snmpd) and each of the FRR daemons must be configured. In
:file:`/etc/snmp/snmpd.conf`, the ``master agentx`` directive should be added.
In each of the FRR daemons, ``agentx`` command will enable AgentX support.
::
/etc/snmp/snmpd.conf:
:file:`/etc/snmp/snmpd.conf`:
#
# example access restrictions setup
#
@ -57,7 +55,10 @@ In each of the FRR daemons, ``agentx`` command will enable AgentX support.
#
master agentx
/etc/frr/ospfd.conf:
:file:`/etc/frr/ospfd.conf:`
.. code-block:: frr
! ... the rest of ospfd.conf has been omitted for clarity ...
!
agentx
@ -88,7 +89,6 @@ need to configure FRR to use another transport, you can configure it through
::
/etc/snmp/frr.conf:
[snmpd]
# Use a remote master agent
agentXSocket tcp:192.168.15.12:705
@ -112,9 +112,7 @@ In the following example the ospfd daemon will be connected to the snmpd daemon
using the password "frr_ospfd". For testing it is recommending to take exactly
the below snmpd.conf as wrong access restrictions can be hard to debug.
::
/etc/snmp/snmpd.conf:
:file:`/etc/snmp/snmpd.conf`:
#
# example access restrictions setup
#
@ -127,7 +125,7 @@ the below snmpd.conf as wrong access restrictions can be hard to debug.
#
smuxpeer .1.3.6.1.4.1.3317.1.2.5 frr_ospfd
/etc/frr/ospf:
:file:`/etc/frr/ospf`:
! ... the rest of ospfd.conf has been omitted for clarity ...
!
smux peer .1.3.6.1.4.1.3317.1.2.5 frr_ospfd

View File

@ -42,7 +42,7 @@ The snmptrap_handle.sh script I personally use for handling BGP4 traps is
below. You can of course do all sorts of things when handling traps, like sound
a siren, have your display flash, etc., be creative ;).
::
.. code-block:: shell
#!/bin/bash

View File

@ -90,7 +90,7 @@ Default values are overridden by :ref:`vnc-nve-group-configuration`.
Enter VNC configuration mode for specifying VNC default behaviors. Use
`exit-vnc` to leave VNC configuration mode. `vnc defaults` is optional.
::
.. code-block:: frr
vnc defaults
... various VNC defaults
@ -142,7 +142,7 @@ Defaults section.
Enter VNC configuration mode for defining the NVE group `name`.
Use `exit` or `exit-vnc` to exit group configuration mode.
::
.. code-block:: frr
vnc nve-group group1
... configuration commands
@ -315,7 +315,7 @@ L2 Group Configuration.
Enter VNC configuration mode for defining the L2 group `name`.
Use `exit` or `exit-vnc` to exit group configuration mode.
::
.. code-block:: frr
vnc l2-group group1
... configuration commands
@ -851,7 +851,9 @@ Tunnel Encapsulation Attribute.
A three-way full mesh with three NVEs per NVA.
:file:`bgpd.conf` for ``NVA 1`` (192.168.1.100):::
:file:`bgpd.conf` for ``NVA 1`` (192.168.1.100):
.. code-block:: frr
router bgp 64512
@ -883,7 +885,9 @@ Tunnel Encapsulation Attribute.
exit
:file:`bgpd.conf` for ``NVA 2`` (192.168.1.101):::
:file:`bgpd.conf` for ``NVA 2`` (192.168.1.101):
.. code-block:: frr
router bgp 64512
@ -905,7 +909,9 @@ Tunnel Encapsulation Attribute.
exit-vnc
exit
:file:`bgpd.conf` for ``NVA 3`` (192.168.1.102):::
:file:`bgpd.conf` for ``NVA 3`` (192.168.1.102):
.. code-block:: frr
router bgp 64512
@ -959,7 +965,9 @@ registrations exported this way have a next-hop address of the CE behind the
connected (registering) NVE. Exporting VNC routes as IPv4 unicast is enabled
with the ``vnc export`` command below.
The configuration for ``VNC-GW 1`` is shown below.::
The configuration for ``VNC-GW 1`` is shown below.
.. code-block:: frr
router bgp 64512
bgp router-id 192.168.1.101
@ -994,7 +1002,9 @@ have a statement disabling the IPv4 unicast address family. IPv4 unicast is on
by default and this prevents the other VNC-GW and NVAs from learning unicast
routes advertised by the route-reflector clients.
Configuration for ``NVA 2``:::
Configuration for ``NVA 2``:
.. code-block:: frr
router bgp 64512
bgp router-id 192.168.1.104
@ -1077,7 +1087,9 @@ As in the example of :ref:`vnc-mesh-nva-config`, there are two NVE groups. The
7``, and ``NVE 8`` are members of the NVE group ``group1``. The NVEs ``NVE
5``, ``NVE 6``, and ``NVE 9`` are members of the NVE group ``group2``.
:file:`bgpd.conf` for ``BGP Route Reflector 1`` on 192.168.1.100:::
:file:`bgpd.conf` for ``BGP Route Reflector 1`` on 192.168.1.100:
.. code-block:: frr
router bgp 64512
@ -1106,7 +1118,9 @@ As in the example of :ref:`vnc-mesh-nva-config`, there are two NVE groups. The
exit
:file:`bgpd.conf` for ``NVA 2`` on 192.168.1.101:::
:file:`bgpd.conf` for ``NVA 2`` on 192.168.1.101:
.. code-block:: frr
router bgp 64512
@ -1126,7 +1140,9 @@ As in the example of :ref:`vnc-mesh-nva-config`, there are two NVE groups. The
exit-vnc
exit
:file:`bgpd.conf` for ``NVA 2`` on 192.168.1.102:::
:file:`bgpd.conf` for ``NVA 2`` on 192.168.1.102:
.. code-block:: frr
router bgp 64512
@ -1218,7 +1234,9 @@ VNC-relevant configuration is provided.
}
}
:file:`bgpd.conf` for ``NVA 2`` on 192.168.1.101:::
:file:`bgpd.conf` for ``NVA 2`` on 192.168.1.101:
.. code-block:: frr
router bgp 64512
@ -1238,7 +1256,9 @@ VNC-relevant configuration is provided.
exit-vnc
exit
:file:`bgpd.conf` for ``NVA 3`` on 192.168.1.102:::
:file:`bgpd.conf` for ``NVA 3`` on 192.168.1.102:
.. code-block:: frr
router bgp 64512
@ -1277,7 +1297,9 @@ reflector configuration. BGP route reflectors ``BGP Route Reflector 1`` and
FRR-based NVA with redundant route reflectors
:file:`bgpd.conf` for ``Bgpd Route Reflector 1`` on 192.168.1.100:::
:file:`bgpd.conf` for ``Bgpd Route Reflector 1`` on 192.168.1.100:
.. code-block:: frr
router bgp 64512
@ -1304,7 +1326,9 @@ reflector configuration. BGP route reflectors ``BGP Route Reflector 1`` and
exit-address-family
exit
:file:`bgpd.conf` for ``NVA 2`` on 192.168.1.101:::
:file:`bgpd.conf` for ``NVA 2`` on 192.168.1.101:
.. code-block:: frr
router bgp 64512
@ -1326,7 +1350,9 @@ reflector configuration. BGP route reflectors ``BGP Route Reflector 1`` and
exit-vnc
exit
:file:`bgpd.conf` for ``NVA 3`` on 192.168.1.102:::
:file:`bgpd.conf` for ``NVA 3`` on 192.168.1.102:
.. code-block:: frr
router bgp 64512
@ -1417,7 +1443,7 @@ reflector configuration. BGP route reflectors ``BGP Route Reflector 1`` and
}
}
.. [#] The nve-id is carriedin the route distinguisher. It is the second octet
.. [#] The nve-id is carried in the route distinguisher. It is the second octet
of the eight-octet route distinguisher generated for Ethernet / L2
advertisements. The first octet is a constant 0xFF, and the third
through eighth octets are set to the L2

View File

@ -18,19 +18,16 @@ Besides the common invocation options (:ref:`common-invocation-options`), the
.. program:: zebra
.. option:: -b
.. option:: --batch
.. option:: -b, --batch
Runs in batch mode. *zebra* parses configuration file and terminates
immediately.
.. option:: -k
.. option:: --keep_kernel
.. option:: -k, --keep_kernel
When zebra starts up, don't delete old self inserted routes.
.. option:: -r
.. option:: --retain
.. option:: -r, --retain
When program terminates, retain routes added by zebra.
@ -243,7 +240,8 @@ defines static prefix and gateway.
Some example configuration:
::
.. code-block:: frr
ip route 10.0.0.0/8 10.0.0.2
ip route 10.0.0.0/8 ppp0
ip route 10.0.0.0/8 null0
@ -259,7 +257,7 @@ defines static prefix and gateway.
A.B.C.D format, user must define NETMASK value with A.B.C.D
format. GATEWAY is same option as above command.
::
.. code-block:: frr
ip route 10.0.0.0 255.255.255.0 10.0.0.2
ip route 10.0.0.0 255.255.255.0 ppp0
@ -273,9 +271,9 @@ defines static prefix and gateway.
Installs the route with the specified distance.
Multiple nexthop static route
Multiple nexthop static route:
::
.. code-block:: frr
ip route 10.0.0.1/32 10.0.0.2
ip route 10.0.0.1/32 10.0.0.3
@ -297,7 +295,7 @@ nexthops, if the platform supports this.
* is directly connected, eth0
::
.. code-block:: frr
ip route 10.0.0.0/8 10.0.0.2
ip route 10.0.0.0/8 10.0.0.3
@ -376,22 +374,22 @@ unicast topology!
MODE sets the method used to perform RPF lookups. Supported modes:
urib-only
urib-only
Performs the lookup on the Unicast RIB. The Multicast RIB is never used.
mrib-only
mrib-only
Performs the lookup on the Multicast RIB. The Unicast RIB is never used.
mrib-then-urib
mrib-then-urib
Tries to perform the lookup on the Multicast RIB. If any route is found,
that route is used. Otherwise, the Unicast RIB is tried.
lower-distance
lower-distance
Performs a lookup on the Multicast RIB and Unicast RIB each. The result
with the lower administrative distance is used; if they're equal, the
Multicast RIB takes precedence.
longer-prefix
longer-prefix
Performs a lookup on the Multicast RIB and Unicast RIB each. The result
with the longer prefix length is used; if they're equal, the
Multicast RIB takes precedence.
@ -480,7 +478,7 @@ The following creates a prefix-list that matches all addresses, a route-map
that sets the preferred source address, and applies the route-map to all
*rip* routes.
::
.. code-block:: frr
ip prefix-list ANY permit 0.0.0.0/0 le 32
route-map RM1 permit 10