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

View File

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

View File

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

View File

@ -19,7 +19,7 @@ Get FRR, compile it and install it (from Git)
using any packages** using any packages**
Add frr groups and user Add frr groups and user
~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^
:: ::
@ -30,7 +30,7 @@ Add frr groups and user
sudo usermod -a -G frrvty frr sudo usermod -a -G frrvty frr
Download Source, configure and compile it Download Source, configure and compile it
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(You may prefer different options on configure statement. These are just (You may prefer different options on configure statement. These are just
an example.) an example.)
@ -68,7 +68,7 @@ an example.)
sudo make install sudo make install
Create empty FRR configuration files 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 sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
Enable IP & IPv6 forwarding Enable IP & IPv6 forwarding
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the
other settings) other settings)
@ -110,7 +110,7 @@ Troubleshooting
--------------- ---------------
Shared library error Shared library error
~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^
If you try and start any of the frrouting daemons you may see the below 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: 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** using any packages**
Add frr groups and user Add frr groups and user
~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^
:: ::
@ -34,7 +34,7 @@ Add frr groups and user
-c "FRR FRRouting suite" -d /var/run/frr frr -c "FRR FRRouting suite" -d /var/run/frr frr
Download Source, configure and compile it Download Source, configure and compile it
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(You may prefer different options on configure statement. These are just (You may prefer different options on configure statement. These are just
an example.) an example.)
@ -75,7 +75,7 @@ an example.)
sudo make install sudo make install
Create empty FRR configuration files Create empty FRR configuration files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:: ::
@ -99,7 +99,7 @@ Create empty FRR configuration files
sudo chmod 640 /etc/frr/*.conf sudo chmod 640 /etc/frr/*.conf
Install daemon config file Install daemon config file
~~~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^
:: ::
@ -107,13 +107,13 @@ Install daemon config file
sudo chown frr:frr /etc/frr/daemons sudo chown frr:frr /etc/frr/daemons
Edit /etc/frr/daemons as needed to select the required daemons Edit /etc/frr/daemons as needed to select the required daemons
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Look for the section with ``watchfrr_enable=...`` and ``zebra=...`` etc. Look for the section with ``watchfrr_enable=...`` and ``zebra=...`` etc.
Enable the daemons as required by changing the value to ``yes`` Enable the daemons as required by changing the value to ``yes``
Enable IP & IPv6 forwarding (and MPLS) Enable IP & IPv6 forwarding (and MPLS)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Create a new file ``/etc/sysctl.d/90-routing-sysctl.conf`` with the Create a new file ``/etc/sysctl.d/90-routing-sysctl.conf`` with the
following content: (Please make sure to list all interfaces with 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 sudo modprobe mpls-router mpls-iptunnel
Install frr Service and redhat init files 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 sudo install -p -m 755 redhat/frr.init /usr/lib/frr/frr
Enable required frr at startup Enable required frr at startup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:: ::
sudo systemctl enable frr sudo systemctl enable frr
Reboot or start FRR manually Reboot or start FRR manually
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:: ::

View File

@ -34,7 +34,7 @@ Get FRR, compile it and install it (from Git)
using any packages** using any packages**
Add frr group and user Add frr group and user
~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^
:: ::
@ -76,7 +76,7 @@ an example)
sudo gmake install sudo gmake install
Create empty FRR configuration files Create empty FRR configuration files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:: ::
@ -95,7 +95,7 @@ Create empty FRR configuration files
sudo chmod 640 /usr/local/etc/frr/*.conf sudo chmod 640 /usr/local/etc/frr/*.conf
Enable IP & IPv6 forwarding Enable IP & IPv6 forwarding
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Add the following lines to the end of ``/etc/sysctl.conf``: 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** using any packages**
Add frr group and user Add frr group and user
~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^
:: ::
@ -76,7 +76,7 @@ an example)
sudo gmake install sudo gmake install
Create empty FRR configuration files Create empty FRR configuration files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:: ::
@ -95,7 +95,7 @@ Create empty FRR configuration files
sudo chmod 640 /usr/local/etc/frr/*.conf sudo chmod 640 /usr/local/etc/frr/*.conf
Enable IP & IPv6 forwarding Enable IP & IPv6 forwarding
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Add the following lines to the end of ``/etc/sysctl.conf``: 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** using any packages**
Add frr group and user Add frr group and user
~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^
:: ::
@ -89,7 +89,7 @@ an example)
sudo gmake install sudo gmake install
Create empty FRR configuration files Create empty FRR configuration files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:: ::
@ -108,7 +108,7 @@ Create empty FRR configuration files
sudo chmod 640 /usr/local/etc/frr/*.conf sudo chmod 640 /usr/local/etc/frr/*.conf
Enable IP & IPv6 forwarding Enable IP & IPv6 forwarding
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Add the following lines to the end of ``/etc/sysctl.conf``: 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 isisd nhrpd ospfd ospf6d pimd ripd ripngd
Enable the serivce Enable the serivce
~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^
- service frr enable - service frr enable
Start the service Start the service
~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^
- service frr start - service frr start

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -15,6 +15,8 @@
import sys import sys
import os import os
import re import re
import pygments
from sphinx.highlighting import lexers
# If extensions (or modules to document with autodoc) are in another directory, # 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 # 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. # General information about the project.
project = u'FRR' project = u'FRR'
copyright = u'2017, 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 # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |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. # Extract values from codebase for substitution into docs.
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Various installation prefixes. Reasonable defaults are set where possible. # Various installation prefixes. Values are extracted from config.status.
# Values are overridden by logic below. # Reasonable defaults are set in case that file does not exist.
replace_vars = { replace_vars = {
'AUTHORS': 'Kunihiro Ishiguro, et al.', 'AUTHORS': author,
'COPYRIGHT_YEAR': '1999-2005', 'COPYRIGHT_YEAR': '1999-2005',
'COPYRIGHT_STR': None, 'COPYRIGHT_STR': 'Copyright (c) 1999-2005',
'PACKAGE_NAME': project.lower(), 'PACKAGE_NAME': project.lower(),
'PACKAGE_TARNAME': project.lower(), 'PACKAGE_TARNAME': project.lower(),
'PACKAGE_STRING': None, 'PACKAGE_STRING': project.lower() + ' latest',
'PACKAGE_URL': 'https://frrouting.org/', 'PACKAGE_URL': 'https://frrouting.org/',
'PACKAGE_VERSION': None, 'PACKAGE_VERSION': 'latest',
'INSTALL_PREFIX_ETC': None, 'INSTALL_PREFIX_ETC': '/etc/frr',
'INSTALL_PREFIX_SBIN': None, 'INSTALL_PREFIX_SBIN': '/usr/lib/frr',
'INSTALL_PREFIX_STATE': None, 'INSTALL_PREFIX_STATE': '/var/run/frr',
'INSTALL_PREFIX_MODULES': None, 'INSTALL_PREFIX_MODULES': '/usr/lib/frr/modules',
'INSTALL_USER': None, 'INSTALL_USER': 'frr',
'INSTALL_GROUP': None, 'INSTALL_GROUP': 'frr',
'INSTALL_VTY_GROUP': None, 'INSTALL_VTY_GROUP': 'frrvty',
'GROUP': 'frr',
'USER': 'frr',
} }
# extract version information, installation location, other stuff we need to # extract version information, installation location, other stuff we need to
# use when building final documents # use when building final documents
val = re.compile('^S\["([^"]+)"\]="(.*)"$') val = re.compile('^S\["([^"]+)"\]="(.*)"$')
with open('../../config.status', 'r') as cfgstatus: try:
for ln in cfgstatus.readlines(): with open('../../config.status', 'r') as cfgstatus:
m = val.match(ln) for ln in cfgstatus.readlines():
if not m or m.group(1) not in replace_vars.keys(): continue m = val.match(ln)
replace_vars[m.group(1)] = m.group(2) 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 # manually fill out some of these we can't get from config.status
replace_vars['COPYRIGHT_STR'] = "Copyright (c)" replace_vars['COPYRIGHT_STR'] = "Copyright (c)"
@ -341,3 +349,13 @@ def setup(app):
app.add_object_type('clicmd', 'clicmd') app.add_object_type('clicmd', 'clicmd')
# css overrides for HTML theme # css overrides for HTML theme
app.add_stylesheet('overrides.css') 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

@ -12,26 +12,26 @@ the appropriate function signature (parameters) for the hook.
Example: Example:
.. code-block:: c .. code-block:: c
:caption: mydaemon.h :caption: mydaemon.h
#include "hook.h" #include "hook.h"
DECLARE_HOOK(some_update_event, (struct eventinfo *info), (info)) DECLARE_HOOK(some_update_event, (struct eventinfo *info), (info))
.. code-block:: c .. code-block:: c
:caption: mydaemon.c :caption: mydaemon.c
#include "mydaemon.h" #include "mydaemon.h"
DEFINE_HOOK(some_update_event, (struct eventinfo *info), (info)) DEFINE_HOOK(some_update_event, (struct eventinfo *info), (info))
... ...
hook_call(some_update_event, info); hook_call(some_update_event, info);
.. code-block:: c .. code-block:: c
:caption: mymodule.c :caption: mymodule.c
#include "mydaemon.h" #include "mydaemon.h"
static int event_handler(struct eventinfo *info); static int event_handler(struct eventinfo *info);
... ...
hook_register(some_update_event, event_handler); hook_register(some_update_event, event_handler);
Do not use parameter names starting with "hook", these can collide with Do not use parameter names starting with "hook", these can collide with
names used by the hook code itself. names used by the hook code itself.

View File

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

View File

@ -6,37 +6,37 @@ Memtypes
FRR includes wrappers arround ``malloc()`` and ``free()`` that count the number FRR includes wrappers arround ``malloc()`` and ``free()`` that count the number
of objects currently allocated, for each of a defined ``MTYPE``. 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 type must belong to a memory group, this is used just to provide some basic
structure. structure.
Example: Example:
.. code-block:: c .. code-block:: c
:caption: mydaemon.h :caption: mydaemon.h
DECLARE_MGROUP(MYDAEMON) DECLARE_MGROUP(MYDAEMON)
DECLARE_MTYPE(MYNEIGHBOR) DECLARE_MTYPE(MYNEIGHBOR)
.. code-block:: c .. code-block:: c
:caption: mydaemon.c :caption: mydaemon.c
DEFINE_MGROUP( MYDAEMON, "My daemon's memory") DEFINE_MGROUP( MYDAEMON, "My daemon's memory")
DEFINE_MTYPE( MYDAEMON, MYNEIGHBOR, "Neighbor entry") DEFINE_MTYPE( MYDAEMON, MYNEIGHBOR, "Neighbor entry")
DEFINE_MTYPE_STATIC(MYDAEMON, MYNEIGHBORNAME, "Neighbor name") DEFINE_MTYPE_STATIC(MYDAEMON, MYNEIGHBORNAME, "Neighbor name")
struct neigh *neighbor_new(const char *name) struct neigh *neighbor_new(const char *name)
{ {
struct neigh *n = XMALLOC(MYNEIGHBOR, sizeof(*n)); struct neigh *n = XMALLOC(MYNEIGHBOR, sizeof(*n));
n->name = XSTRDUP(MYNEIGHBORNAME, name); n->name = XSTRDUP(MYNEIGHBORNAME, name);
return n; return n;
} }
void neighbor_free(struct neigh *n) void neighbor_free(struct neigh *n)
{ {
XFREE(MYNEIGHBORNAME, n->name); XFREE(MYNEIGHBORNAME, n->name);
XFREE(MYNEIGHBOR, n); XFREE(MYNEIGHBOR, n);
} }
Definition Definition

View File

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

View File

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

View File

@ -668,7 +668,7 @@ AddressSanitizer
instrumentation and run through a series of tests to look for any results. instrumentation and run through a series of tests to look for any results.
Testing your own code with this tool before submission is encouraged. You Testing your own code with this tool before submission is encouraged. You
can enable it by passing:: can enable it by passing::
--enable-address-sanitizer --enable-address-sanitizer
to ``configure``. to ``configure``.
@ -678,7 +678,7 @@ ThreadSanitizer
detecting data races. If you are working on or around multithreaded code, detecting data races. If you are working on or around multithreaded code,
extensive testing with this instrumtation enabled is *highly* recommended. extensive testing with this instrumtation enabled is *highly* recommended.
You can enable it by passing:: You can enable it by passing::
--enable-thread-sanitizer --enable-thread-sanitizer
to ``configure``. to ``configure``.
@ -687,7 +687,7 @@ MemorySanitizer
Similar to AddressSanitizer, this tool provides runtime instrumentation for Similar to AddressSanitizer, this tool provides runtime instrumentation for
detecting use of uninitialized heap memory. Testing your own code with this detecting use of uninitialized heap memory. Testing your own code with this
tool before submission is encouraged. You can enable it by passing:: tool before submission is encouraged. You can enable it by passing::
--enable-memory-sanitizer --enable-memory-sanitizer
to ``configure``. to ``configure``.
@ -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 reading was generated by Sphinx from RST source in
:file:`doc/developer/workflow.rst`. The documentation is structured as follows: :file:`doc/developer/workflow.rst`. The documentation is structured as follows:
+-----------------------+--------------------------------------------------------------+ +-----------------------+-------------------------------------------+
| Directory | Contents | | Directory | Contents |
+=======================+==============================================================+ +=======================+===========================================+
| :file:`doc/user` | User documentation; configuration guides; protocol overviews | | :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/developer` | Developer's documentation; API specs; |
+-----------------------+--------------------------------------------------------------+ | | datastructures; architecture overviews; |
| :file:`doc/manpages` | Source for manpages | | | project management procedure |
+-----------------------+--------------------------------------------------------------+ +-----------------------+-------------------------------------------+
| :file:`doc/figures` | Images and diagrams | | :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 Each of these directories, with the exception of :file:`doc/figures` and
a Sphinx-generated Makefile and configuration script :file:`conf.py` used to :file:`doc/extra`, contains a Sphinx-generated Makefile and configuration
set various document parameters. The makefile can be used for a variety of script :file:`conf.py` used to set various document parameters. The makefile
targets; invoke `make help` in any of these directories for a listing of can be used for a variety of targets; invoke `make help` in any of these
available output formats. For convenience, there is a top-level directories for a listing of available output formats. For convenience, there
:file:`Makefile.am` that has targets for PDF and HTML documentation for both is a top-level :file:`Makefile.am` that has targets for PDF and HTML
developer and user documentation, respectively. That makefile is also documentation for both developer and user documentation, respectively. That
responsible for building manual pages packed with distribution builds. makefile is also responsible for building manual pages packed with distribution
builds.
Indent and styling should follow existing conventions: 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 being its own chapter. If you are adding a new protocol daemon, please create a
new chapter. 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 When documenting CLI please use a combination of the ``.. index::`` and
``.. clicmd::`` directives. For example, the command :clicmd:`show pony` would ``.. clicmd::`` directives. For example, the command :clicmd:`show pony` would
be documented as follows: 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 This is very helpful for users who want to quickly remind themselves what a
particular command does. 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: https://github.com/frrouting/frr
.. _GitHub issues: https://github.com/frrouting/frr/issues .. _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. # General information about the project.
project = u'FRR' project = u'FRR'
copyright = u'2017, 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 # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |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. # Extract values from codebase for substitution into docs.
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Various installation prefixes. Reasonable defaults are set where possible. # Various installation prefixes. Values are extracted from config.status.
# Values are overridden by logic below. # Reasonable defaults are set in case that file does not exist.
replace_vars = { replace_vars = {
'AUTHORS': author, 'AUTHORS': author,
'COPYRIGHT_YEAR': '1999-2005', 'COPYRIGHT_YEAR': '1999-2005',
'COPYRIGHT_STR': None, 'COPYRIGHT_STR': 'Copyright (c) 1999-2005',
'PACKAGE_NAME': project.lower(), 'PACKAGE_NAME': project.lower(),
'PACKAGE_TARNAME': project.lower(), 'PACKAGE_TARNAME': project.lower(),
'PACKAGE_STRING': None, 'PACKAGE_STRING': project.lower() + ' latest',
'PACKAGE_URL': 'https://frrouting.org/', 'PACKAGE_URL': 'https://frrouting.org/',
'PACKAGE_VERSION': None, 'PACKAGE_VERSION': 'latest',
'INSTALL_PREFIX_ETC': None, 'INSTALL_PREFIX_ETC': '/etc/frr',
'INSTALL_PREFIX_SBIN': None, 'INSTALL_PREFIX_SBIN': '/usr/lib/frr',
'INSTALL_PREFIX_STATE': None, 'INSTALL_PREFIX_STATE': '/var/run/frr',
'INSTALL_PREFIX_MODULES': None, 'INSTALL_PREFIX_MODULES': '/usr/lib/frr/modules',
'INSTALL_USER': None, 'INSTALL_USER': 'frr',
'INSTALL_GROUP': None, 'INSTALL_GROUP': 'frr',
'INSTALL_VTY_GROUP': None, 'INSTALL_VTY_GROUP': 'frrvty',
'GROUP': 'frr', 'GROUP': 'frr',
'USER': 'frr', 'USER': 'frr',
} }
@ -92,11 +92,15 @@ replace_vars = {
# extract version information, installation location, other stuff we need to # extract version information, installation location, other stuff we need to
# use when building final documents # use when building final documents
val = re.compile('^S\["([^"]+)"\]="(.*)"$') val = re.compile('^S\["([^"]+)"\]="(.*)"$')
with open('../../config.status', 'r') as cfgstatus: try:
for ln in cfgstatus.readlines(): with open('../../config.status', 'r') as cfgstatus:
m = val.match(ln) for ln in cfgstatus.readlines():
if not m or m.group(1) not in replace_vars.keys(): continue m = val.match(ln)
replace_vars[m.group(1)] = m.group(2) 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 # manually fill out some of these we can't get from config.status
replace_vars['COPYRIGHT_STR'] = "Copyright (c)" replace_vars['COPYRIGHT_STR'] = "Copyright (c)"

View File

@ -2,3 +2,7 @@
div.body { div.body {
max-width: none; 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 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 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 :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: .. _basic-config-commands:
@ -261,27 +261,27 @@ Sample Config File
Below is a sample configuration file for the zebra daemon. Below is a sample configuration file for the zebra daemon.
:: .. code-block:: frr
! !
! Zebra configuration file ! Zebra configuration file
! !
hostname Router hostname Router
password zebra password zebra
enable password zebra enable password zebra
! !
log stdout log stdout
! !
! !
'!' and '#' are comment characters. If the first character of the word '!' and '#' are comment characters. If the first character of the word
is one of the comment characters then from the rest of the line forward is one of the comment characters then from the rest of the line forward
will be ignored as a comment. will be ignored as a comment.
:: .. code-block:: frr
password zebra!password password zebra!password
If a comment character is not the first character of the word, it's a If a comment character is not the first character of the word, it's a
normal character. So in the above example '!' will not be regarded as a normal character. So in the above example '!' will not be regarded as a
@ -358,13 +358,11 @@ Common Invocation Options
These options apply to all |PACKAGE_NAME| daemons. These options apply to all |PACKAGE_NAME| daemons.
.. option:: -d .. option:: -d, --daemon
.. option:: --daemon
Run in daemon mode. Run in daemon mode.
.. option:: -f <file> .. option:: -f, --config_file <file>
.. option:: --config-file <file>
Set configuration file name. Set configuration file name.
@ -372,8 +370,7 @@ These options apply to all |PACKAGE_NAME| daemons.
Display this help and exit. Display this help and exit.
.. option:: -i <file> .. option:: -i, --pid_file <file>
.. option:: --pid-file <file>
Upon startup the process identifier of the daemon is written to a 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 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 machine can be used to collect differing routing views from differing
points in the network. points in the network.
.. option:: -A <address> .. option:: -A, --vty_addr <address>
.. option:: --vty-addr <address>
Set the VTY local address to bind to. If set, the VTY socket will only Set the VTY local address to bind to. If set, the VTY socket will only
be bound to this address. be bound to this address.
.. option:: -P <port> .. option:: -P, --vty_port <port>
.. option:: --vty-port <port>
Set the VTY TCP port number. If set to 0 then the TCP VTY sockets will not Set the VTY TCP port number. If set to 0 then the TCP VTY sockets will not
be opened. be opened.
.. option:: -u <user> .. option:: -u <user>
.. option:: --vty_addr <user>
Set the user and group to run as. Set the user and group to run as.
.. option:: -v .. option:: -v, --version
.. option:: --version
Print program 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: the following command line option at daemon startup:
.. option:: -M <module:options> .. option:: -M, --module <module:options>
.. option:: --module <module:options>
Load the specified module, optionally passing options to it. If the module 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 name contains a slash (/), it is assumed to be a full pathname to a file to
@ -474,32 +466,32 @@ is no VTY password, one cannot connect to the VTY interface at all.
:: ::
% telnet localhost 2601 % telnet localhost 2601
Trying 127.0.0.1... Trying 127.0.0.1...
Connected to localhost. Connected to localhost.
Escape character is '^]'. Escape character is '^]'.
Hello, this is |PACKAGE_NAME| (version |PACKAGE_VERSION|) Hello, this is |PACKAGE_NAME| (version |PACKAGE_VERSION|)
|COPYRIGHT_STR| |COPYRIGHT_STR|
User Access Verification User Access Verification
Password: XXXXX Password: XXXXX
Router> ? Router> ?
enable . . . Turn on privileged commands enable . . . Turn on privileged commands
exit . . . Exit current mode and down to previous mode exit . . . Exit current mode and down to previous mode
help . . . Description of the interactive help system help . . . Description of the interactive help system
list . . . Print command list list . . . Print command list
show . . . Show system inform show . . . Show system inform
wh. . . Display who is on a vty wh. . . Display who is on a vty
Router> enable Router> enable
Password: XXXXX Password: XXXXX
Router# configure terminal Router# configure terminal
Router(config)# interface eth0 Router(config)# interface eth0
Router(config-if)# ip address 10.0.0.1/8 Router(config-if)# ip address 10.0.0.1/8
Router(config-if)# ^Z Router(config-if)# ^Z
Router# Router#
:kbd:`?` and the ``find`` command are very useful for looking up commands. :kbd:`?` and the ``find`` command are very useful for looking up commands.
@ -553,22 +545,22 @@ These commands are used for moving the CLI cursor. The :kbd:`C` character
means press the Control Key. means press the Control Key.
:kbd:`C-f` / :kbd:`LEFT` :kbd:`C-f` / :kbd:`LEFT`
Move forward one character. Move forward one character.
:kbd:`C-b` / :kbd:`RIGHT` :kbd:`C-b` / :kbd:`RIGHT`
Move backward one character. Move backward one character.
:kbd:`M-f` :kbd:`M-f`
Move forward one word. Move forward one word.
:kbd:`M-b` :kbd:`M-b`
Move backward one word. Move backward one word.
:kbd:`C-a` :kbd:`C-a`
Move to the beginning of the line. Move to the beginning of the line.
:kbd:`C-e` :kbd:`C-e`
Move to the end of the line. Move to the end of the line.
.. _cli-editing-commands: .. _cli-editing-commands:
@ -581,31 +573,31 @@ character means press the Control Key.
:kbd:`C-h` / :kbd:`DEL` :kbd:`C-h` / :kbd:`DEL`
Delete the character before point. Delete the character before point.
:kbd:`C-d` :kbd:`C-d`
Delete the character after point. Delete the character after point.
:kbd:`M-d` :kbd:`M-d`
Forward kill word. Forward kill word.
:kbd:`C-w` :kbd:`C-w`
Backward kill word. Backward kill word.
:kbd:`C-k` :kbd:`C-k`
Kill to the end of the line. Kill to the end of the line.
:kbd:`C-u` :kbd:`C-u`
Kill line from the beginning, erasing input. Kill line from the beginning, erasing input.
:kbd:`C-t` :kbd:`C-t`
Transpose character. Transpose character.
CLI Advanced Commands CLI Advanced Commands
@ -616,27 +608,27 @@ insta-help, and VTY session management.
:kbd:`C-c` :kbd:`C-c`
Interrupt current input and moves to the next line. Interrupt current input and moves to the next line.
:kbd:`C-z` :kbd:`C-z`
End current configuration session and move to top node. End current configuration session and move to top node.
:kbd:`C-n` / :kbd:`DOWN` :kbd:`C-n` / :kbd:`DOWN`
Move down to next line in the history buffer. Move down to next line in the history buffer.
:kbd:`C-p` / :kbd:`UP` :kbd:`C-p` / :kbd:`UP`
Move up to previous line in the history buffer. Move up to previous line in the history buffer.
:kbd:`TAB` :kbd:`TAB`
Use command line completion by typing :kbd:`TAB`. Use command line completion by typing :kbd:`TAB`.
:kbd:`?` :kbd:`?`
You can use command line help by typing `help` at the beginning of You can use command line help by typing ``help`` at the beginning of the
the line. Typing :kbd:`?` at any point in the line will show possible line. Typing :kbd:`?` at any point in the line will show possible
completions. completions.

View File

@ -26,19 +26,16 @@ be specified (:ref:`common-invocation-options`).
.. program:: bgpd .. program:: bgpd
.. option:: -p <port> .. option:: -p, --bgp_port <port>
.. option:: --bgp_port <port>
Set the bgp protocol's port number. When port number is 0, that means do not Set the bgp protocol's port number. When port number is 0, that means do not
listen bgp port. listen bgp port.
.. option:: -r .. option:: -r, --retain
.. option:: --retain
When program terminates, retain BGP routes added by zebra. When program terminates, retain BGP routes added by zebra.
.. option:: -l .. option:: -l, --listenon
.. option:: --listenon
Specify a specific IP address for bgpd to listen on, rather than its 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 default of INADDR_ANY / IN6ADDR_ANY. This can be useful to constrain bgpd
@ -473,12 +470,14 @@ BGP route
.. index:: network A.B.C.D/M .. index:: network A.B.C.D/M
.. clicmd:: 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.
router bgp 1 .. code-block:: frr
address-family ipv4 unicast
network 10.0.0.0/8 router bgp 1
exit-address-family address-family ipv4 unicast
network 10.0.0.0/8
exit-address-family
This configuration example says that network 10.0.0.0/8 will be This configuration example says that network 10.0.0.0/8 will be
announced to all neighbors. Some vendors' routers don't advertise announced to all neighbors. Some vendors' routers don't advertise
@ -606,15 +605,17 @@ Defining Peer
.. clicmd:: neighbor PEER remote-as ASN .. clicmd:: neighbor PEER remote-as ASN
Creates a new neighbor whose remote-as is ASN. PEER can be an IPv4 address 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.
router bgp 1 .. code-block:: frr
neighbor 10.0.0.1 remote-as 2
router bgp 1
neighbor 10.0.0.1 remote-as 2
In this case my router, in AS-1, is trying to peer with AS-2 at 10.0.0.1. 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 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 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 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 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 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 router bgp 64555
neighbor foo update-source 192.168.0.1 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. attribute. AS 7675 provides upstream Internet connection to AS 100.
When following configuration exists in AS 7675, AS 100 networks When following configuration exists in AS 7675, AS 100 networks
operator can set local preference in AS 7675 network by setting BGP 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 router bgp 7675
neighbor 192.168.0.1 remote-as 100 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. 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 The route has communities value 7675:80 so when above configuration
exists in AS 7675, announced route's local preference will be set to exists in AS 7675, announced route's local preference will be set to
value 80.:: value 80.
.. code-block:: frr
router bgp 100 router bgp 100
network 10.0.0.0/8 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 communities attribute. This configuration only permit BGP routes
which has BGP communities value 0:80 or 0:90. Network operator can which has BGP communities value 0:80 or 0:90. Network operator can
put special internal communities value at BGP border router, then 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 router bgp 7675
neighbor 192.168.0.1 remote-as 100 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. Following exmaple filter BGP routes which has communities value 1:1.
When there is no match community-list returns deny. To avoid 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 router bgp 7675
neighbor 192.168.0.1 remote-as 100 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 standard community lists. In below example `internet` act as
match any. It matches all of BGP routes even if the route does not match any. It matches all of BGP routes even if the route does not
have communities attribute at all. So community list ``INTERNET`` 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 deny 1:1
ip community-list standard INTERNET permit internet 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. Following configuration is an example of communities value deletion.
With this configuration communities value 100:1 and 100:2 is removed With this configuration communities value 100:1 and 100:2 is removed
from BGP updates. For communities value deletion, only `permit` 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 router bgp 7675
neighbor 192.168.0.1 remote-as 100 neighbor 192.168.0.1 remote-as 100
@ -1382,11 +1398,9 @@ Lists.
.. clicmd:: show ip extcommunity-list NAME .. clicmd:: show ip extcommunity-list NAME
This command displays current extcommunity-list information. When `name` is 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
# show ip extcommunity-list
.. _bgp-extended-communities-in-route-map: .. _bgp-extended-communities-in-route-map:
@ -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 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 is not sent to the neighbor by default. To send the
community attribute user has to specify *neighbor A.B.C.D send-community* community attribute user has to specify *neighbor A.B.C.D send-community*
command.:: command.
.. code-block:: frr
! !
router bgp 1 router bgp 1
@ -1969,17 +1985,17 @@ multiple instance feature is enabled.
Make a new BGP instance. You can use an arbitrary word for the `name`. Make a new BGP instance. You can use an arbitrary word for the `name`.
:: .. code-block:: frr
bgp multiple-instance bgp multiple-instance
! !
router bgp 1 router bgp 1
neighbor 10.0.0.1 remote-as 2 neighbor 10.0.0.1 remote-as 2
neighbor 10.0.0.2 remote-as 3 neighbor 10.0.0.2 remote-as 3
! !
router bgp 2 router bgp 2
neighbor 10.0.0.3 remote-as 4 neighbor 10.0.0.3 remote-as 4
neighbor 10.0.0.4 remote-as 5 neighbor 10.0.0.4 remote-as 5
BGP view is almost same as normal BGP process. The result of route selection BGP view is almost same as normal BGP process. The result of route selection
@ -1994,7 +2010,7 @@ routing information.
With this command, you can setup Route Server like below. With this command, you can setup Route Server like below.
:: .. code-block:: frr
bgp multiple-instance bgp multiple-instance
! !
@ -2013,7 +2029,9 @@ Routing policy
-------------- --------------
You can set different routing policy for a peer. For example, you can set 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 bgp multiple-instance
! !
@ -2087,10 +2105,10 @@ _
How to set up a 6-Bone connection How to set up a 6-Bone connection
================================= =================================
:: .. code-block:: frr
bgpd configuration ! bgpd configuration
================== ! ==================
! !
! MP-BGP configuration ! MP-BGP configuration
! !
@ -2174,7 +2192,9 @@ Dump BGP packets and table
BGP Configuration Examples 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 router bgp 64512
bgp router-id 10.236.87.1 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 as guidance only, it has NOT been tested and almost certainly containts silly
mistakes, if not serious flaws. mistakes, if not serious flaws.
:: .. code-block:: frr
router bgp 64512 router bgp 64512
bgp router-id 10.236.87.1 bgp router-id 10.236.87.1

View File

@ -15,6 +15,8 @@
import sys import sys
import os import os
import re import re
import pygments
from sphinx.highlighting import lexers
# If extensions (or modules to document with autodoc) are in another directory, # 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 # 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. # General information about the project.
project = u'FRR' project = u'FRR'
copyright = u'2017, 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 # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |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. # Extract values from codebase for substitution into docs.
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Various installation prefixes. Reasonable defaults are set where possible. # Various installation prefixes. Values are extracted from config.status.
# Values are overridden by logic below. # Reasonable defaults are set in case that file does not exist.
replace_vars = { replace_vars = {
'AUTHORS': 'Kunihiro Ishiguro, et al.', 'AUTHORS': author,
'COPYRIGHT_YEAR': '1999-2005', 'COPYRIGHT_YEAR': '1999-2005',
'COPYRIGHT_STR': None, 'COPYRIGHT_STR': 'Copyright (c) 1999-2005',
'PACKAGE_NAME': project.lower(), 'PACKAGE_NAME': project.lower(),
'PACKAGE_TARNAME': project.lower(), 'PACKAGE_TARNAME': project.lower(),
'PACKAGE_STRING': None, 'PACKAGE_STRING': project.lower() + ' latest',
'PACKAGE_URL': 'https://frrouting.org/', 'PACKAGE_URL': 'https://frrouting.org/',
'PACKAGE_VERSION': None, 'PACKAGE_VERSION': 'latest',
'INSTALL_PREFIX_ETC': None, 'INSTALL_PREFIX_ETC': '/etc/frr',
'INSTALL_PREFIX_SBIN': None, 'INSTALL_PREFIX_SBIN': '/usr/lib/frr',
'INSTALL_PREFIX_STATE': None, 'INSTALL_PREFIX_STATE': '/var/run/frr',
'INSTALL_PREFIX_MODULES': None, 'INSTALL_PREFIX_MODULES': '/usr/lib/frr/modules',
'INSTALL_USER': None, 'INSTALL_USER': 'frr',
'INSTALL_GROUP': None, 'INSTALL_GROUP': 'frr',
'INSTALL_VTY_GROUP': None, 'INSTALL_VTY_GROUP': 'frrvty',
'GROUP': 'frr',
'USER': 'frr',
} }
# extract version information, installation location, other stuff we need to # extract version information, installation location, other stuff we need to
# use when building final documents # use when building final documents
val = re.compile('^S\["([^"]+)"\]="(.*)"$') val = re.compile('^S\["([^"]+)"\]="(.*)"$')
with open('../../config.status', 'r') as cfgstatus: try:
for ln in cfgstatus.readlines(): with open('../../config.status', 'r') as cfgstatus:
m = val.match(ln) for ln in cfgstatus.readlines():
if not m or m.group(1) not in replace_vars.keys(): continue m = val.match(ln)
replace_vars[m.group(1)] = m.group(2) 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 # manually fill out some of these we can't get from config.status
replace_vars['COPYRIGHT_STR'] = "Copyright (c)" replace_vars['COPYRIGHT_STR'] = "Copyright (c)"
@ -341,3 +349,13 @@ def setup(app):
app.add_object_type('clicmd', 'clicmd') app.add_object_type('clicmd', 'clicmd')
# css overrides for HTML theme # css overrides for HTML theme
app.add_stylesheet('overrides.css') 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 .. program:: eigrpd
.. option:: -r .. option:: -r, --retain
.. option:: --retain
When the program terminates, retain routes added by *eigrpd*. When the program terminates, retain routes added by *eigrpd*.
@ -100,7 +99,7 @@ EIGRP Configuration
Below is very simple EIGRP configuration. Interface `eth0` and Below is very simple EIGRP configuration. Interface `eth0` and
interface which address match to `10.0.0.0/8` are EIGRP enabled. interface which address match to `10.0.0.0/8` are EIGRP enabled.
:: .. code-block:: frr
! !
router eigrp 1 router eigrp 1

View File

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

View File

@ -559,7 +559,9 @@ Debugging ISIS
ISIS Configuration Examples ISIS Configuration Examples
=========================== ===========================
A simple example, with MD5 authentication enabled::: A simple example, with MD5 authentication enabled:
.. code-block:: frr
! !
interface eth0 interface eth0
@ -575,7 +577,9 @@ A simple example, with MD5 authentication enabled:::
A Traffic Engineering configuration, with Inter-ASv2 support. A Traffic Engineering configuration, with Inter-ASv2 support.
First, the 'zebra.conf' part::: First, the :file:`zebra.conf` part:
.. code-block:: frr
hostname HOSTNAME hostname HOSTNAME
password PASSWORD password PASSWORD
@ -614,7 +618,9 @@ First, the 'zebra.conf' part:::
neighbor 10.1.1.2 as 65000 neighbor 10.1.1.2 as 65000
Then the 'isisd.conf' itself::: Then the :file:`isisd.conf` itself:
.. code-block:: frr
hostname HOSTNAME hostname HOSTNAME
password PASSWORD 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. 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 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 router bgp 65555
address-family ipv4 unicast address-family ipv4 unicast
@ -82,12 +84,12 @@ using NFLOG. Typically you want to send Traffic Indications for network
traffic that is routed from gre1 back to gre1 in rate limited manner. traffic that is routed from gre1 back to gre1 in rate limited manner.
This can be achieved with the following iptables rule. This can be achieved with the following iptables rule.
:: .. code-block:: shell
iptables -A FORWARD -i gre1 -o gre1 \\ iptables -A FORWARD -i gre1 -o gre1 \\
-m hashlimit --hashlimit-upto 4/minute --hashlimit-burst 1 \\ -m hashlimit --hashlimit-upto 4/minute --hashlimit-burst 1 \\
--hashlimit-mode srcip,dstip --hashlimit-srcmask 24 --hashlimit-dstmask 24 \\ --hashlimit-mode srcip,dstip --hashlimit-srcmask 24 --hashlimit-dstmask 24 \\
--hashlimit-name loglimit-0 -j NFLOG --nflog-group 1 --nflog-range 128 --hashlimit-name loglimit-0 -j NFLOG --nflog-group 1 --nflog-range 128
You can fine tune the src/dstmask according to the prefix lengths you You can fine tune the src/dstmask according to the prefix lengths you
@ -95,15 +97,20 @@ announce internal, add additional IP range matches, or rate limitation
if needed. However, the above should be good in most cases. if needed. However, the above should be good in most cases.
This kernel NFLOG target's nflog-group is configured in global nhrp config This kernel NFLOG target's nflog-group is configured in global nhrp config
with::: with:
nhrp nflog-group 1 .. code-block:: frr
nhrp nflog-group 1
To start sending these traffic notices out from hubs, use the nhrp 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
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 will cause the holdtime to be increased by `initial-holdtime`, bounded
by the `maximum-holdtime` configured with this command. If the adaptive by the `maximum-holdtime` configured with this command. If the adaptive
hold-time elapses without any SPF-triggering event occuring then 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 router ospf6
timers throttle spf 200 400 10000 timers throttle spf 200 400 10000
@ -187,7 +189,7 @@ OSPF6 Configuration Examples
Example of ospf6d configured on one interface and area: Example of ospf6d configured on one interface and area:
:: .. code-block:: frr
interface eth0 interface eth0
ipv6 ospf6 instance-id 0 ipv6 ospf6 instance-id 0

View File

@ -336,61 +336,61 @@ are fully adjacent with 192.168.0.49.
:: ::
# show ip ospf database router 192.168.0.49 # show ip ospf database router 192.168.0.49
OSPF Router with ID (192.168.0.53) OSPF Router with ID (192.168.0.53)
Router Link States (Area 0.0.0.0) Router Link States (Area 0.0.0.0)
LS age: 38 LS age: 38
Options: 0x2 : *|-|-|-|-|-|E|* Options: 0x2 : *|-|-|-|-|-|E|*
LS Flags: 0x6 LS Flags: 0x6
Flags: 0x2 : ASBR Flags: 0x2 : ASBR
LS Type: router-LSA LS Type: router-LSA
Link State ID: 192.168.0.49 Link State ID: 192.168.0.49
Advertising Router: 192.168.0.49 Advertising Router: 192.168.0.49
LS Seq Number: 80000f90 LS Seq Number: 80000f90
Checksum: 0x518b Checksum: 0x518b
Length: 60 Length: 60
Number of Links: 3 Number of Links: 3
Link connected to: a Transit Network Link connected to: a Transit Network
(Link ID) Designated Router address: 192.168.1.3 (Link ID) Designated Router address: 192.168.1.3
(Link Data) Router Interface address: 192.168.1.3 (Link Data) Router Interface address: 192.168.1.3
Number of TOS metrics: 0 Number of TOS metrics: 0
TOS 0 Metric: 10 TOS 0 Metric: 10
Link connected to: a Transit Network Link connected to: a Transit Network
(Link ID) Designated Router address: 192.168.0.49 (Link ID) Designated Router address: 192.168.0.49
(Link Data) Router Interface address: 192.168.0.49 (Link Data) Router Interface address: 192.168.0.49
Number of TOS metrics: 0 Number of TOS metrics: 0
TOS 0 Metric: 10 TOS 0 Metric: 10
Link connected to: Stub Network Link connected to: Stub Network
(Link ID) Net: 192.168.3.190 (Link ID) Net: 192.168.3.190
(Link Data) Network Mask: 255.255.255.255 (Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0 Number of TOS metrics: 0
TOS 0 Metric: 39063 TOS 0 Metric: 39063
# show ip ospf database network 192.168.0.49 # show ip ospf database network 192.168.0.49
OSPF Router with ID (192.168.0.53) OSPF Router with ID (192.168.0.53)
Net Link States (Area 0.0.0.0) Net Link States (Area 0.0.0.0)
LS age: 285 LS age: 285
Options: 0x2 : *|-|-|-|-|-|E|* Options: 0x2 : *|-|-|-|-|-|E|*
LS Flags: 0x6 LS Flags: 0x6
LS Type: network-LSA LS Type: network-LSA
Link State ID: 192.168.0.49 (address of Designated Router) Link State ID: 192.168.0.49 (address of Designated Router)
Advertising Router: 192.168.0.49 Advertising Router: 192.168.0.49
LS Seq Number: 80000074 LS Seq Number: 80000074
Checksum: 0x0103 Checksum: 0x0103
Length: 40 Length: 40
Network Mask: /29 Network Mask: /29
Attached Router: 192.168.0.49 Attached Router: 192.168.0.49
Attached Router: 192.168.0.52 Attached Router: 192.168.0.52
Attached Router: 192.168.0.53 Attached Router: 192.168.0.53
Attached Router: 192.168.0.54 Attached Router: 192.168.0.54
Note that from one LSA, you can find the other. E.g. Given the Note that from one LSA, you can find the other. E.g. Given the
@ -412,26 +412,26 @@ following partial topology:
:: ::
------------------------ Network: ...... ------------------------ Network: ......
| Designated Router IP: 192.168.1.3 | Designated Router IP: 192.168.1.3
| |
IP: 192.168.1.3 IP: 192.168.1.3
(transit link) (transit link)
(cost: 10) (cost: 10)
Router ID: 192.168.0.49(stub)---------- IP: 192.168.3.190/32 Router ID: 192.168.0.49(stub)---------- IP: 192.168.3.190/32
(cost: 10) (cost: 39063) (cost: 10) (cost: 39063)
(transit link) (transit link)
IP: 192.168.0.49 IP: 192.168.0.49
| |
| |
------------------------------ Network: 192.168.0.48/29 ------------------------------ Network: 192.168.0.48/29
| | | Designated Router IP: 192.168.0.49 | | | Designated Router IP: 192.168.0.49
| | | | | |
| | Router ID: 192.168.0.54 | | Router ID: 192.168.0.54
| | | |
| Router ID: 192.168.0.53 | Router ID: 192.168.0.53
| |
Router ID: 192.168.0.52 Router ID: 192.168.0.52
Note the Router IDs, though they look like IP addresses and often are Note the Router IDs, though they look like IP addresses and often are
@ -495,22 +495,22 @@ should forward to the originating ASBR if selected.
:: ::
# show ip ospf database external 192.168.165.0 # show ip ospf database external 192.168.165.0
LS age: 995 LS age: 995
Options: 0x2 : *|-|-|-|-|-|E|* Options: 0x2 : *|-|-|-|-|-|E|*
LS Flags: 0x9 LS Flags: 0x9
LS Type: AS-external-LSA LS Type: AS-external-LSA
Link State ID: 192.168.165.0 (External Network Number) Link State ID: 192.168.165.0 (External Network Number)
Advertising Router: 192.168.0.49 Advertising Router: 192.168.0.49
LS Seq Number: 800001d8 LS Seq Number: 800001d8
Checksum: 0xea27 Checksum: 0xea27
Length: 36 Length: 36
Network Mask: /24 Network Mask: /24
Metric Type: 2 (Larger than any link state path) Metric Type: 2 (Larger than any link state path)
TOS: 0 TOS: 0
Metric: 20 Metric: 20
Forward Address: 0.0.0.0 Forward Address: 0.0.0.0
External Route Tag: 0 External Route Tag: 0
We can add this to our partial topology from above, which now looks We can add this to our partial topology from above, which now looks

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

View File

@ -95,17 +95,17 @@ architecture creates new possibilities for the routing system.
:: ::
+----+ +----+ +-----+ +-----+ +----+ +----+ +-----+ +-----+
|bgpd| |ripd| |ospfd| |zebra| |bgpd| |ripd| |ospfd| |zebra|
+----+ +----+ +-----+ +-----+ +----+ +----+ +-----+ +-----+
| |
+---------------------------|--+ +---------------------------|--+
| v | | v |
| UNIX Kernel routing table | | UNIX Kernel routing table |
| | | |
+------------------------------+ +------------------------------+
FRR System Architecture FRR System Architecture
Multi-process architecture brings extensibility, modularity and Multi-process architecture brings extensibility, modularity and

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:: PIM Multicast RIB insertion:
============================= ============================
In order to influence Multicast RPF lookup, it is possible to insert In order to influence Multicast RPF lookup, it is possible to insert
into zebra routes for the Multicast RIB. These routes are only 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 *ripd* invocation options. Common options that can be specified
(:ref:`common-invocation-options`). (:ref:`common-invocation-options`).
.. option:: -r .. option:: -r, --retain
.. option:: --retain
When the program terminates, retain routes added by *ripd*. 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 Below is very simple RIP configuration. Interface `eth0` and interface which
address match to `10.0.0.0/8` are RIP enabled. address match to `10.0.0.0/8` are RIP enabled.
:: .. code-block:: frr
! !
router rip 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 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 ``eth0`` will permit only the paths that match the route 10.0.0.0/8
:: .. code-block:: frr
! !
router rip router rip
@ -447,11 +446,11 @@ Usage of *ripd*'s route-map support.
Optional argument route-map MAP_NAME can be added to each `redistribute` Optional argument route-map MAP_NAME can be added to each `redistribute`
statement. statement.
:: .. code-block:: frr
redistribute static [route-map MAP_NAME] redistribute static [route-map MAP_NAME]
redistribute connected [route-map MAP_NAME] redistribute connected [route-map MAP_NAME]
..... .....
Cisco applies route-map _before_ routes will exported to rip route table. In Cisco applies route-map _before_ routes will exported to rip route table. In
@ -573,17 +572,17 @@ To prevent such unauthenticated querying of routes disable RIPv1,
Specifiy Keyed MD5 chain. Specifiy Keyed MD5 chain.
:: .. code-block:: frr
! !
key chain test key chain test
key 1 key 1
key-string test key-string test
! !
interface eth1 interface eth1
ip rip authentication mode md5 ip rip authentication mode md5
ip rip authentication key-chain test ip rip authentication key-chain test
! !
.. _rip-timers: .. _rip-timers:

View File

@ -302,11 +302,11 @@ Route Map Examples
A simple example of a route-map: A simple example of a route-map:
:: .. code-block:: frr
route-map test permit 10 route-map test permit 10
match ip address 10 match ip address 10
set local-preference 200 set local-preference 200
This means that if a route matches ip access-list number 10 it's This means that if a route matches ip access-list number 10 it's

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 configured, named like 'PEER-X-IN' or 'PEER-X-OUT'. For example the
configuration file for router RA could be the following: configuration file for router RA could be the following:
:: .. code-block:: frr
#Configuration for router 'RA' #Configuration for router 'RA'
! !
@ -319,29 +319,29 @@ 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 between them, but only with the route server. For example, RA's
configuration would turn into: configuration would turn into:
:: .. code-block:: frr
# Configuration for router 'RA' # Configuration for router 'RA'
! !
hostname RA hostname RA
password **** password ****
! !
router bgp 65001 router bgp 65001
no bgp default ipv4-unicast no bgp default ipv4-unicast
neighbor 2001:0DB8::FFFF remote-as 65000 neighbor 2001:0DB8::FFFF remote-as 65000
! !
address-family ipv6 address-family ipv6
network 2001:0DB8:AAAA:1::/64 network 2001:0DB8:AAAA:1::/64
network 2001:0DB8:AAAA:2::/64 network 2001:0DB8:AAAA:2::/64
network 2001:0DB8:0000:1::/64 network 2001:0DB8:0000:1::/64
network 2001:0DB8:0000:2::/64 network 2001:0DB8:0000:2::/64
neighbor 2001:0DB8::FFFF activate neighbor 2001:0DB8::FFFF activate
neighbor 2001:0DB8::FFFF soft-reconfiguration inbound neighbor 2001:0DB8::FFFF soft-reconfiguration inbound
exit-address-family exit-address-family
! !
line vty line vty
! !
Which is logically much simpler than its initial configuration, as it now Which is logically much simpler than its initial configuration, as it now
@ -362,84 +362,84 @@ server.
This is a fragment of the route server configuration (we only show This is a fragment of the route server configuration (we only show
the policies for client RA): the policies for client RA):
:: .. code-block:: frr
# Configuration for Route Server ('RS') # Configuration for Route Server ('RS')
! !
hostname RS hostname RS
password ix password ix
! !
bgp multiple-instance bgp multiple-instance
! !
router bgp 65000 view RS router bgp 65000 view RS
no bgp default ipv4-unicast no bgp default ipv4-unicast
neighbor 2001:0DB8::A remote-as 65001 neighbor 2001:0DB8::A remote-as 65001
neighbor 2001:0DB8::B remote-as 65002 neighbor 2001:0DB8::B remote-as 65002
neighbor 2001:0DB8::C remote-as 65003 neighbor 2001:0DB8::C remote-as 65003
! !
address-family ipv6 address-family ipv6
neighbor 2001:0DB8::A activate neighbor 2001:0DB8::A activate
neighbor 2001:0DB8::A route-server-client neighbor 2001:0DB8::A route-server-client
neighbor 2001:0DB8::A route-map RSCLIENT-A-IMPORT import neighbor 2001:0DB8::A route-map RSCLIENT-A-IMPORT import
neighbor 2001:0DB8::A route-map RSCLIENT-A-EXPORT export neighbor 2001:0DB8::A route-map RSCLIENT-A-EXPORT export
neighbor 2001:0DB8::A soft-reconfiguration inbound neighbor 2001:0DB8::A soft-reconfiguration inbound
neighbor 2001:0DB8::B activate neighbor 2001:0DB8::B activate
neighbor 2001:0DB8::B route-server-client neighbor 2001:0DB8::B route-server-client
neighbor 2001:0DB8::B route-map RSCLIENT-B-IMPORT import neighbor 2001:0DB8::B route-map RSCLIENT-B-IMPORT import
neighbor 2001:0DB8::B route-map RSCLIENT-B-EXPORT export neighbor 2001:0DB8::B route-map RSCLIENT-B-EXPORT export
neighbor 2001:0DB8::B soft-reconfiguration inbound neighbor 2001:0DB8::B soft-reconfiguration inbound
neighbor 2001:0DB8::C activate neighbor 2001:0DB8::C activate
neighbor 2001:0DB8::C route-server-client neighbor 2001:0DB8::C route-server-client
neighbor 2001:0DB8::C route-map RSCLIENT-C-IMPORT import neighbor 2001:0DB8::C route-map RSCLIENT-C-IMPORT import
neighbor 2001:0DB8::C route-map RSCLIENT-C-EXPORT export neighbor 2001:0DB8::C route-map RSCLIENT-C-EXPORT export
neighbor 2001:0DB8::C soft-reconfiguration inbound neighbor 2001:0DB8::C soft-reconfiguration inbound
exit-address-family exit-address-family
! !
ipv6 prefix-list COMMON-PREFIXES seq 5 permit 2001:0DB8:0000::/48 ge 64 le 64 ipv6 prefix-list COMMON-PREFIXES seq 5 permit 2001:0DB8:0000::/48 ge 64 le 64
ipv6 prefix-list COMMON-PREFIXES seq 10 deny any ipv6 prefix-list COMMON-PREFIXES seq 10 deny any
! !
ipv6 prefix-list PEER-A-PREFIXES seq 5 permit 2001:0DB8:AAAA::/48 ge 64 le 64 ipv6 prefix-list PEER-A-PREFIXES seq 5 permit 2001:0DB8:AAAA::/48 ge 64 le 64
ipv6 prefix-list PEER-A-PREFIXES seq 10 deny any ipv6 prefix-list PEER-A-PREFIXES seq 10 deny any
! !
ipv6 prefix-list PEER-B-PREFIXES seq 5 permit 2001:0DB8:BBBB::/48 ge 64 le 64 ipv6 prefix-list PEER-B-PREFIXES seq 5 permit 2001:0DB8:BBBB::/48 ge 64 le 64
ipv6 prefix-list PEER-B-PREFIXES seq 10 deny any ipv6 prefix-list PEER-B-PREFIXES seq 10 deny any
! !
ipv6 prefix-list PEER-C-PREFIXES seq 5 permit 2001:0DB8:CCCC::/48 ge 64 le 64 ipv6 prefix-list PEER-C-PREFIXES seq 5 permit 2001:0DB8:CCCC::/48 ge 64 le 64
ipv6 prefix-list PEER-C-PREFIXES seq 10 deny any ipv6 prefix-list PEER-C-PREFIXES seq 10 deny any
! !
route-map RSCLIENT-A-IMPORT permit 10 route-map RSCLIENT-A-IMPORT permit 10
match peer 2001:0DB8::B match peer 2001:0DB8::B
call A-IMPORT-FROM-B call A-IMPORT-FROM-B
route-map RSCLIENT-A-IMPORT permit 20 route-map RSCLIENT-A-IMPORT permit 20
match peer 2001:0DB8::C match peer 2001:0DB8::C
call A-IMPORT-FROM-C call A-IMPORT-FROM-C
! !
route-map A-IMPORT-FROM-B permit 10 route-map A-IMPORT-FROM-B permit 10
match ipv6 address prefix-list COMMON-PREFIXES match ipv6 address prefix-list COMMON-PREFIXES
set metric 100 set metric 100
route-map A-IMPORT-FROM-B permit 20 route-map A-IMPORT-FROM-B permit 20
match ipv6 address prefix-list PEER-B-PREFIXES match ipv6 address prefix-list PEER-B-PREFIXES
set community 65001:11111 set community 65001:11111
! !
route-map A-IMPORT-FROM-C permit 10 route-map A-IMPORT-FROM-C permit 10
match ipv6 address prefix-list COMMON-PREFIXES match ipv6 address prefix-list COMMON-PREFIXES
set metric 200 set metric 200
route-map A-IMPORT-FROM-C permit 20 route-map A-IMPORT-FROM-C permit 20
match ipv6 address prefix-list PEER-C-PREFIXES match ipv6 address prefix-list PEER-C-PREFIXES
set community 65001:22222 set community 65001:22222
! !
route-map RSCLIENT-A-EXPORT permit 10 route-map RSCLIENT-A-EXPORT permit 10
match peer 2001:0DB8::B match peer 2001:0DB8::B
match ipv6 address prefix-list PEER-A-PREFIXES match ipv6 address prefix-list PEER-A-PREFIXES
route-map RSCLIENT-A-EXPORT permit 20 route-map RSCLIENT-A-EXPORT permit 20
match peer 2001:0DB8::C match peer 2001:0DB8::C
match ipv6 address prefix-list PEER-A-PREFIXES match ipv6 address prefix-list PEER-A-PREFIXES
! !
... ...
... ...
... ...
If you compare the initial configuration of RA with the route server If you compare the initial configuration of RA with the route server
@ -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 route-maps. For example suppose that in the non-route-server scenario peer
RA had the following filters configured for input from peer B: 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 prefix-list LIST-1 in
neighbor 2001:0DB8::B filter-list LIST-2 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 route-map). That route-map can then be used inside the Import
policy in the route server. Lets see how to do it: policy in the route server. Lets see how to do it:
:: .. code-block:: frr
neighbor 2001:0DB8::A route-map RSCLIENT-A-IMPORT import 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 In the following example, the router prefers valid routes over invalid
prefixes because invalid routes have a lower local preference. prefixes because invalid routes have a lower local preference.
:: .. code-block:: frr
! Allow for invalid routes in route selection process ! Allow for invalid routes in route selection process
route bgp 60001 route bgp 60001
@ -213,7 +213,7 @@ Displaying RPKI
RPKI Configuration Example RPKI Configuration Example
-------------------------- --------------------------
:: .. code-block:: frr
hostname bgpd1 hostname bgpd1
password zebra password zebra

View File

@ -42,22 +42,23 @@ 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. :file:`/etc/snmp/snmpd.conf`, the ``master agentx`` directive should be added.
In each of the FRR daemons, ``agentx`` command will enable AgentX support. In each of the FRR daemons, ``agentx`` command will enable AgentX support.
:: :file:`/etc/snmp/snmpd.conf`:
#
# example access restrictions setup
#
com2sec readonly default public
group MyROGroup v1 readonly
view all included .1 80
access MyROGroup "" any noauth exact all none none
#
# enable master agent for AgentX subagents
#
master agentx
/etc/snmp/snmpd.conf: :file:`/etc/frr/ospfd.conf:`
#
# example access restrictions setup .. code-block:: frr
#
com2sec readonly default public
group MyROGroup v1 readonly
view all included .1 80
access MyROGroup "" any noauth exact all none none
#
# enable master agent for AgentX subagents
#
master agentx
/etc/frr/ospfd.conf:
! ... the rest of ospfd.conf has been omitted for clarity ... ! ... the rest of ospfd.conf has been omitted for clarity ...
! !
agentx agentx
@ -69,16 +70,16 @@ each FRR daemons:
:: ::
2012/05/25 11:39:08 ZEBRA: snmp[info]: NET-SNMP version 5.4.3 AgentX subagent connected 2012/05/25 11:39:08 ZEBRA: snmp[info]: NET-SNMP version 5.4.3 AgentX subagent connected
Then, you can use the following command to check everything works as expected: Then, you can use the following command to check everything works as expected:
:: ::
# snmpwalk -c public -v1 localhost .1.3.6.1.2.1.14.1.1 # snmpwalk -c public -v1 localhost .1.3.6.1.2.1.14.1.1
OSPF-MIB::ospfRouterId.0 = IpAddress: 192.168.42.109 OSPF-MIB::ospfRouterId.0 = IpAddress: 192.168.42.109
[...] [...]
The AgentX protocol can be transported over a Unix socket or using TCP or UDP. The AgentX protocol can be transported over a Unix socket or using TCP or UDP.
@ -88,10 +89,9 @@ need to configure FRR to use another transport, you can configure it through
:: ::
/etc/snmp/frr.conf: [snmpd]
[snmpd] # Use a remote master agent
# Use a remote master agent agentXSocket tcp:192.168.15.12:705
agentXSocket tcp:192.168.15.12:705
.. _smux-configuration: .. _smux-configuration:
@ -112,26 +112,24 @@ 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 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. the below snmpd.conf as wrong access restrictions can be hard to debug.
:: :file:`/etc/snmp/snmpd.conf`:
#
# example access restrictions setup
#
com2sec readonly default public
group MyROGroup v1 readonly
view all included .1 80
access MyROGroup "" any noauth exact all none none
#
# the following line is relevant for FRR
#
smuxpeer .1.3.6.1.4.1.3317.1.2.5 frr_ospfd
/etc/snmp/snmpd.conf: :file:`/etc/frr/ospf`:
# ! ... the rest of ospfd.conf has been omitted for clarity ...
# example access restrictions setup !
# smux peer .1.3.6.1.4.1.3317.1.2.5 frr_ospfd
com2sec readonly default public !
group MyROGroup v1 readonly
view all included .1 80
access MyROGroup "" any noauth exact all none none
#
# the following line is relevant for FRR
#
smuxpeer .1.3.6.1.4.1.3317.1.2.5 frr_ospfd
/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
!
After restarting snmpd and frr, a successful connection can be verified in the After restarting snmpd and frr, a successful connection can be verified in the

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 below. You can of course do all sorts of things when handling traps, like sound
a siren, have your display flash, etc., be creative ;). a siren, have your display flash, etc., be creative ;).
:: .. code-block:: shell
#!/bin/bash #!/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 Enter VNC configuration mode for specifying VNC default behaviors. Use
`exit-vnc` to leave VNC configuration mode. `vnc defaults` is optional. `exit-vnc` to leave VNC configuration mode. `vnc defaults` is optional.
:: .. code-block:: frr
vnc defaults vnc defaults
... various VNC defaults ... various VNC defaults
@ -142,7 +142,7 @@ Defaults section.
Enter VNC configuration mode for defining the NVE group `name`. Enter VNC configuration mode for defining the NVE group `name`.
Use `exit` or `exit-vnc` to exit group configuration mode. Use `exit` or `exit-vnc` to exit group configuration mode.
:: .. code-block:: frr
vnc nve-group group1 vnc nve-group group1
... configuration commands ... configuration commands
@ -315,7 +315,7 @@ L2 Group Configuration.
Enter VNC configuration mode for defining the L2 group `name`. Enter VNC configuration mode for defining the L2 group `name`.
Use `exit` or `exit-vnc` to exit group configuration mode. Use `exit` or `exit-vnc` to exit group configuration mode.
:: .. code-block:: frr
vnc l2-group group1 vnc l2-group group1
... configuration commands ... configuration commands
@ -851,7 +851,9 @@ Tunnel Encapsulation Attribute.
A three-way full mesh with three NVEs per NVA. 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 router bgp 64512
@ -883,7 +885,9 @@ Tunnel Encapsulation Attribute.
exit 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 router bgp 64512
@ -905,7 +909,9 @@ Tunnel Encapsulation Attribute.
exit-vnc exit-vnc
exit 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 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 connected (registering) NVE. Exporting VNC routes as IPv4 unicast is enabled
with the ``vnc export`` command below. 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 router bgp 64512
bgp router-id 192.168.1.101 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 by default and this prevents the other VNC-GW and NVAs from learning unicast
routes advertised by the route-reflector clients. routes advertised by the route-reflector clients.
Configuration for ``NVA 2``::: Configuration for ``NVA 2``:
.. code-block:: frr
router bgp 64512 router bgp 64512
bgp router-id 192.168.1.104 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 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``. 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 router bgp 64512
@ -1106,7 +1118,9 @@ As in the example of :ref:`vnc-mesh-nva-config`, there are two NVE groups. The
exit 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 router bgp 64512
@ -1126,28 +1140,30 @@ As in the example of :ref:`vnc-mesh-nva-config`, there are two NVE groups. The
exit-vnc exit-vnc
exit exit
:file:`bgpd.conf` for ``NVA 2`` on 192.168.1.102::: :file:`bgpd.conf` for ``NVA 2`` on 192.168.1.102:
router bgp 64512 .. code-block:: frr
bgp router-id 192.168.1.102 router bgp 64512
neighbor 192.168.1.100 remote-as 64512 bgp router-id 192.168.1.102
address-family ipv4 vpn neighbor 192.168.1.100 remote-as 64512
neighbor 192.168.1.100 activate
exit-address-family
vnc defaults address-family ipv4 vpn
rd 64512:1 neighbor 192.168.1.100 activate
response-lifetime 200 exit-address-family
rt both 1000:1 1000:2
exit-vnc
vnc nve-group group1 vnc defaults
prefix vn 172.16.128.0/17 rd 64512:1
exit-vnc response-lifetime 200
exit rt both 1000:1 1000:2
exit-vnc
vnc nve-group group1
prefix vn 172.16.128.0/17
exit-vnc
exit
While not shown, an NVA can also be configured as a route reflector. While not shown, an NVA can also be configured as a route reflector.
@ -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 router bgp 64512
@ -1238,7 +1256,9 @@ VNC-relevant configuration is provided.
exit-vnc exit-vnc
exit 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 router bgp 64512
@ -1277,7 +1297,9 @@ reflector configuration. BGP route reflectors ``BGP Route Reflector 1`` and
FRR-based NVA with redundant route reflectors 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 router bgp 64512
@ -1304,29 +1326,33 @@ reflector configuration. BGP route reflectors ``BGP Route Reflector 1`` and
exit-address-family exit-address-family
exit exit
:file:`bgpd.conf` for ``NVA 2`` on 192.168.1.101::: :file:`bgpd.conf` for ``NVA 2`` on 192.168.1.101:
router bgp 64512 .. code-block:: frr
bgp router-id 192.168.1.101 router bgp 64512
neighbor 192.168.1.100 remote-as 64512 bgp router-id 192.168.1.101
neighbor 192.168.1.104 remote-as 64512
address-family ipv4 vpn neighbor 192.168.1.100 remote-as 64512
neighbor 192.168.1.100 activate neighbor 192.168.1.104 remote-as 64512
neighbor 192.168.1.104 activate
exit-address-family
vnc nve-group group1 address-family ipv4 vpn
prefix vn 172.16.0.0/17 neighbor 192.168.1.100 activate
rd 64512:1 neighbor 192.168.1.104 activate
response-lifetime 200 exit-address-family
rt both 1000:1 1000:2
exit-vnc
exit
:file:`bgpd.conf` for ``NVA 3`` on 192.168.1.102::: vnc nve-group group1
prefix vn 172.16.0.0/17
rd 64512:1
response-lifetime 200
rt both 1000:1 1000:2
exit-vnc
exit
:file:`bgpd.conf` for ``NVA 3`` on 192.168.1.102:
.. code-block:: frr
router bgp 64512 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 of the eight-octet route distinguisher generated for Ethernet / L2
advertisements. The first octet is a constant 0xFF, and the third advertisements. The first octet is a constant 0xFF, and the third
through eighth octets are set to the L2 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 .. program:: zebra
.. option:: -b .. option:: -b, --batch
.. option:: --batch
Runs in batch mode. *zebra* parses configuration file and terminates Runs in batch mode. *zebra* parses configuration file and terminates
immediately. immediately.
.. option:: -k .. option:: -k, --keep_kernel
.. option:: --keep_kernel
When zebra starts up, don't delete old self inserted routes. When zebra starts up, don't delete old self inserted routes.
.. option:: -r .. option:: -r, --retain
.. option:: --retain
When program terminates, retain routes added by zebra. When program terminates, retain routes added by zebra.
@ -243,7 +240,8 @@ defines static prefix and gateway.
Some example configuration: Some example configuration:
:: .. code-block:: frr
ip route 10.0.0.0/8 10.0.0.2 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 ppp0
ip route 10.0.0.0/8 null0 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 A.B.C.D format, user must define NETMASK value with A.B.C.D
format. GATEWAY is same option as above command. 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 10.0.0.2
ip route 10.0.0.0 255.255.255.0 ppp0 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. 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.2
ip route 10.0.0.1/32 10.0.0.3 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 * 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.2
ip route 10.0.0.0/8 10.0.0.3 ip route 10.0.0.0/8 10.0.0.3
@ -376,30 +374,30 @@ unicast topology!
MODE sets the method used to perform RPF lookups. Supported modes: 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. 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. 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, Tries to perform the lookup on the Multicast RIB. If any route is found,
that route is used. Otherwise, the Unicast RIB is tried. 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 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 with the lower administrative distance is used; if they're equal, the
Multicast RIB takes precedence. Multicast RIB takes precedence.
longer-prefix longer-prefix
Performs a lookup on the Multicast RIB and Unicast RIB each. The result 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 with the longer prefix length is used; if they're equal, the
Multicast RIB takes precedence. Multicast RIB takes precedence.
The `mrib-then-urib` setting is the default behavior if nothing is The `mrib-then-urib` setting is the default behavior if nothing is
configured. If this is the desired behavior, it should be explicitly configured. If this is the desired behavior, it should be explicitly
configured to make the configuration immune against possible changes in configured to make the configuration immune against possible changes in
what the default behavior is. what the default behavior is.
.. warning:: .. warning::
Unreachable routes do not receive special treatment and do not cause Unreachable routes do not receive special treatment and do not cause
@ -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 that sets the preferred source address, and applies the route-map to all
*rip* routes. *rip* routes.
:: .. code-block:: frr
ip prefix-list ANY permit 0.0.0.0/0 le 32 ip prefix-list ANY permit 0.0.0.0/0 le 32
route-map RM1 permit 10 route-map RM1 permit 10