diff options
Diffstat (limited to 'doc/developer')
| -rw-r--r-- | doc/developer/building-doc.rst | 62 | ||||
| -rw-r--r-- | doc/developer/building-frr-for-ubuntu2004.rst | 161 | ||||
| -rw-r--r-- | doc/developer/building-frr-for-ubuntu2204.rst | 162 | ||||
| -rw-r--r-- | doc/developer/building-frr-for-ubuntu2404.rst | 4 | ||||
| -rw-r--r-- | doc/developer/building-frr-for-ubuntu2x04.rst | 162 | ||||
| -rw-r--r-- | doc/developer/mgmtd-dev.rst | 13 | ||||
| -rw-r--r-- | doc/developer/packaging-redhat.rst | 15 | ||||
| -rw-r--r-- | doc/developer/sbfd.rst | 143 | ||||
| -rw-r--r-- | doc/developer/subdir.am | 2 |
9 files changed, 395 insertions, 329 deletions
diff --git a/doc/developer/building-doc.rst b/doc/developer/building-doc.rst new file mode 100644 index 0000000000..bf0544ccc8 --- /dev/null +++ b/doc/developer/building-doc.rst @@ -0,0 +1,62 @@ +Building Documentation +====================== + +To build FRR documentation, first install the dependencies. +Notice that if you plan to only build html documenation, you only +need the package ``python3-sphinx``. + +.. code-block:: console + + sudo apt-get install -y python3-sphinx \ + texlive-latex-base texlive-latex-extra latexmk + +To prepate for building both user and developer documentation, do: + +.. code-block:: console + + cd doc + make + +User documentation +------------------ + +To build html user documentation: + +.. code-block:: console + + cd user + make html + +This will generate html documentation files under ``_build/html/``. +With the main page named ``index.html``. + +PFD can then be built by: + +.. code-block:: console + + cd user + make pdf + +The generated PDF file will be saved at ``_build/latex/FRR.pdf`` + +Developer documentation +----------------------- + +To build the developer documentation: + +.. code-block:: console + + cd developer + make html + +This will generate html documentation files under ``_build/html/``. +With the main page named ``index.html``. + +PFD can then be built by: + +.. code-block:: console + + cd developer + make pdf + +The generated PDF file will be saved at ``_build/latex/FRR.pdf`` diff --git a/doc/developer/building-frr-for-ubuntu2004.rst b/doc/developer/building-frr-for-ubuntu2004.rst index 3db97c4b2d..19353e317d 100644 --- a/doc/developer/building-frr-for-ubuntu2004.rst +++ b/doc/developer/building-frr-for-ubuntu2004.rst @@ -1,163 +1,4 @@ Ubuntu 20.04 LTS ================ -This document describes installation from source. If you want to build a -``deb``, see :ref:`packaging-debian`. - -Installing Dependencies ------------------------ - -.. code-block:: console - - sudo apt update - sudo apt-get install \ - git autoconf automake libtool make libreadline-dev texinfo \ - pkg-config libpam0g-dev libjson-c-dev bison flex \ - libc-ares-dev python3-dev python3-sphinx \ - install-info build-essential libsnmp-dev perl \ - protobuf-c-compiler libprotobuf-c-dev \ - libcap-dev libelf-dev libunwind-dev - -.. include:: building-libunwind-note.rst - -.. include:: building-libyang.rst - -GRPC -^^^^ -If GRPC is enabled using ``--enable-grpc`` the following packages should be -installed. - -.. code-block:: console - - sudo apt-get install libgrpc++-dev protobuf-compiler-grpc - - -Config Rollbacks -^^^^^^^^^^^^^^^^ - -If config rollbacks are enabled using ``--enable-config-rollbacks`` -the sqlite3 developer package also should be installed. - -.. code-block:: console - - sudo apt install libsqlite3-dev - - -ZeroMQ -^^^^^^ - -.. code-block:: console - - sudo apt-get install libzmq5 libzmq3-dev - -Building & Installing FRR -------------------------- - -Add FRR user and groups -^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: console - - sudo groupadd -r -g 92 frr - sudo groupadd -r -g 85 frrvty - sudo adduser --system --ingroup frr --home /var/run/frr/ \ - --gecos "FRR suite" --shell /sbin/nologin frr - sudo usermod -a -G frrvty frr - -Compile -^^^^^^^ - -.. include:: include-compile.rst - -Install FRR configuration files -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: console - - sudo install -m 775 -o frr -g frr -d /var/log/frr - sudo install -m 775 -o frr -g frrvty -d /etc/frr - sudo install -m 640 -o frr -g frrvty tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf - sudo install -m 640 -o frr -g frr tools/etc/frr/frr.conf /etc/frr/frr.conf - sudo install -m 640 -o frr -g frr tools/etc/frr/daemons.conf /etc/frr/daemons.conf - sudo install -m 640 -o frr -g frr tools/etc/frr/daemons /etc/frr/daemons - -Tweak sysctls -^^^^^^^^^^^^^ - -Some sysctls need to be changed in order to enable IPv4/IPv6 forwarding and -MPLS (if supported by your platform). If your platform does not support MPLS, -skip the MPLS related configuration in this section. - -Edit :file:`/etc/sysctl.conf` and uncomment the following values (ignore the -other settings): - -:: - - # Uncomment the next line to enable packet forwarding for IPv4 - net.ipv4.ip_forward=1 - - # Uncomment the next line to enable packet forwarding for IPv6 - # Enabling this option disables Stateless Address Autoconfiguration - # based on Router Advertisements for this host - net.ipv6.conf.all.forwarding=1 - -Reboot or use ``sysctl -p`` to apply the same config to the running system. - -Add MPLS kernel modules -""""""""""""""""""""""" - -Ubuntu 20.04 ships with kernel 5.4; MPLS modules are present by default. To -enable, add the following lines to :file:`/etc/modules-load.d/modules.conf`: - -:: - - # Load MPLS Kernel Modules - mpls_router - mpls_iptunnel - - -And load the kernel modules on the running system: - -.. code-block:: console - - sudo modprobe mpls-router mpls-iptunnel - -If the above command returns an error, you may need to install the appropriate -or latest linux-modules-extra-<kernel-version>-generic package. For example -``apt-get install linux-modules-extra-`uname -r`-generic`` - -Enable MPLS Forwarding -"""""""""""""""""""""" - -Edit :file:`/etc/sysctl.conf` and the following lines. Make sure to add a line -equal to :file:`net.mpls.conf.eth0.input` for each interface used with MPLS. - -:: - - # Enable MPLS Label processing on all interfaces - net.mpls.conf.eth0.input=1 - net.mpls.conf.eth1.input=1 - net.mpls.conf.eth2.input=1 - net.mpls.platform_labels=100000 - -Install service files -^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: console - - sudo install -m 644 tools/frr.service /etc/systemd/system/frr.service - sudo systemctl enable frr - -Enable daemons -^^^^^^^^^^^^^^ - -Open :file:`/etc/frr/daemons` with your text editor of choice. Look for the -section with ``watchfrr_enable=...`` and ``zebra=...`` etc. Enable the daemons -as required by changing the value to ``yes``. - -Start FRR -^^^^^^^^^ - -.. code-block:: shell - - systemctl start frr +.. include:: building-frr-for-ubuntu2x04.rst diff --git a/doc/developer/building-frr-for-ubuntu2204.rst b/doc/developer/building-frr-for-ubuntu2204.rst index c898c3cd2c..726cf0a911 100644 --- a/doc/developer/building-frr-for-ubuntu2204.rst +++ b/doc/developer/building-frr-for-ubuntu2204.rst @@ -1,164 +1,4 @@ Ubuntu 22.04 LTS ================ -This document describes installation from source. If you want to build a -``deb``, see :ref:`packaging-debian`. - -Installing Dependencies ------------------------ - -.. code-block:: console - - sudo apt update - sudo apt-get install \ - git autoconf automake libtool make libreadline-dev texinfo \ - pkg-config libpam0g-dev libjson-c-dev bison flex \ - libc-ares-dev python3-dev python3-sphinx \ - install-info build-essential libsnmp-dev perl \ - libcap-dev libelf-dev libunwind-dev \ - protobuf-c-compiler libprotobuf-c-dev - -.. include:: building-libunwind-note.rst - -.. include:: building-libyang.rst - -GRPC -^^^^ -If GRPC is enabled using ``--enable-grpc`` the following packages should be -installed. - -.. code-block:: console - - sudo apt-get install libgrpc++-dev protobuf-compiler-grpc - - -Config Rollbacks -^^^^^^^^^^^^^^^^ - -If config rollbacks are enabled using ``--enable-config-rollbacks`` -the sqlite3 developer package also should be installed. - -.. code-block:: console - - sudo apt install libsqlite3-dev - - -ZeroMQ -^^^^^^ -This is optional - -.. code-block:: console - - sudo apt-get install libzmq5 libzmq3-dev - -Building & Installing FRR -------------------------- - -Add FRR user and groups -^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: console - - sudo groupadd -r -g 92 frr - sudo groupadd -r -g 85 frrvty - sudo adduser --system --ingroup frr --home /var/run/frr/ \ - --gecos "FRR suite" --shell /sbin/nologin frr - sudo usermod -a -G frrvty frr - -Compile -^^^^^^^ - -.. include:: include-compile.rst - -Install FRR configuration files -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: console - - sudo install -m 775 -o frr -g frr -d /var/log/frr - sudo install -m 775 -o frr -g frrvty -d /etc/frr - sudo install -m 640 -o frr -g frrvty tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf - sudo install -m 640 -o frr -g frr tools/etc/frr/frr.conf /etc/frr/frr.conf - sudo install -m 640 -o frr -g frr tools/etc/frr/daemons.conf /etc/frr/daemons.conf - sudo install -m 640 -o frr -g frr tools/etc/frr/daemons /etc/frr/daemons - -Tweak sysctls -^^^^^^^^^^^^^ - -Some sysctls need to be changed in order to enable IPv4/IPv6 forwarding and -MPLS (if supported by your platform). If your platform does not support MPLS, -skip the MPLS related configuration in this section. - -Edit :file:`/etc/sysctl.conf` and uncomment the following values (ignore the -other settings): - -:: - - # Uncomment the next line to enable packet forwarding for IPv4 - net.ipv4.ip_forward=1 - - # Uncomment the next line to enable packet forwarding for IPv6 - # Enabling this option disables Stateless Address Autoconfiguration - # based on Router Advertisements for this host - net.ipv6.conf.all.forwarding=1 - -Reboot or use ``sysctl -p`` to apply the same config to the running system. - -Add MPLS kernel modules -""""""""""""""""""""""" - -Ubuntu 20.04 ships with kernel 5.4; MPLS modules are present by default. To -enable, add the following lines to :file:`/etc/modules-load.d/modules.conf`: - -:: - - # Load MPLS Kernel Modules - mpls_router - mpls_iptunnel - - -And load the kernel modules on the running system: - -.. code-block:: console - - sudo modprobe mpls-router mpls-iptunnel - -If the above command returns an error, you may need to install the appropriate -or latest linux-modules-extra-<kernel-version>-generic package. For example -``apt-get install linux-modules-extra-`uname -r`-generic`` - -Enable MPLS Forwarding -"""""""""""""""""""""" - -Edit :file:`/etc/sysctl.conf` and the following lines. Make sure to add a line -equal to :file:`net.mpls.conf.eth0.input` for each interface used with MPLS. - -:: - - # Enable MPLS Label processing on all interfaces - net.mpls.conf.eth0.input=1 - net.mpls.conf.eth1.input=1 - net.mpls.conf.eth2.input=1 - net.mpls.platform_labels=100000 - -Install service files -^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: console - - sudo install -m 644 tools/frr.service /etc/systemd/system/frr.service - sudo systemctl enable frr - -Enable daemons -^^^^^^^^^^^^^^ - -Open :file:`/etc/frr/daemons` with your text editor of choice. Look for the -section with ``watchfrr_enable=...`` and ``zebra=...`` etc. Enable the daemons -as required by changing the value to ``yes``. - -Start FRR -^^^^^^^^^ - -.. code-block:: shell - - systemctl start frr +.. include:: building-frr-for-ubuntu2x04.rst diff --git a/doc/developer/building-frr-for-ubuntu2404.rst b/doc/developer/building-frr-for-ubuntu2404.rst new file mode 100644 index 0000000000..e6b264993c --- /dev/null +++ b/doc/developer/building-frr-for-ubuntu2404.rst @@ -0,0 +1,4 @@ +Ubuntu 24.04 LTS +================ + +.. include:: building-frr-for-ubuntu2x04.rst diff --git a/doc/developer/building-frr-for-ubuntu2x04.rst b/doc/developer/building-frr-for-ubuntu2x04.rst new file mode 100644 index 0000000000..78b45e141e --- /dev/null +++ b/doc/developer/building-frr-for-ubuntu2x04.rst @@ -0,0 +1,162 @@ + +This document describes installation from source. If you want to build a +``deb``, see :ref:`packaging-debian`. + +Installing Dependencies +----------------------- + +.. code-block:: console + + sudo apt update + sudo apt-get install \ + git autoconf automake libtool make libreadline-dev texinfo \ + pkg-config libpam0g-dev libjson-c-dev bison flex \ + libc-ares-dev python3-dev python3-sphinx \ + install-info build-essential libsnmp-dev perl \ + libcap-dev libelf-dev libunwind-dev \ + protobuf-c-compiler libprotobuf-c-dev + +.. include:: building-libunwind-note.rst + +.. include:: building-libyang.rst + +GRPC +^^^^ +If GRPC is enabled using ``--enable-grpc`` the following packages should be +installed. + +.. code-block:: console + + sudo apt-get install libgrpc++-dev protobuf-compiler-grpc + + +Config Rollbacks +^^^^^^^^^^^^^^^^ + +If config rollbacks are enabled using ``--enable-config-rollbacks`` +the sqlite3 developer package also should be installed. + +.. code-block:: console + + sudo apt install libsqlite3-dev + + +ZeroMQ +^^^^^^ +This is optional + +.. code-block:: console + + sudo apt-get install libzmq5 libzmq3-dev + +Building & Installing FRR +------------------------- + +Add FRR user and groups +^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: console + + sudo groupadd -r -g 92 frr + sudo groupadd -r -g 85 frrvty + sudo adduser --system --ingroup frr --home /var/run/frr/ \ + --gecos "FRR suite" --shell /sbin/nologin frr + sudo usermod -a -G frrvty frr + +Compile +^^^^^^^ + +.. include:: include-compile.rst + +Install FRR configuration files +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: console + + sudo install -m 775 -o frr -g frr -d /var/log/frr + sudo install -m 775 -o frr -g frrvty -d /etc/frr + sudo install -m 640 -o frr -g frrvty tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf + sudo install -m 640 -o frr -g frr tools/etc/frr/frr.conf /etc/frr/frr.conf + sudo install -m 640 -o frr -g frr tools/etc/frr/daemons.conf /etc/frr/daemons.conf + sudo install -m 640 -o frr -g frr tools/etc/frr/daemons /etc/frr/daemons + +Tweak sysctls +^^^^^^^^^^^^^ + +Some sysctls need to be changed in order to enable IPv4/IPv6 forwarding and +MPLS (if supported by your platform). If your platform does not support MPLS, +skip the MPLS related configuration in this section. + +Edit :file:`/etc/sysctl.conf` and uncomment the following values (ignore the +other settings): + +:: + + # Uncomment the next line to enable packet forwarding for IPv4 + net.ipv4.ip_forward=1 + + # Uncomment the next line to enable packet forwarding for IPv6 + # Enabling this option disables Stateless Address Autoconfiguration + # based on Router Advertisements for this host + net.ipv6.conf.all.forwarding=1 + +Reboot or use ``sysctl -p`` to apply the same config to the running system. + +Add MPLS kernel modules +""""""""""""""""""""""" + +Ubuntu 20.04 ships with kernel 5.4; MPLS modules are present by default. To +enable, add the following lines to :file:`/etc/modules-load.d/modules.conf`: + +:: + + # Load MPLS Kernel Modules + mpls_router + mpls_iptunnel + + +And load the kernel modules on the running system: + +.. code-block:: console + + sudo modprobe mpls-router mpls-iptunnel + +If the above command returns an error, you may need to install the appropriate +or latest linux-modules-extra-<kernel-version>-generic package. For example +``apt-get install linux-modules-extra-`uname -r`-generic`` + +Enable MPLS Forwarding +"""""""""""""""""""""" + +Edit :file:`/etc/sysctl.conf` and the following lines. Make sure to add a line +equal to :file:`net.mpls.conf.eth0.input` for each interface used with MPLS. + +:: + + # Enable MPLS Label processing on all interfaces + net.mpls.conf.eth0.input=1 + net.mpls.conf.eth1.input=1 + net.mpls.conf.eth2.input=1 + net.mpls.platform_labels=100000 + +Install service files +^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: console + + sudo install -m 644 tools/frr.service /etc/systemd/system/frr.service + sudo systemctl enable frr + +Enable daemons +^^^^^^^^^^^^^^ + +Open :file:`/etc/frr/daemons` with your text editor of choice. Look for the +section with ``watchfrr_enable=...`` and ``zebra=...`` etc. Enable the daemons +as required by changing the value to ``yes``. + +Start FRR +^^^^^^^^^ + +.. code-block:: shell + + systemctl start frr diff --git a/doc/developer/mgmtd-dev.rst b/doc/developer/mgmtd-dev.rst index 4c56cadb28..6cbd617f8c 100644 --- a/doc/developer/mgmtd-dev.rst +++ b/doc/developer/mgmtd-dev.rst @@ -160,14 +160,19 @@ Back-End Interface: should be destroyed with a call to `mgmt_be_client_destroy` and to be safe NULL out the global `mgmt_be_client` variable. -#. In ``mgmtd/mgmt_be_adapter.c`` add xpath prefix mappings to a one or both - mapping arrays (``be_client_config_xpaths`` and ``be_client_oper_xpaths``) to - direct ``mgmtd`` to send config and oper-state requests to your daemon. NOTE: - make sure to include library supported xpaths prefixes as well (e.g., +#. In ``mgmtd/mgmt_be_adapter.c`` add xpath prefix mappings to a each of the + mapping arrays (``be_client_config_xpaths``, ``be_client_oper_xpaths``, and + ``be_client_rpc_xpaths``) to direct ``mgmtd`` to send config, oper-state, and + RPC requests to your daemon. + + NOTE: make sure to include library supported xpaths prefixes as well (e.g., "/frr-interface:lib"). A good way to figure these paths out are to look in each of the YANG modules that the daemon uses and include each of their paths in the array. +#. In ``python/xref2vtysh.py`` add ``VTYSH_xxxD`` (for client xxx) to + ``lib/mgmt_be_client.c`` entry in the ``daemon_falgs`` dictionary. + Add YANG and CLI into MGMTD ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/developer/packaging-redhat.rst b/doc/developer/packaging-redhat.rst index 8037873461..277de5d16f 100644 --- a/doc/developer/packaging-redhat.rst +++ b/doc/developer/packaging-redhat.rst @@ -3,7 +3,7 @@ Packaging Red Hat ================= -Tested on CentOS 6, CentOS 7, CentOS 8 and Fedora 24. +Tested on CentOS 6, CentOS 7, Rocky 8 and Fedora 24. 1. On CentOS 6, refer to :ref:`building-centos6` for details on installing sufficiently up-to-date package versions to enable building FRR. @@ -18,14 +18,14 @@ Tested on CentOS 6, CentOS 7, CentOS 8 and Fedora 24. yum install rpm-build net-snmp-devel pam-devel libcap-devel - For CentOS 7 and CentOS 8, the package will be built using python3 + For CentOS 7 and Rocky 8, the package will be built using python3 and requires additional python3 packages:: yum install python3-devel python3-sphinx .. note:: - For CentOS 8 you need to install ``platform-python-devel`` package + For Rocky 8 you need to install ``platform-python-devel`` package to provide ``/usr/bin/pathfix.py``:: yum install platform-python-devel @@ -33,7 +33,7 @@ Tested on CentOS 6, CentOS 7, CentOS 8 and Fedora 24. If ``yum`` is not present on your system, use ``dnf`` instead. - You should enable ``PowerTools`` repo if using CentOS 8 which + You should enable ``PowerTools`` repo if using Rocky 8 which is disabled by default. 4. Checkout FRR:: @@ -88,11 +88,18 @@ Tested on CentOS 6, CentOS 7, CentOS 8 and Fedora 24. %{!?with_watchfrr: %global with_watchfrr 1 } %{!?with_pathd: %global with_pathd 1 } %{!?with_grpc: %global with_grpc 0 } + %{!?with_rpki: %global with_rpki 1 } + %{!?with_docs: %global with_docs 1 } 8. Build the RPM:: rpmbuild --define "_topdir `pwd`/rpmbuild" -ba rpmbuild/SPECS/frr.spec + To override :file:`rpm/SPECS/frr.spec` defaults on the rpmbuild + commandline with: + + rpmbuild --define 'variable value' + If building with RPKI, then download and install the additional RPKI packages from https://ci1.netdef.org/browse/RPKI-RTRLIB/latestSuccessful/artifact diff --git a/doc/developer/sbfd.rst b/doc/developer/sbfd.rst new file mode 100644 index 0000000000..66a3b48dba --- /dev/null +++ b/doc/developer/sbfd.rst @@ -0,0 +1,143 @@ +.. _sbfd: + +**** +SBFD +**** + +:abbr:`SBFD (Seamless Bidirectional Forwarding Detection)` is: + + Seamless Bidirectional Forwarding Detection, a simplified mechanism for using BFD with a large + proportion of negotiation aspects eliminated, thus providing benefits + such as quick provisioning, as well as improved control and + flexibility for network nodes initiating path monitoring. + + -- :rfc:`7880` + +It is described and extended by the following RFCs: + +* :rfc:`7880` +* :rfc:`7881` + +.. _sbfd-sate-machine: + +SBFD state machine +================== + +SBFD takes the same data packet format as BFD, but with a much simpler state machine. +According to RFC7880, SBFD has a stateless SBFDReflector and a stateful SBFDInitiator with the state machine as below: + +:: + + +--+ + ADMIN DOWN, | | + TIMER | V + +------+ UP +------+ + | |-------------------->| |----+ + | DOWN | | UP | | UP + | |<--------------------| |<---+ + +------+ ADMIN DOWN, +------+ + TIMER + + Figure 1: SBFDInitiator Finite State Machine + +.. _sbfd-extention: + +SBFD extension - SRv6 encapsulation +=================================== + +SBFDInitiator periodically send packets to monitor the connection to SBFDReflector. We set up an SBFD connection between the source and the destination node of a path, +with the source node serving as Initiator and the destination node as Reflector. The communicated SBFD packets should also follow every exact hop in the path, +from the source to the destination, which could be achieved by segment routing. This requirement extends the node verification to the path verification. + +.. _sbfd-implement: + +implementation +=============== + +Some considerations when implementing sbfd. + + + +.. _sbfd-implement-coexist: + +SBFD Co-exist with BFD +-------------------------- + +Both SBFD and Classical BFD have their unique discriminator, SBFD can co-exist with BFD since they sharing a same discriminator pool in bfdd. +Also in bfdd SBFD and BFD can share most code logic, SBFD packet and BFD packet are demultiplexed by different discriminators. + + +.. _sbfd-implement-bfdname: + +SBFD name +--------- + +We introduced a bfd-name for every sbfd session. A unique bfd-name can be used to identify a sbfd session quickly. This is quite useful in our Srv6 deployment for path protection case. +A bfd-name is always associated with a TE path, for example if we use the sbfd session to protect the path A-B-D, we would assign the name 'path-a-b-d' or 'a-b-d' to the session. + +Meanwhile bfdd will notify the sbfd status to the Pathd, we should add the bfd-name field in PTM bfd notify message ZEBRA_BFD_DEST_REPLAY: + +:: + + * Message format: + * - header: command, vrf + * - l: interface index + * - c: family + * - AF_INET: + * - 4 bytes: ipv4 + * - AF_INET6: + * - 16 bytes: ipv6 + * - c: prefix length + * - l: bfd status + * - c: family + * - AF_INET: + * - 4 bytes: ipv4 + * - AF_INET6: + * - 16 bytes: ipv6 + * - c: prefix length + * - c: cbit + * - c: bfd name len <---- new field + * - Xbytes: bfd name <---- new field + * + * Commands: ZEBRA_BFD_DEST_REPLAY + * + * q(64), l(32), w(16), c(8) + + + +.. _sbfd-implement-port: + +SBFD UDP port +------------- + +According to RFC7881, SBFD Control packet dst port should be 7784, src port can be any but NOT 7784. In our implementation, the UDP ports in packet are set as: + + +:: + + UDP(sport=4784, dport=7784)/BFD() or UDP(sport=3784, dport=7784)/BFD() + +if "multihop" is specified for sbfd initiator we choose the 4784 as the source port, so the reflected packet will take 4784 as the dst port, this is a local BFD_MULTI_HOP_PORT so the reflected packet can be handled by the existing bfd_recv_cb function. +if "multihop" is not specified for sbfd initiator we choose the 3784 as the source port, this is a local BFD_DEFDESTPORT so the reflected packet can be handled by the existing bfd_recv_cb function. + + +For echo SBFD with SRv6 encapsulation case, we re-use the BFD Echo port, the UDP ports in packet are set as: + +:: + + UDP(sport=3785, dport=3785)/BFD() + + +we choose the 3785 as the source port, so the echo back packet will take 3785 as the dst port, this is a local BFD_DEF_ECHO_PORT so the packet can be handled by the existing bfd_recv_cb function. + + +.. _sbfd-not-implemented: + +Todo list for SBFD +------------------ + + Currently some features are not yet implemented for SBFD, will add it in future: + 1) SBFD in IPv4 only packet + 2) The ADMIN DOWN logic + 3) SBFD echo function in a initiator session + 4) SBFD over MPLS diff --git a/doc/developer/subdir.am b/doc/developer/subdir.am index 652ee4e1af..9f6986cd33 100644 --- a/doc/developer/subdir.am +++ b/doc/developer/subdir.am @@ -28,6 +28,7 @@ dev_RSTFILES = \ doc/developer/building-frr-for-ubuntu1804.rst \ doc/developer/building-frr-for-ubuntu2004.rst \ doc/developer/building-frr-for-ubuntu2204.rst \ + doc/developer/building-doc.rst \ doc/developer/building-libunwind-note.rst \ doc/developer/building-libyang.rst \ doc/developer/building.rst \ @@ -82,6 +83,7 @@ dev_RSTFILES = \ doc/developer/northbound/transactional-cli.rst \ doc/developer/northbound/yang-module-translator.rst \ doc/developer/northbound/yang-tools.rst \ + doc/developer/sbfd.rst \ # end EXTRA_DIST += \ |
