From: Quentin Young Date: Wed, 14 Mar 2018 18:56:03 +0000 (-0400) Subject: doc: cleanup some misc files X-Git-Tag: frr-5.0-dev~125^2~10 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=a37815575716751d9db1818573657019a0574188;p=matthieu%2Ffrr.git doc: cleanup some misc files * Translate plaintext stub documenting bgpd preprocessor constants for attributes into a RST file and include it in the doctree * Remove the Markdown version of the OSPF-API document, as I've already translated it into RST * Remove the Markdown version of the modules document, as I've already translated it into RST * Rename the various "Building_FRR_*" documents to match standard RST file conventions Signed-off-by: Quentin Young --- diff --git a/doc/developer/BGP-TypeCode b/doc/developer/BGP-TypeCode deleted file mode 100644 index b3218079cc..0000000000 --- a/doc/developer/BGP-TypeCode +++ /dev/null @@ -1,24 +0,0 @@ - - BGP-4[+] UPDATE Attribute TypeCode list - - Value Attribute References -========================================================================= - 1 ORIGIN [RFC 4271] - 2 AS_PATH [RFC 4271] - 3 NEXT_HOP [RFC 4271] - 4 MULTI_EXIT_DISC [RFC 4271] - 5 LOCAL_PREF [RFC 4271] - 6 ATOMIC_AGGREGATE [RFC 4271] - 7 AGGREGATOR [RFC 4271] - 8 COMMUNITIES [RFC 1997] - 9 ORIGINATOR_ID [RFC 4456] - 10 CLUSTER_LIST [RFC 4456] - 11 DPA [draft-ietf-idr-bgp-dpa-05.txt(expired)] - 12 ADVERTISER [RFC 1863] - 13 RCID_PATH [RFC 1863] - 14 MP_REACH_NLRI [RFC 4760] - 15 MP_UNREACH_NLRI [RFC 4760] - 16 EXT_COMMUNITIES [RFC 4360] - 17 AS4_PATH [RFC 4893] - 18 AS4_AGGREGATOR [RFC 4893] -========================================================================= diff --git a/doc/developer/Building_FRR_on_Alpine.rst b/doc/developer/Building_FRR_on_Alpine.rst deleted file mode 100644 index 27718bdc80..0000000000 --- a/doc/developer/Building_FRR_on_Alpine.rst +++ /dev/null @@ -1,47 +0,0 @@ -Building FRR dev packages on Alpine Linux from Git Source -========================================================= - -For building Alpine Linux dev packages, we use docker. - -Install docker 17.05 or later ------------------------------ - -Depending on your host, there are different ways of installing -docker. Refer to the documentation here for instructions on how -to install a free version of docker: https://www.docker.com/community-edition - -Work with sources ------------------ - - git clone https://github.com/frrouting/frr.git frr - cd frr - -Build apk packages ------------------- - - ./docker/alpine/build.sh - -This will put the apk packages in: - - ./docker/pkgs/apk/x86_64/ - -Usage ------ - -To add the packages to a docker image, create a Dockerfile in ./docker/pkgs: - - FROM alpine:3.7 - RUN mkdir -p /pkgs - ADD apk/ /pkgs/ - RUN apk add --no-cache --allow-untrusted /pkgs/x86_64/*.apk - -And build a docker image: - - docker build --rm --force-rm -t alpine-dev-pkgs:latest docker/pkgs - -And run the image: - - docker run -it --rm alpine-dev-pkgs:latest /bin/sh - -Currently, we only package the raw daemons and example files, so, you'll -need to run the daemons by hand (or, better, orchestrate in the Dockerfile). diff --git a/doc/developer/Building_FRR_on_CentOS6.rst b/doc/developer/Building_FRR_on_CentOS6.rst deleted file mode 100644 index 1c53ea6ba3..0000000000 --- a/doc/developer/Building_FRR_on_CentOS6.rst +++ /dev/null @@ -1,255 +0,0 @@ -CentOS 6 -======================================== - -(As an alternative to this installation, you may prefer to create a FRR -rpm package yourself and install that package instead. See instructions -in redhat/README.rpm\_build.md on how to build a rpm package) - -Instructions are tested with ``CentOS 6.8`` on ``x86_64`` platform - -Warning: --------- -``CentOS 6`` is very old and not fully supported by the FRR community -anymore. Building FRR takes multiple manual steps to update the build -system with newer packages than what's available from the archives. -However, the built packages can still be installed afterwards on -a standard ``CentOS 6`` without any special packages. - -Support for CentOS 6 is now on a best-effort base by the community. - -CentOS 6 restrictions: ----------------------- - -- PIMd is not supported on ``CentOS 6``. Upgrade to ``CentOS 7`` if - PIMd is needed -- MPLS is not supported on ``CentOS 6``. MPLS requires Linux Kernel 4.5 - or higher (LDP can be built, but may have limited use without MPLS) -- Zebra is unable to detect what bridge/vrf an interface is associcated - with (IFLA\_INFO\_SLAVE\_KIND does not exist in the kernel headers, - you can use a newer kernel + headers to get this functionality) -- frr\_reload.py will not work, as this requires Python 2.7, and CentOS - 6 only has 2.6. You can install Python 2.7 via IUS, but it won't work - properly unless you compile and install the ipaddr package for it. -- Building the package requires Sphinx >= 1.1. Only a non-standard - package provides a newer sphinx and requires manual installation - (see below) - - -Install required packages -------------------------- - -Add packages: - -:: - - sudo yum install git autoconf automake libtool make gawk \ - readline-devel texinfo net-snmp-devel groff pkgconfig \ - json-c-devel pam-devel flex epel-release perl-XML-LibXML \ - c-ares-devel - -Install newer version of bison (CentOS 6 package source is too old) from -CentOS 7 - -:: - - sudo yum install rpm-build - curl -O http://vault.centos.org/7.0.1406/os/Source/SPackages/bison-2.7-4.el7.src.rpm - rpmbuild --rebuild ./bison-2.7-4.el7.src.rpm - sudo yum install ./rpmbuild/RPMS/x86_64/bison-2.7-4.el6.x86_64.rpm - rm -rf rpmbuild - -Install newer version of autoconf and automake (Package versions are too -old) - -:: - - curl -O http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz - tar xvf autoconf-2.69.tar.gz - cd autoconf-2.69 - ./configure --prefix=/usr - make - sudo make install - cd .. - - curl -O http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz - tar xvf automake-1.15.tar.gz - cd automake-1.15 - ./configure --prefix=/usr - make - sudo make install - cd .. - -Install ``Python 2.7`` in parallel to default 2.6. Make sure you've -install EPEL (``epel-release`` as above). Then install current -``python27``, ``python27-devel`` and ``pytest`` - -:: - - sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm - sudo rpm -ivh https://centos6.iuscommunity.org/ius-release.rpm - sudo yum install python27 python27-pip python27-devel - sudo pip2.7 install pytest - -Please note that ``CentOS 6`` needs to keep python pointing to version -2.6 for ``yum`` to keep working, so don't create a symlink for python2.7 -to python - -Install newer ``Sphinx-Build`` based on ``Python 2.7`` - -Create a new repo ``/etc/yum.repos.d/puias6.repo`` with the following contents: - -:: - - ### Name: RPM Repository for RHEL 6 - PUIAS (used for Sphinx-Build) - ### URL: http://springdale.math.ias.edu/data/puias/computational - [puias-computational] - name = RPM Repository for RHEL 6 - Sphinx-Build - baseurl = http://springdale.math.ias.edu/data/puias/computational/$releasever/$basearch - #mirrorlist = - enabled = 1 - protect = 0 - gpgkey = - gpgcheck = 0 - -Update rpm database & Install newer sphinx - -:: - - sudo yum update - sudo yum install python27-sphinx - -Get FRR, compile it and install it (from Git) ---------------------------------------------- - -**This assumes you want to build and install FRR from source and not -using any packages** - -Add frr groups and user -~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo groupadd -g 92 frr - sudo groupadd -r -g 85 frrvt - sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \ - -c "FRR FRRouting suite" -d /var/run/frr frr - -Download Source, configure and compile it -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -(You may prefer different options on configure statement. These are just -an example.) - -:: - - git clone https://github.com/frrouting/frr.git frr - cd frr - ./bootstrap.sh - ./configure \ - --bindir=/usr/bin \ - --sbindir=/usr/lib/frr \ - --sysconfdir=/etc/frr \ - --libdir=/usr/lib/frr \ - --libexecdir=/usr/lib/frr \ - --localstatedir=/var/run/frr \ - --with-moduledir=/usr/lib/frr/modules \ - --disable-pimd \ - --enable-snmp=agentx \ - --enable-multipath=64 \ - --enable-ospfclient=yes \ - --enable-ospfapi=yes \ - --enable-user=frr \ - --enable-group=frr \ - --enable-vty-group=frrvt \ - --enable-rtadv \ - --disable-exampledir \ - --enable-watchfrr \ - --disable-ldpd \ - --enable-fpm \ - --enable-nhrpd \ - --enable-eigrpd \ - --enable-babeld \ - --with-pkg-git-version \ - --with-pkg-extra-version=-MyOwnFRRVersion - make SPHINXBUILD=sphinx-build2.7 - make check PYTHON=/usr/bin/python2.7 SPHINXBUILD=sphinx-build2.7 - sudo make SPHINXBUILD=sphinx-build2.7 install - -Create empty FRR configuration files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo mkdir /var/log/frr - sudo mkdir /etc/frr - sudo touch /etc/frr/zebra.conf - sudo touch /etc/frr/bgpd.conf - sudo touch /etc/frr/ospfd.conf - sudo touch /etc/frr/ospf6d.conf - sudo touch /etc/frr/isisd.conf - sudo touch /etc/frr/ripd.conf - sudo touch /etc/frr/ripngd.conf - sudo touch /etc/frr/nhrpd.conf - sudo touch /etc/frr/eigrpd.conf - sudo touch /etc/frr/babeld.conf - sudo chown -R frr:frr /etc/frr/ - sudo touch /etc/frr/vtysh.conf - sudo chown frr:frrvt /etc/frr/vtysh.conf - sudo chmod 640 /etc/frr/*.conf - -Install daemon config file -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo install -p -m 644 redhat/daemons /etc/frr/ - sudo chown frr:frr /etc/frr/daemons - -Edit /etc/frr/daemons as needed to select the required daemons -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Look for the section with ``watchfrr_enable=...`` and ``zebra=...`` etc. -Enable the daemons as required by changing the value to ``yes`` - -Enable IP & IPv6 forwarding -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Edit ``/etc/sysctl.conf`` and set the following values (ignore the other -settings) - -:: - - # Controls IP packet forwarding - net.ipv4.ip_forward = 1 - net.ipv6.conf.all.forwarding=1 - - # Controls source route verification - net.ipv4.conf.default.rp_filter = 0 - -Load the modifed sysctl's on the system: - -:: - - sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf - -Add init.d startup files -~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo install -p -m 755 redhat/frr.init /etc/init.d/frr - sudo chkconfig --add frr - -Enable frr daemon at startup -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo chkconfig frr on - -Start FRR manually (or reboot) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo /etc/init.d/frr start diff --git a/doc/developer/Building_FRR_on_CentOS7.rst b/doc/developer/Building_FRR_on_CentOS7.rst deleted file mode 100644 index 9807543e17..0000000000 --- a/doc/developer/Building_FRR_on_CentOS7.rst +++ /dev/null @@ -1,169 +0,0 @@ -CentOS 7 -======================================== - -(As an alternative to this installation, you may prefer to create a FRR -rpm package yourself and install that package instead. See instructions -in redhat/README.rpm\_build.md on how to build a rpm package) - -CentOS 7 restrictions: ----------------------- - -- MPLS is not supported on ``CentOS 7`` with default kernel. MPLS - requires Linux Kernel 4.5 or higher (LDP can be built, but may have - limited use without MPLS) - -Install required packages -------------------------- - -Add packages: - -:: - - sudo yum install git autoconf automake libtool make gawk \ - readline-devel texinfo net-snmp-devel groff pkgconfig \ - json-c-devel pam-devel bison flex pytest c-ares-devel \ - perl-XML-LibXML python-devel systemd-devel python-sphinx - -Get FRR, compile it and install it (from Git) ---------------------------------------------- - -**This assumes you want to build and install FRR from source and not -using any packages** - -Add frr groups and user -~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo groupadd -g 92 frr - sudo groupadd -r -g 85 frrvt - sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \ - -c "FRR FRRouting suite" -d /var/run/frr frr - -Download Source, configure and compile it -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -(You may prefer different options on configure statement. These are just -an example.) - -:: - - git clone https://github.com/frrouting/frr.git frr - cd frr - ./bootstrap.sh - ./configure \ - --bindir=/usr/bin \ - --sbindir=/usr/lib/frr \ - --sysconfdir=/etc/frr \ - --libdir=/usr/lib/frr \ - --libexecdir=/usr/lib/frr \ - --localstatedir=/var/run/frr \ - --with-moduledir=/usr/lib/frr/modules \ - --enable-pimd \ - --enable-snmp=agentx \ - --enable-multipath=64 \ - --enable-ospfclient=yes \ - --enable-ospfapi=yes \ - --enable-user=frr \ - --enable-group=frr \ - --enable-vty-group=frrvt \ - --enable-rtadv \ - --enable-systemd=yes \ - --disable-exampledir \ - --enable-watchfrr \ - --disable-ldpd \ - --enable-fpm \ - --enable-nhrpd \ - --enable-eigrpd \ - --enable-babeld \ - --with-pkg-git-version \ - --with-pkg-extra-version=-MyOwnFRRVersion - make - make check - sudo make install - -Create empty FRR configuration files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo mkdir /var/log/frr - sudo mkdir /etc/frr - sudo touch /etc/frr/zebra.conf - sudo touch /etc/frr/bgpd.conf - sudo touch /etc/frr/ospfd.conf - sudo touch /etc/frr/ospf6d.conf - sudo touch /etc/frr/isisd.conf - sudo touch /etc/frr/ripd.conf - sudo touch /etc/frr/ripngd.conf - sudo touch /etc/frr/pimd.conf - sudo touch /etc/frr/nhrpd.conf - sudo touch /etc/frr/eigrpd.conf - sudo touch /etc/frr/babeld.conf - sudo chown -R frr:frr /etc/frr/ - sudo touch /etc/frr/vtysh.conf - sudo chown frr:frrvt /etc/frr/vtysh.conf - sudo chmod 640 /etc/frr/*.conf - -Install daemon config file -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo install -p -m 644 redhat/daemons /etc/frr/ - sudo chown frr:frr /etc/frr/daemons - -Edit /etc/frr/daemons as needed to select the required daemons -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Look for the section with ``watchfrr_enable=...`` and ``zebra=...`` etc. -Enable the daemons as required by changing the value to ``yes`` - -Enable IP & IPv6 forwarding -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Create a new file ``/etc/sysctl.d/90-routing-sysctl.conf`` with the -following content: - -:: - - # Sysctl for routing - # - # Routing: We need to forward packets - net.ipv4.conf.all.forwarding=1 - net.ipv6.conf.all.forwarding=1 - -Load the modifed sysctl's on the system: - -:: - - sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf - -Install frr Service and redhat init files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo install -p -m 644 redhat/frr.service /usr/lib/systemd/system/frr.service - sudo install -p -m 755 redhat/frr.init /usr/lib/frr/frr - -Register the systemd files -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo systemctl preset frr.service - -Enable required frr at startup -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo systemctl enable frr - -Reboot or start FRR manually -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo systemctl start frr diff --git a/doc/developer/Building_FRR_on_Debian8.rst b/doc/developer/Building_FRR_on_Debian8.rst deleted file mode 100644 index 36ed0c4e66..0000000000 --- a/doc/developer/Building_FRR_on_Debian8.rst +++ /dev/null @@ -1,156 +0,0 @@ -Debian 8 -======================================== - -Debian 8 restrictions: ----------------------- - -- MPLS is not supported on ``Debian 8`` with default kernel. MPLS - requires Linux Kernel 4.5 or higher (LDP can be built, but may have - limited use without MPLS) - -Install required packages -------------------------- - -Add packages: - -:: - - sudo apt-get install git autoconf automake libtool make gawk \ - libreadline-dev texinfo libjson-c-dev pkg-config bison flex \ - python-pip libc-ares-dev python3-dev python3-sphinx - -Install newer pytest (>3.0) from pip - -:: - - sudo pip install pytest - -Get FRR, compile it and install it (from Git) ---------------------------------------------- - -**This assumes you want to build and install FRR from source and not -using any packages** - -Add frr groups and user -~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo addgroup --system --gid 92 frr - sudo addgroup --system --gid 85 frrvty - sudo adduser --system --ingroup frr --home /var/run/frr/ \ - --gecos "FRR suite" --shell /bin/false frr - sudo usermod -a -G frrvty frr - -Download Source, configure and compile it -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -(You may prefer different options on configure statement. These are just -an example.) - -:: - - git clone https://github.com/frrouting/frr.git frr - cd frr - ./bootstrap.sh - ./configure \ - --enable-exampledir=/usr/share/doc/frr/examples/ \ - --localstatedir=/var/run/frr \ - --sbindir=/usr/lib/frr \ - --sysconfdir=/etc/frr \ - --enable-vtysh \ - --enable-isisd \ - --enable-pimd \ - --enable-watchfrr \ - --enable-ospfclient=yes \ - --enable-ospfapi=yes \ - --enable-multipath=64 \ - --enable-user=frr \ - --enable-group=frr \ - --enable-vty-group=frrvty \ - --enable-configfile-mask=0640 \ - --enable-logfile-mask=0640 \ - --enable-rtadv \ - --enable-fpm \ - --enable-ldpd \ - --with-pkg-git-version \ - --with-pkg-extra-version=-MyOwnFRRVersion - make - make check - sudo make install - -Create empty FRR configuration files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo install -m 755 -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 frr /dev/null /etc/frr/zebra.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf - sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf - -Enable IP & IPv6 forwarding -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the -other settings) - -:: - - # 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 - -Troubleshooting -~~~~~~~~~~~~~~~ - -**Local state directory** - -The local state directory must exist and have the correct permissions -applied for the frrouting daemons to start. In the above ./configure -example the local state directory is set to /var/run/frr -(--localstatedir=/var/run/frr) Debian considers /var/run/frr to be -temporary and this is removed after a reboot. - -When using a different local state directory you need to create the new -directory and change the ownership to the frr user, for example: - -:: - - mkdir /var/opt/frr - chown frr /var/opt/frr - -**Shared library error** - -If you try and start any of the frrouting daemons you may see the below -error due to the frrouting shared library directory not being found: - -:: - - ./zebra: error while loading shared libraries: libfrr.so.0: cannot open shared object file: No such file or directory - -The fix is to add the following line to /etc/ld.so.conf which will -continue to reference the library directory after the system reboots. To -load the library directory path immediately run the ldconfig command -after adding the line to the file eg: - -:: - - echo include /usr/local/lib >> /etc/ld.so.conf - ldconfig diff --git a/doc/developer/Building_FRR_on_Debian9.rst b/doc/developer/Building_FRR_on_Debian9.rst deleted file mode 100644 index a1aa63236c..0000000000 --- a/doc/developer/Building_FRR_on_Debian9.rst +++ /dev/null @@ -1,131 +0,0 @@ -Debian 9 -======================================== - -Install required packages -------------------------- - -Add packages: - -:: - - sudo apt-get install git autoconf automake libtool make \ - libreadline-dev texinfo libjson-c-dev pkg-config bison flex \ - python-pip libc-ares-dev python3-dev python-pytest python3-sphinx - -Get FRR, compile it and install it (from Git) ---------------------------------------------- - -**This assumes you want to build and install FRR from source and not -using any packages** - -Add frr groups and user -~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo addgroup --system --gid 92 frr - sudo addgroup --system --gid 85 frrvty - sudo adduser --system --ingroup frr --home /var/opt/frr/ \ - --gecos "FRR suite" --shell /bin/false frr - sudo usermod -a -G frrvty frr - -Download Source, configure and compile it -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -(You may prefer different options on configure statement. These are just -an example.) - -:: - - git clone https://github.com/frrouting/frr.git frr - cd frr - git checkout stable/3.0 - ./bootstrap.sh - ./configure \ - --enable-exampledir=/usr/share/doc/frr/examples/ \ - --localstatedir=/var/opt/frr \ - --sbindir=/usr/lib/frr \ - --sysconfdir=/etc/frr \ - --enable-vtysh \ - --enable-isisd \ - --enable-pimd \ - --enable-watchfrr \ - --enable-ospfclient=yes \ - --enable-ospfapi=yes \ - --enable-multipath=64 \ - --enable-user=frr \ - --enable-group=frr \ - --enable-vty-group=frrvty \ - --enable-configfile-mask=0640 \ - --enable-logfile-mask=0640 \ - --enable-rtadv \ - --enable-fpm \ - --enable-ldpd \ - --with-pkg-git-version \ - --with-pkg-extra-version=-MyOwnFRRVersion - make - make check - sudo make install - -Create empty FRR configuration files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo install -m 755 -o frr -g frr -d /var/log/frr - sudo install -m 755 -o frr -g frr -d /var/opt/frr - sudo install -m 775 -o frr -g frrvty -d /etc/frr - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf - sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf - -Enable IP & IPv6 forwarding -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the -other settings) - -:: - - # 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 - -Troubleshooting ---------------- - -Shared library error -~~~~~~~~~~~~~~~~~~~~ - -If you try and start any of the frrouting daemons you may see the below -error due to the frrouting shared library directory not being found: - -:: - - ./zebra: error while loading shared libraries: libfrr.so.0: cannot open - shared object file: No such file or directory - -The fix is to add the following line to /etc/ld.so.conf which will -continue to reference the library directory after the system reboots. To -load the library directory path immediately run the ldconfig command -after adding the line to the file eg: - -:: - - echo include /usr/local/lib >> /etc/ld.so.conf - ldconfig diff --git a/doc/developer/Building_FRR_on_Fedora24.rst b/doc/developer/Building_FRR_on_Fedora24.rst deleted file mode 100644 index ed81d3f59c..0000000000 --- a/doc/developer/Building_FRR_on_Fedora24.rst +++ /dev/null @@ -1,177 +0,0 @@ -Fedora 24 -========================================= - -(As an alternative to this installation, you may prefer to create a FRR -rpm package yourself and install that package instead. See instructions -in redhat/README.rpm\_build.md on how to build a rpm package) - -Install required packages -------------------------- - -Add packages: - -:: - - sudo dnf install git autoconf automake libtool make gawk \ - readline-devel texinfo net-snmp-devel groff pkgconfig \ - json-c-devel pam-devel perl-XML-LibXML pytest bison flex \ - c-ares-devel python3-devel python3-sphinx - -Get FRR, compile it and install it (from Git) ---------------------------------------------- - -**This assumes you want to build and install FRR from source and not -using any packages** - -Add frr groups and user -~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo groupadd -g 92 frr - sudo groupadd -r -g 85 frrvt - sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \ - -c "FRR FRRouting suite" -d /var/run/frr frr - -Download Source, configure and compile it -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -(You may prefer different options on configure statement. These are just -an example.) - -:: - - git clone https://github.com/frrouting/frr.git frr - cd frr - ./bootstrap.sh - ./configure \ - --bindir=/usr/bin \ - --sbindir=/usr/lib/frr \ - --sysconfdir=/etc/frr \ - --libdir=/usr/lib/frr \ - --libexecdir=/usr/lib/frr \ - --localstatedir=/var/run/frr \ - --with-moduledir=/usr/lib/frr/modules \ - --enable-pimd \ - --enable-snmp=agentx \ - --enable-multipath=64 \ - --enable-ospfclient=yes \ - --enable-ospfapi=yes \ - --enable-user=frr \ - --enable-group=frr \ - --enable-vty-group=frrvt \ - --enable-rtadv \ - --disable-exampledir \ - --enable-watchfrr \ - --enable-ldpd \ - --enable-fpm \ - --enable-nhrpd \ - --enable-eigrpd \ - --enable-babeld \ - --with-pkg-git-version \ - --with-pkg-extra-version=-MyOwnFRRVersion - make - make check - sudo make install - -Create empty FRR configuration files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo mkdir /var/log/frr - sudo mkdir /etc/frr - sudo touch /etc/frr/zebra.conf - sudo touch /etc/frr/bgpd.conf - sudo touch /etc/frr/ospfd.conf - sudo touch /etc/frr/ospf6d.conf - sudo touch /etc/frr/isisd.conf - sudo touch /etc/frr/ripd.conf - sudo touch /etc/frr/ripngd.conf - sudo touch /etc/frr/pimd.conf - sudo touch /etc/frr/ldpd.conf - sudo touch /etc/frr/nhrpd.conf - sudo touch /etc/frr/eigrpd.conf - sudo touch /etc/frr/babeld.conf - sudo chown -R frr:frr /etc/frr/ - sudo touch /etc/frr/vtysh.conf - sudo chown frr:frrvt /etc/frr/vtysh.conf - sudo chmod 640 /etc/frr/*.conf - -Install daemon config file -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo install -p -m 644 redhat/daemons /etc/frr/ - sudo chown frr:frr /etc/frr/daemons - -Edit /etc/frr/daemons as needed to select the required daemons -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Look for the section with ``watchfrr_enable=...`` and ``zebra=...`` etc. -Enable the daemons as required by changing the value to ``yes`` - -Enable IP & IPv6 forwarding (and MPLS) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Create a new file ``/etc/sysctl.d/90-routing-sysctl.conf`` with the -following content: (Please make sure to list all interfaces with -required MPLS similar to ``net.mpls.conf.eth0.input=1``) - -:: - - # Sysctl for routing - # - # Routing: We need to forward packets - net.ipv4.conf.all.forwarding=1 - net.ipv6.conf.all.forwarding=1 - # - # 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 - -Load the modifed sysctl's on the system: - -:: - - sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf - -Create a new file ``/etc/modules-load.d/mpls.conf`` with the following -content: - -:: - - # Load MPLS Kernel Modules - mpls-router - mpls-iptunnel - -And load the kernel modules on the running system: - -:: - - sudo modprobe mpls-router mpls-iptunnel - -Install frr Service and redhat init files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo install -p -m 644 redhat/frr.service /usr/lib/systemd/system/frr.service - sudo install -p -m 755 redhat/frr.init /usr/lib/frr/frr - -Enable required frr at startup -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo systemctl enable frr - -Reboot or start FRR manually -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo systemctl start frr diff --git a/doc/developer/Building_FRR_on_FreeBSD10.rst b/doc/developer/Building_FRR_on_FreeBSD10.rst deleted file mode 100644 index ccbe8c55c3..0000000000 --- a/doc/developer/Building_FRR_on_FreeBSD10.rst +++ /dev/null @@ -1,109 +0,0 @@ -FreeBSD 10 -========================================== - -FreeBSD 10 restrictions: ------------------------- - -- MPLS is not supported on ``FreeBSD``. MPLS requires a Linux Kernel - (4.5 or higher). LDP can be built, but may have limited use without - MPLS - -Install required packages -------------------------- - -Add packages: (Allow the install of the package managment tool if this -is first package install and asked) - -:: - - pkg install git autoconf automake libtool gmake gawk json-c pkgconf \ - bison flex py27-pytest c-ares python3 py-sphinx - -Make sure there is no /usr/bin/flex preinstalled (and use the newly -installed in /usr/local/bin): (FreeBSD frequently provides a older flex -as part of the base OS which takes preference in path) - -:: - - rm -f /usr/bin/flex - -Get FRR, compile it and install it (from Git) ---------------------------------------------- - -**This assumes you want to build and install FRR from source and not -using any packages** - -Add frr group and user -~~~~~~~~~~~~~~~~~~~~~~ - -:: - - pw groupadd frr -g 101 - pw groupadd frrvty -g 102 - pw adduser frr -g 101 -u 101 -G 102 -c "FRR suite" \ - -d /usr/local/etc/frr -s /usr/sbin/nologin - -(You may prefer different options on configure statement. These are just -an example) - -:: - - git clone https://github.com/frrouting/frr.git frr - cd frr - ./bootstrap.sh - export MAKE=gmake - export LDFLAGS="-L/usr/local/lib" - export CPPFLAGS="-I/usr/local/include" - ./configure \ - --sysconfdir=/usr/local/etc/frr \ - --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \ - --localstatedir=/var/run/frr \ - --prefix=/usr/local \ - --enable-ospfclient=yes \ - --enable-ospfapi=yes \ - --enable-multipath=64 \ - --enable-user=frr \ - --enable-group=frr \ - --enable-vty-group=frrvty \ - --enable-configfile-mask=0640 \ - --enable-logfile-mask=0640 \ - --enable-rtadv \ - --enable-fpm \ - --with-pkg-git-version \ - --with-pkg-extra-version=-MyOwnFRRVersion - gmake - gmake check - sudo gmake install - -Create empty FRR configuration files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo mkdir /usr/local/etc/frr - sudo touch /usr/local/etc/frr/zebra.conf - sudo touch /usr/local/etc/frr/bgpd.conf - sudo touch /usr/local/etc/frr/ospfd.conf - sudo touch /usr/local/etc/frr/ospf6d.conf - sudo touch /usr/local/etc/frr/isisd.conf - sudo touch /usr/local/etc/frr/ripd.conf - sudo touch /usr/local/etc/frr/ripngd.conf - sudo touch /usr/local/etc/frr/pimd.conf - sudo chown -R frr:frr /usr/local/etc/frr - sudo touch /usr/local/etc/frr/vtysh.conf - sudo chown frr:frrvty /usr/local/etc/frr/vtysh.conf - sudo chmod 640 /usr/local/etc/frr/*.conf - -Enable IP & IPv6 forwarding -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Add the following lines to the end of ``/etc/sysctl.conf``: - -:: - - # Routing: We need to forward packets - net.inet.ip.forwarding=1 - net.inet6.ip6.forwarding=1 - -**Reboot** or use ``sysctl`` to apply the same config to the running -system diff --git a/doc/developer/Building_FRR_on_FreeBSD11.rst b/doc/developer/Building_FRR_on_FreeBSD11.rst deleted file mode 100644 index 214fdbf9c8..0000000000 --- a/doc/developer/Building_FRR_on_FreeBSD11.rst +++ /dev/null @@ -1,109 +0,0 @@ -FreeBSD 11 -========================================== - -FreeBSD 11 restrictions: ------------------------- - -- MPLS is not supported on ``FreeBSD``. MPLS requires a Linux Kernel - (4.5 or higher). LDP can be built, but may have limited use without - MPLS - -Install required packages -------------------------- - -Add packages: (Allow the install of the package managment tool if this -is first package install and asked) - -:: - - pkg install git autoconf automake libtool gmake gawk json-c pkgconf \ - bison flex py27-pytest c-ares python3 py-sphinx - -Make sure there is no /usr/bin/flex preinstalled (and use the newly -installed in /usr/local/bin): (FreeBSD frequently provides a older flex -as part of the base OS which takes preference in path) - -:: - - rm -f /usr/bin/flex - -Get FRR, compile it and install it (from Git) ---------------------------------------------- - -**This assumes you want to build and install FRR from source and not -using any packages** - -Add frr group and user -~~~~~~~~~~~~~~~~~~~~~~ - -:: - - pw groupadd frr -g 101 - pw groupadd frrvty -g 102 - pw adduser frr -g 101 -u 101 -G 102 -c "FRR suite" \ - -d /usr/local/etc/frr -s /usr/sbin/nologin - -(You may prefer different options on configure statement. These are just -an example) - -:: - - git clone https://github.com/frrouting/frr.git frr - cd frr - ./bootstrap.sh - export MAKE=gmake - export LDFLAGS="-L/usr/local/lib" - export CPPFLAGS="-I/usr/local/include" - ./configure \ - --sysconfdir=/usr/local/etc/frr \ - --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \ - --localstatedir=/var/run/frr \ - --prefix=/usr/local \ - --enable-ospfclient=yes \ - --enable-ospfapi=yes \ - --enable-multipath=64 \ - --enable-user=frr \ - --enable-group=frr \ - --enable-vty-group=frrvty \ - --enable-configfile-mask=0640 \ - --enable-logfile-mask=0640 \ - --enable-rtadv \ - --enable-fpm \ - --with-pkg-git-version \ - --with-pkg-extra-version=-MyOwnFRRVersion - gmake - gmake check - sudo gmake install - -Create empty FRR configuration files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo mkdir /usr/local/etc/frr - sudo touch /usr/local/etc/frr/zebra.conf - sudo touch /usr/local/etc/frr/bgpd.conf - sudo touch /usr/local/etc/frr/ospfd.conf - sudo touch /usr/local/etc/frr/ospf6d.conf - sudo touch /usr/local/etc/frr/isisd.conf - sudo touch /usr/local/etc/frr/ripd.conf - sudo touch /usr/local/etc/frr/ripngd.conf - sudo touch /usr/local/etc/frr/pimd.conf - sudo chown -R frr:frr /usr/local/etc/frr - sudo touch /usr/local/etc/frr/vtysh.conf - sudo chown frr:frrvty /usr/local/etc/frr/vtysh.conf - sudo chmod 640 /usr/local/etc/frr/*.conf - -Enable IP & IPv6 forwarding -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Add the following lines to the end of ``/etc/sysctl.conf``: - -:: - - # Routing: We need to forward packets - net.inet.ip.forwarding=1 - net.inet6.ip6.forwarding=1 - -**Reboot** or use ``sysctl`` to apply the same config to the running -system diff --git a/doc/developer/Building_FRR_on_FreeBSD9.rst b/doc/developer/Building_FRR_on_FreeBSD9.rst deleted file mode 100644 index 909b3a8d64..0000000000 --- a/doc/developer/Building_FRR_on_FreeBSD9.rst +++ /dev/null @@ -1,122 +0,0 @@ -FreeBSD 9 -========================================= - -FreeBSD 9 restrictions: ------------------------ - -- MPLS is not supported on ``FreeBSD``. MPLS requires a Linux Kernel - (4.5 or higher). LDP can be built, but may have limited use without - MPLS - -Install required packages -------------------------- - -Add packages: (Allow the install of the package managment tool if this -is first package install and asked) - -:: - - pkg install -y git autoconf automake libtool gmake gawk \ - pkgconf texinfo json-c bison flex py27-pytest c-ares \ - python3 py-sphinx - -Make sure there is no /usr/bin/flex preinstalled (and use the newly -installed in /usr/local/bin): (FreeBSD frequently provides a older flex -as part of the base OS which takes preference in path) - -:: - - rm -f /usr/bin/flex - -For building with clang (instead of gcc), upgrade clang from 3.4 default -to 3.6 *This is needed to build FreeBSD packages as well - for packages -clang is default* (Clang 3.4 as shipped with FreeBSD 9 crashes during -compile) - -:: - - pkg install clang36 - pkg delete clang34 - mv /usr/bin/clang /usr/bin/clang34 - ln -s /usr/local/bin/clang36 /usr/bin/clang - -Get FRR, compile it and install it (from Git) ---------------------------------------------- - -**This assumes you want to build and install FRR from source and not -using any packages** - -Add frr group and user -~~~~~~~~~~~~~~~~~~~~~~ - -:: - - pw groupadd frr -g 101 - pw groupadd frrvty -g 102 - pw adduser frr -g 101 -u 101 -G 102 -c "FRR suite" \ - -d /usr/local/etc/frr -s /usr/sbin/nologin - -(You may prefer different options on configure statement. These are just -an example) - -:: - - git clone https://github.com/frrouting/frr.git frr - cd frr - ./bootstrap.sh - export MAKE=gmake - export LDFLAGS="-L/usr/local/lib" - export CPPFLAGS="-I/usr/local/include" - ./configure \ - --sysconfdir=/usr/local/etc/frr \ - --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \ - --localstatedir=/var/run/frr \ - --prefix=/usr/local \ - --enable-ospfclient=yes \ - --enable-ospfapi=yes \ - --enable-multipath=64 \ - --enable-user=frr \ - --enable-group=frr \ - --enable-vty-group=frrvty \ - --enable-configfile-mask=0640 \ - --enable-logfile-mask=0640 \ - --enable-rtadv \ - --enable-fpm \ - --with-pkg-git-version \ - --with-pkg-extra-version=-MyOwnFRRVersion - gmake - gmake check - sudo gmake install - -Create empty FRR configuration files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo mkdir /usr/local/etc/frr - sudo touch /usr/local/etc/frr/zebra.conf - sudo touch /usr/local/etc/frr/bgpd.conf - sudo touch /usr/local/etc/frr/ospfd.conf - sudo touch /usr/local/etc/frr/ospf6d.conf - sudo touch /usr/local/etc/frr/isisd.conf - sudo touch /usr/local/etc/frr/ripd.conf - sudo touch /usr/local/etc/frr/ripngd.conf - sudo touch /usr/local/etc/frr/pimd.conf - sudo chown -R frr:frr /usr/local/etc/frr - sudo touch /usr/local/etc/frr/vtysh.conf - sudo chown frr:frrvty /usr/local/etc/frr/vtysh.conf - sudo chmod 640 /usr/local/etc/frr/*.conf - -Enable IP & IPv6 forwarding -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Add the following lines to the end of ``/etc/sysctl.conf``: - -:: - - # Routing: We need to forward packets - net.inet.ip.forwarding=1 - net.inet6.ip6.forwarding=1 - -**Reboot** or use ``sysctl`` to apply the same config to the running -system diff --git a/doc/developer/Building_FRR_on_LEDE-OpenWRT.rst b/doc/developer/Building_FRR_on_LEDE-OpenWRT.rst deleted file mode 100644 index b9ee9c51e1..0000000000 --- a/doc/developer/Building_FRR_on_LEDE-OpenWRT.rst +++ /dev/null @@ -1,108 +0,0 @@ -OpenWRT/LEDE -============================================= - -- for the moment because of cross compile problems, master is not - supported, only up to 3.0 -- LDP can't be built because of missing Perl-XML-LibXML in OpenWRT/LEDE - tree - -Prepare build environment -------------------------- - -https://lede-project.org/docs/guide-developer/install-buildsystem - -for - -Ubuntu 12.04LTS: - -:: - - sudo apt-get install build-essential subversion git-core \ - libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc \ - libxml-parser-perl mercurial bzr ecj cvs unzip python3-sphinx - -Ubuntu 64bit: - -:: - - sudo apt-get install build-essential subversion libncurses5-dev zlib1g-dev \ - gawk gcc-multilib flex git-core gettext libssl-dev python3-sphinx - -Debian 8 Jessie: - -:: - - sudo apt-get install build-essential libncurses5-dev gawk git subversion \ - libssl-dev gettext unzip zlib1g-dev file python python3-sphinx - -Debian 9 Stretch: - -:: - - sudo apt-get install build-essential libncurses5-dev gawk git subversion \ - libssl-dev gettext zlib1g-dev python3-sphinx - -Centos x86-64 (some packages require EPEL): - -:: - - yum install subversion binutils bzip2 gcc gcc-c++ gawk gettext flex \ - ncurses-devel zlib-devel zlib-static make patch unzip glibc glibc-devel \ - perl-ExtUtils-MakeMaker glibc-static quilt ncurses-libs sed sdcc bison \ - intltool sharutils wget git-core openssl-devel xz python-sphinx - -Fedora 24 - 64Bit: - -:: - - dnf install -y subversion binutils bzip2 gcc gcc-c++ gawk gettext git-core \ - unzip ncurses-devel ncurses-compat-libs zlib-devel zlib-static make \ - flex patch perl-ExtUtils-MakeMaker perl-Thread-Queue glibc glibc-devel \ - glibc-static quilt sed sdcc intltool sharutils bison wget openssl-devel \ - python3-sphinx - -Get LEDE Sources (from Git) ---------------------------- - -LEDE and OpenWRT is planned to remerge and won't cover the similar -OpenWRT build As normal user: git clone -https://git.lede-project.org/source.git lede cd lede ./scripts/feeds -update -a ./scripts/feeds install -a cd feeds/routing git pull origin -pull/319/head ln -s ../../../feeds/routing/frr/ -../../package/feeds/routing/ cd ../.. make menuconfig - -Select the needed target then select needed packages in Network -> -Routing and Redirection -> frr, exit and save - -:: - - make or make package/frr/compile - -It may be possible that on first build ``make package/frr/compile`` not -to work and it may be needed to run a ``make`` for the entire build -envronment, add V=s for debugging - -Work with sources ------------------ - -To update the rc1 version or add other options, the Makefile is found in -feeds/routing/frr - -edit: PKG\_VERSION:= PKG\_SOURCE\_VERSION:= - -Usage ------ - -Edit ``/usr/sbin/frr.init`` and add/remove the daemons name in section -DAEMONS= or don't install unneded packages For example: zebra bgpd ldpd -isisd nhrpd ospfd ospf6d pimd ripd ripngd - -Enable the serivce -~~~~~~~~~~~~~~~~~~ - -- service frr enable - -Start the service -~~~~~~~~~~~~~~~~~ - -- service frr start diff --git a/doc/developer/Building_FRR_on_NetBSD6.rst b/doc/developer/Building_FRR_on_NetBSD6.rst deleted file mode 100644 index ce5c58045f..0000000000 --- a/doc/developer/Building_FRR_on_NetBSD6.rst +++ /dev/null @@ -1,147 +0,0 @@ -NetBSD 6 -======================================== - -NetBSD 6 restrictions: ----------------------- - -- MPLS is not supported on ``NetBSD``. MPLS requires a Linux Kernel - (4.5 or higher). LDP can be built, but may have limited use without - MPLS - -Install required packages -------------------------- - -Configure Package location: - -:: - - PKG_PATH="ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/`uname -m`/`uname -r`/All" - export PKG_PATH - -Add packages: - -:: - - sudo pkg_add git autoconf automake libtool gmake gawk openssl \ - pkg-config json-c python27 py27-test python35 py-sphinx - -Install SSL Root Certificates (for git https access): - -:: - - sudo pkg_add mozilla-rootcerts - sudo touch /etc/openssl/openssl.cnf - sudo mozilla-rootcerts install - -Select default Python and py.test - -:: - - sudo ln -s /usr/pkg/bin/python2.7 /usr/bin/python - sudo ln -s /usr/pkg/bin/py.test-2.7 /usr/bin/py.test - -Get FRR, compile it and install it (from Git) ---------------------------------------------- - -Add frr groups and user -~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo groupadd -g 92 frr - sudo groupadd -g 93 frrvty - sudo useradd -g 92 -u 92 -G frrvty -c "FRR suite" \ - -d /nonexistent -s /sbin/nologin frr - -Download Source, configure and compile it -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -(You may prefer different options on configure statement. These are just -an example) - -:: - - git clone https://github.com/frrouting/frr.git frr - cd frr - ./bootstrap.sh - MAKE=gmake - export LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib" - export CPPFLAGS="-I/usr/pkg/include" - ./configure \ - --sysconfdir=/usr/pkg/etc/frr \ - --enable-exampledir=/usr/pkg/share/examples/frr \ - --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \ - --localstatedir=/var/run/frr \ - --enable-ospfclient=yes \ - --enable-ospfapi=yes \ - --enable-multipath=64 \ - --enable-user=frr \ - --enable-group=frr \ - --enable-vty-group=frrvty \ - --enable-configfile-mask=0640 \ - --enable-logfile-mask=0640 \ - --enable-rtadv \ - --enable-fpm \ - --with-pkg-git-version \ - --with-pkg-extra-version=-MyOwnFRRVersion - gmake - gmake check - sudo gmake install - -Create empty FRR configuration files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo mkdir /var/log/frr - sudo mkdir /usr/pkg/etc/frr - sudo touch /usr/pkg/etc/frr/zebra.conf - sudo touch /usr/pkg/etc/frr/bgpd.conf - sudo touch /usr/pkg/etc/frr/ospfd.conf - sudo touch /usr/pkg/etc/frr/ospf6d.conf - sudo touch /usr/pkg/etc/frr/isisd.conf - sudo touch /usr/pkg/etc/frr/ripd.conf - sudo touch /usr/pkg/etc/frr/ripngd.conf - sudo touch /usr/pkg/etc/frr/pimd.conf - sudo chown -R frr:frr /usr/pkg/etc/frr - sudo touch /usr/local/etc/frr/vtysh.conf - sudo chown frr:frrvty /usr/pkg/etc/frr/*.conf - sudo chmod 640 /usr/pkg/etc/frr/*.conf - -Enable IP & IPv6 forwarding -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Add the following lines to the end of ``/etc/sysctl.conf``: - -:: - - # Routing: We need to forward packets - net.inet.ip.forwarding=1 - net.inet6.ip6.forwarding=1 - -**Reboot** or use ``sysctl`` to apply the same config to the running -system - -Install rc.d init files -~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - cp pkgsrc/*.sh /etc/rc.d/ - chmod 555 /etc/rc.d/*.sh - -Enable FRR processes -~~~~~~~~~~~~~~~~~~~~ - -(Enable the required processes only) - -:: - - echo "zebra=YES" >> /etc/rc.conf - echo "bgpd=YES" >> /etc/rc.conf - echo "ospfd=YES" >> /etc/rc.conf - echo "ospf6d=YES" >> /etc/rc.conf - echo "isisd=YES" >> /etc/rc.conf - echo "ripngd=YES" >> /etc/rc.conf - echo "ripd=YES" >> /etc/rc.conf - echo "pimd=YES" >> /etc/rc.conf diff --git a/doc/developer/Building_FRR_on_NetBSD7.rst b/doc/developer/Building_FRR_on_NetBSD7.rst deleted file mode 100644 index eaaf87fd19..0000000000 --- a/doc/developer/Building_FRR_on_NetBSD7.rst +++ /dev/null @@ -1,137 +0,0 @@ -NetBSD 7 -======================================== - -NetBSD 7 restrictions: ----------------------- - -- MPLS is not supported on ``NetBSD``. MPLS requires a Linux Kernel - (4.5 or higher). LDP can be built, but may have limited use without - MPLS - -Install required packages -------------------------- - -:: - - sudo pkgin install git autoconf automake libtool gmake gawk openssl \ - pkg-config json-c python27 py27-test python35 py-sphinx - -Install SSL Root Certificates (for git https access): - -:: - - sudo pkgin install mozilla-rootcerts - sudo touch /etc/openssl/openssl.cnf - sudo mozilla-rootcerts install - -Select default Python and py.test - -:: - - sudo ln -s /usr/pkg/bin/python2.7 /usr/bin/python - sudo ln -s /usr/pkg/bin/py.test-2.7 /usr/bin/py.test - -Get FRR, compile it and install it (from Git) ---------------------------------------------- - -Add frr groups and user -~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo groupadd -g 92 frr - sudo groupadd -g 93 frrvty - sudo useradd -g 92 -u 92 -G frrvty -c "FRR suite" \ - -d /nonexistent -s /sbin/nologin frr - -Download Source, configure and compile it -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -(You may prefer different options on configure statement. These are just -an example) - -:: - - git clone https://github.com/frrouting/frr.git frr - cd frr - ./bootstrap.sh - MAKE=gmake - export LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib" - export CPPFLAGS="-I/usr/pkg/include" - ./configure \ - --sysconfdir=/usr/pkg/etc/frr \ - --enable-exampledir=/usr/pkg/share/examples/frr \ - --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \ - --localstatedir=/var/run/frr \ - --enable-ospfclient=yes \ - --enable-ospfapi=yes \ - --enable-multipath=64 \ - --enable-user=frr \ - --enable-group=frr \ - --enable-vty-group=frrvty \ - --enable-configfile-mask=0640 \ - --enable-logfile-mask=0640 \ - --enable-rtadv \ - --enable-fpm \ - --with-pkg-git-version \ - --with-pkg-extra-version=-MyOwnFRRVersion - gmake - gmake check - sudo gmake install - -Create empty FRR configuration files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo mkdir /usr/pkg/etc/frr - sudo touch /usr/pkg/etc/frr/zebra.conf - sudo touch /usr/pkg/etc/frr/bgpd.conf - sudo touch /usr/pkg/etc/frr/ospfd.conf - sudo touch /usr/pkg/etc/frr/ospf6d.conf - sudo touch /usr/pkg/etc/frr/isisd.conf - sudo touch /usr/pkg/etc/frr/ripd.conf - sudo touch /usr/pkg/etc/frr/ripngd.conf - sudo touch /usr/pkg/etc/frr/pimd.conf - sudo chown -R frr:frr /usr/pkg/etc/frr - sudo touch /usr/local/etc/frr/vtysh.conf - sudo chown frr:frrvty /usr/pkg/etc/frr/*.conf - sudo chmod 640 /usr/pkg/etc/frr/*.conf - -Enable IP & IPv6 forwarding -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Add the following lines to the end of ``/etc/sysctl.conf``: - -:: - - # Routing: We need to forward packets - net.inet.ip.forwarding=1 - net.inet6.ip6.forwarding=1 - -**Reboot** or use ``sysctl`` to apply the same config to the running -system - -Install rc.d init files -~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - cp pkgsrc/*.sh /etc/rc.d/ - chmod 555 /etc/rc.d/*.sh - -Enable FRR processes -~~~~~~~~~~~~~~~~~~~~ - -(Enable the required processes only) - -:: - - echo "zebra=YES" >> /etc/rc.conf - echo "bgpd=YES" >> /etc/rc.conf - echo "ospfd=YES" >> /etc/rc.conf - echo "ospf6d=YES" >> /etc/rc.conf - echo "isisd=YES" >> /etc/rc.conf - echo "ripngd=YES" >> /etc/rc.conf - echo "ripd=YES" >> /etc/rc.conf - echo "pimd=YES" >> /etc/rc.conf diff --git a/doc/developer/Building_FRR_on_OmniOS.rst b/doc/developer/Building_FRR_on_OmniOS.rst deleted file mode 100644 index 0eb2b9fec8..0000000000 --- a/doc/developer/Building_FRR_on_OmniOS.rst +++ /dev/null @@ -1,146 +0,0 @@ -OmniOS (OpenSolaris) -==================================================== - -OmniOS restrictions: --------------------- - -- MPLS is not supported on ``OmniOS`` or ``Solaris``. MPLS requires a - Linux Kernel (4.5 or higher). LDP can be built, but may have limited - use without MPLS - -Enable IP & IPv6 forwarding -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - routeadm -e ipv4-forwarding - routeadm -e ipv6-forwarding - -Install required packages -------------------------- - -Add packages: - -:: - - pkg install \ - developer/build/autoconf \ - developer/build/automake \ - developer/lexer/flex \ - developer/parser/bison \ - developer/object-file \ - developer/linker \ - developer/library/lint \ - developer/build/gnu-make \ - developer/gcc51 \ - library/idnkit \ - library/idnkit/header-idnkit \ - system/header \ - system/library/math/header-math \ - git libtool gawk pkg-config - -Add additional Solaris packages: - -:: - - pkgadd -d http://get.opencsw.org/now - /opt/csw/bin/pkgutil -U - /opt/csw/bin/pkgutil -y -i texinfo - /opt/csw/bin/pkgutil -y -i perl - /opt/csw/bin/pkgutil -y -i libjson_c_dev - /opt/csw/bin/pkgutil -y -i python27 py_pip python27_dev - -Add libjson to Solaris equivalent of ld.so.conf - -:: - - crle -l /opt/csw/lib -u - -Add pytest: - -:: - - pip install pytest - -Install Sphinx::: - - pip install sphinx - -Select Python 2.7 as default (required for pytest) - -:: - - rm -f /usr/bin/python - ln -s /opt/csw/bin/python2.7 /usr/bin/python - -Fix PATH for all users and non-interactive sessions. Edit -``/etc/default/login`` and add the following default PATH: - -:: - - PATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/opt/csw/bin - -Edit ``~/.profile`` and add the following default PATH: - -:: - - PATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/opt/csw/bin - -Get FRR, compile it and install it (from Git) ---------------------------------------------- - -**This assumes you want to build and install FRR from source and not -using any packages** - -Add frr group and user -~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo groupadd -g 93 frr - sudo groupadd -g 94 frrvty - sudo useradd -g 93 -u 93 -G frrvty -c "FRR suite" \ - -d /nonexistent -s /bin/false frr - -(You may prefer different options on configure statement. These are just -an example) - -:: - - git clone https://github.com/frrouting/frr.git frr - cd frr - ./bootstrap.sh - export MAKE=gmake - export LDFLAGS="-L/opt/csw/lib" - export CPPFLAGS="-I/opt/csw/include" - export PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig - ./configure \ - --sysconfdir=/etc/frr \ - --enable-exampledir=/usr/share/doc/frr/examples/ \ - --localstatedir=/var/run/frr \ - --sbindir=/usr/lib/frr \ - --enable-vtysh \ - --enable-watchfrr \ - --enable-ospfclient=yes \ - --enable-ospfapi=yes \ - --enable-multipath=64 \ - --enable-user=frr \ - --enable-group=frr \ - --enable-vty-group=frrvty \ - --enable-configfile-mask=0640 \ - --enable-logfile-mask=0640 \ - --enable-rtadv \ - --enable-fpm \ - --with-pkg-git-version \ - --with-pkg-extra-version=-MyOwnFRRVersion - gmake - gmake check - sudo gmake install - -Enable IP & IPv6 forwarding -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - routeadm -e ipv4-forwarding - routeadm -e ipv6-forwarding diff --git a/doc/developer/Building_FRR_on_OpenBSD6.rst b/doc/developer/Building_FRR_on_OpenBSD6.rst deleted file mode 100644 index 895048886e..0000000000 --- a/doc/developer/Building_FRR_on_OpenBSD6.rst +++ /dev/null @@ -1,169 +0,0 @@ -OpenBSD 6 -========================================= - -Install required packages -------------------------- - -Configure PKG\_PATH - -:: - - export PKG_PATH=http://ftp5.usa.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(machine -a)/ - -Add packages: - -:: - - pkg_add git autoconf-2.69p2 automake-1.15p0 libtool bison - pkg_add gmake gawk dejagnu openssl json-c py-test py-sphinx - -Select Python2.7 as default (required for pytest) - -:: - - ln -s /usr/local/bin/python2.7 /usr/local/bin/python - -Get FRR, compile it and install it (from Git) ---------------------------------------------- - -**This assumes you want to build and install FRR from source and not -using any packages** - -Add frr group and user -~~~~~~~~~~~~~~~~~~~~~~ - -:: - - groupadd -g 525 _frr - groupadd -g 526 _frrvty - useradd -g 525 -u 525 -c "FRR suite" -G _frrvty \ - -d /nonexistent -s /sbin/nologin _frr - -Download Source, configure and compile it -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -(You may prefer different options on configure statement. These are just -an example) - -:: - - git clone https://github.com/frrouting/frr.git frr - cd frr - export AUTOCONF_VERSION="2.69" - export AUTOMAKE_VERSION="1.15" - ./bootstrap.sh - export LDFLAGS="-L/usr/local/lib" - export CPPFLAGS="-I/usr/local/include" - ./configure \ - --sysconfdir=/etc/frr \ - --localstatedir=/var/frr \ - --enable-pimd \ - --enable-ospfclient=yes \ - --enable-ospfapi=yes \ - --enable-multipath=64 \ - --enable-user=_frr \ - --enable-group=_frr \ - --enable-vty-group=_frrvty \ - --enable-configfile-mask=0640 \ - --enable-logfile-mask=0640 \ - --enable-rtadv \ - --enable-fpm \ - --with-pkg-git-version \ - --with-pkg-extra-version=-MyOwnFRRVersion - gmake - gmake check - doas gmake install - -Create empty FRR configuration files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - doas mkdir /var/frr - doas chown _frr:_frr /var/frr - doas chmod 755 /var/frr - doas mkdir /etc/frr - doas touch /etc/frr/zebra.conf - doas touch /etc/frr/bgpd.conf - doas touch /etc/frr/ospfd.conf - doas touch /etc/frr/ospf6d.conf - doas touch /etc/frr/isisd.conf - doas touch /etc/frr/ripd.conf - doas touch /etc/frr/ripngd.conf - doas touch /etc/frr/pimd.conf - doas touch /etc/frr/ldpd.conf - doas touch /etc/frr/nhrpd.conf - doas chown -R _frr:_frr /etc/frr - doas touch /etc/frr/vtysh.conf - doas chown -R _frr:_frrvty /etc/frr/vtysh.conf - doas chmod 750 /etc/frr - doas chmod 640 /etc/frr/*.conf - -Enable IP & IPv6 forwarding -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Add the following lines to the end of ``/etc/rc.conf``: - -:: - - net.inet6.ip6.forwarding=1 # 1=Permit forwarding of IPv6 packets - net.inet6.ip6.mforwarding=1 # 1=Permit forwarding of IPv6 multicast packets - net.inet6.ip6.multipath=1 # 1=Enable IPv6 multipath routing - -**Reboot** to apply the config to the system - -Enable MPLS Forwarding -~~~~~~~~~~~~~~~~~~~~~~ - -To enable MPLS forwarding on a given interface, use the following -command: - -:: - - doas ifconfig em0 mpls - -Alternatively, to make MPLS forwarding persistent across reboots, add -the "mpls" keyword in the hostname.\* files of the desired interfaces. -Example: - -:: - - cat /etc/hostname.em0 - inet 10.0.1.1 255.255.255.0 mpls - -Install rc.d init files -~~~~~~~~~~~~~~~~~~~~~~~ - -(create them in /etc/rc.d - no example are included at this time with -FRR source) - -Example (for zebra - store as ``/etc/rc.d/frr_zebra.sh``) - -:: - - #!/bin/sh - # - # $OpenBSD: frr_zebra.rc,v 1.1 2013/04/18 20:29:08 sthen Exp $ - - daemon="/usr/local/sbin/zebra -d" - - . /etc/rc.d/rc.subr - - rc_cmd $1 - -Enable FRR processes -~~~~~~~~~~~~~~~~~~~~ - -(Enable the required processes only) - -:: - - echo "frr_zebra=YES" >> /etc/rc.conf - echo "frr_bgpd=YES" >> /etc/rc.conf - echo "frr_ospfd=YES" >> /etc/rc.conf - echo "frr_ospf6d=YES" >> /etc/rc.conf - echo "frr_isisd=YES" >> /etc/rc.conf - echo "frr_ripngd=YES" >> /etc/rc.conf - echo "frr_ripd=YES" >> /etc/rc.conf - echo "frr_pimd=YES" >> /etc/rc.conf - echo "frr_ldpd=YES" >> /etc/rc.conf diff --git a/doc/developer/Building_FRR_on_Ubuntu1204.rst b/doc/developer/Building_FRR_on_Ubuntu1204.rst deleted file mode 100644 index 68e476fec2..0000000000 --- a/doc/developer/Building_FRR_on_Ubuntu1204.rst +++ /dev/null @@ -1,187 +0,0 @@ -Ubuntu 12.04LTS -=============================================== - -- MPLS is not supported on ``Ubuntu 12.04`` with default kernel. MPLS - requires Linux Kernel 4.5 or higher (LDP can be built, but may have - limited use without MPLS) For an updated Ubuntu Kernel, see - http://kernel.ubuntu.com/~kernel-ppa/mainline/ - -Install required packages -------------------------- - -Add packages: - -:: - - apt-get install git autoconf automake libtool make gawk libreadline-dev \ - texinfo libpam0g-dev dejagnu libjson0-dev pkg-config libpam0g-dev \ - libjson0-dev flex python-pip libc-ares-dev python3-dev python3-sphinx - -Install newer bison from 14.04 package source (Ubuntu 12.04 package -source is too old) - -:: - - mkdir builddir - cd builddir - wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg-2.dsc - wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg.orig.tar.bz2 - wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg-2.debian.tar.gz - tar -jxvf bison_3.0.2.dfsg.orig.tar.bz2 - cd bison-3.0.2.dfsg/ - tar xzf ../bison_3.0.2.dfsg-2.debian.tar.gz - sudo apt-get build-dep bison - debuild -b -uc -us - cd .. - sudo dpkg -i ./libbison-dev_3.0.2.dfsg-2_amd64.deb ./bison_3.0.2.dfsg-2_amd64.deb - cd .. - rm -rf builddir - -Install newer version of autoconf and automake: - -:: - - wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz - tar xvf autoconf-2.69.tar.gz - cd autoconf-2.69 - ./configure --prefix=/usr - make - sudo make install - cd .. - - wget http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz - tar xvf automake-1.15.tar.gz - cd automake-1.15 - ./configure --prefix=/usr - make - sudo make install - cd .. - -Install pytest: - -:: - - pip install pytest - -Get FRR, compile it and install it (from Git) ---------------------------------------------- - -**This assumes you want to build and install FRR from source and not -using any packages** - -Add frr groups and user -~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo groupadd -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 - -Download Source, configure and compile it -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -(You may prefer different options on configure statement. These are just -an example.) - -:: - - git clone https://github.com/frrouting/frr.git frr - cd frr - ./bootstrap.sh - ./configure \ - --prefix=/usr \ - --enable-exampledir=/usr/share/doc/frr/examples/ \ - --localstatedir=/var/run/frr \ - --sbindir=/usr/lib/frr \ - --sysconfdir=/etc/frr \ - --enable-pimd \ - --enable-watchfrr \ - --enable-ospfclient=yes \ - --enable-ospfapi=yes \ - --enable-multipath=64 \ - --enable-user=frr \ - --enable-group=frr \ - --enable-vty-group=frrvty \ - --enable-configfile-mask=0640 \ - --enable-logfile-mask=0640 \ - --enable-rtadv \ - --enable-fpm \ - --with-pkg-git-version \ - --with-pkg-extra-version=-MyOwnFRRVersion - make - make check - sudo make install - -Create empty FRR configuration files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo install -m 755 -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 frr /dev/null /etc/frr/zebra.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf - sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf - -Enable IP & IPv6 forwarding -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the -other settings) - -:: - - # 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 - -Install the init.d service -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo install -m 755 tools/frr /etc/init.d/frr - sudo install -m 644 tools/etc/frr/daemons /etc/frr/daemons - sudo install -m 644 tools/etc/frr/daemons.conf /etc/frr/daemons.conf - sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf - -Enable daemons -~~~~~~~~~~~~~~ - -| Edit ``/etc/frr/daemons`` and change the value from "no" to "yes" for - those daemons you want to start by systemd. -| For example. - -:: - - zebra=yes - bgpd=yes - ospfd=yes - ospf6d=yes - ripd=yes - ripngd=yes - isisd=yes - -Start the init.d service -~~~~~~~~~~~~~~~~~~~~~~~~ - -- /etc/init.d/frr start -- use ``/etc/init.d/frr status`` to check its status. diff --git a/doc/developer/Building_FRR_on_Ubuntu1404.rst b/doc/developer/Building_FRR_on_Ubuntu1404.rst deleted file mode 100644 index 10944cb8e1..0000000000 --- a/doc/developer/Building_FRR_on_Ubuntu1404.rst +++ /dev/null @@ -1,139 +0,0 @@ -Ubuntu 14.04LTS -=============================================== - -- MPLS is not supported on ``Ubuntu 14.04`` with default kernel. MPLS - requires Linux Kernel 4.5 or higher (LDP can be built, but may have - limited use without MPLS) For an updated Ubuntu Kernel, see - http://kernel.ubuntu.com/~kernel-ppa/mainline/ - -Install required packages -------------------------- - -Add packages: - -:: - - apt-get install git autoconf automake libtool make gawk libreadline-dev \ - texinfo dejagnu pkg-config libpam0g-dev libjson-c-dev bison flex \ - python-pytest libc-ares-dev python3-dev python3-sphinx - -Get FRR, compile it and install it (from Git) ---------------------------------------------- - -**This assumes you want to build and install FRR from source and not -using any packages** - -Add frr groups and user -~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo groupadd -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 - -Download Source, configure and compile it -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -(You may prefer different options on configure statement. These are just -an example.) - -:: - - git clone https://github.com/frrouting/frr.git frr - cd frr - ./bootstrap.sh - ./configure \ - --prefix=/usr \ - --enable-exampledir=/usr/share/doc/frr/examples/ \ - --localstatedir=/var/run/frr \ - --sbindir=/usr/lib/frr \ - --sysconfdir=/etc/frr \ - --enable-pimd \ - --enable-watchfrr \ - --enable-ospfclient=yes \ - --enable-ospfapi=yes \ - --enable-multipath=64 \ - --enable-user=frr \ - --enable-group=frr \ - --enable-vty-group=frrvty \ - --enable-configfile-mask=0640 \ - --enable-logfile-mask=0640 \ - --enable-rtadv \ - --enable-fpm \ - --enable-ldpd \ - --with-pkg-git-version \ - --with-pkg-extra-version=-MyOwnFRRVersion - make - make check - sudo make install - -Create empty FRR configuration files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo install -m 755 -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 frr /dev/null /etc/frr/zebra.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf - sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf - -Enable IP & IPv6 forwarding -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the -other settings) - -:: - - # 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 ### Install the init.d service - -:: - - sudo install -m 755 tools/frr /etc/init.d/frr - sudo install -m 644 tools/etc/frr/daemons /etc/frr/daemons - sudo install -m 644 tools/etc/frr/daemons.conf /etc/frr/daemons.conf - sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf - -Enable daemons -~~~~~~~~~~~~~~ - -| Edit ``/etc/frr/daemons`` and change the value from "no" to "yes" for - those daemons you want to start by systemd. -| For example. - -:: - - zebra=yes - bgpd=yes - ospfd=yes - ospf6d=yes - ripd=yes - ripngd=yes - isisd=yes - -Start the init.d service -~~~~~~~~~~~~~~~~~~~~~~~~ - -- /etc/init.d/frr start -- use ``/etc/init.d/frr status`` to check its status. diff --git a/doc/developer/Building_FRR_on_Ubuntu1604.rst b/doc/developer/Building_FRR_on_Ubuntu1604.rst deleted file mode 100644 index 9c296f8edf..0000000000 --- a/doc/developer/Building_FRR_on_Ubuntu1604.rst +++ /dev/null @@ -1,176 +0,0 @@ -Ubuntu 16.04LTS -=============================================== - -- MPLS is not supported on ``Ubuntu 16.04`` with default kernel. MPLS - requires Linux Kernel 4.5 or higher (LDP can be built, but may have - limited use without MPLS) For an updated Ubuntu Kernel, see - http://kernel.ubuntu.com/~kernel-ppa/mainline/ - -Install required packages -------------------------- - -Add packages: - -:: - - apt-get install git autoconf automake libtool make gawk libreadline-dev \ - texinfo dejagnu pkg-config libpam0g-dev libjson-c-dev bison flex \ - python-pytest libc-ares-dev python3-dev libsystemd-dev python-ipaddr \ - python3-sphinx - -Get FRR, compile it and install it (from Git) ---------------------------------------------- - -**This assumes you want to build and install FRR from source and not -using any packages** - -Add frr groups and user -~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo groupadd -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 - -Download Source, configure and compile it -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -(You may prefer different options on configure statement. These are just -an example.) - -:: - - git clone https://github.com/frrouting/frr.git frr - cd frr - ./bootstrap.sh - ./configure \ - --prefix=/usr \ - --enable-exampledir=/usr/share/doc/frr/examples/ \ - --localstatedir=/var/run/frr \ - --sbindir=/usr/lib/frr \ - --sysconfdir=/etc/frr \ - --enable-pimd \ - --enable-watchfrr \ - --enable-ospfclient=yes \ - --enable-ospfapi=yes \ - --enable-multipath=64 \ - --enable-user=frr \ - --enable-group=frr \ - --enable-vty-group=frrvty \ - --enable-configfile-mask=0640 \ - --enable-logfile-mask=0640 \ - --enable-rtadv \ - --enable-fpm \ - --enable-systemd=yes \ - --with-pkg-git-version \ - --with-pkg-extra-version=-MyOwnFRRVersion - make - make check - sudo make install - -Create empty FRR configuration files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo install -m 755 -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 frr /dev/null /etc/frr/zebra.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf - sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf - sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf - -Enable IPv4 & IPv6 forwarding -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the -other settings) - -:: - - # 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 - -Enable MPLS Forwarding (with Linux Kernel >= 4.5) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Edit ``/etc/sysctl.conf`` and the following lines. Make sure to add a -line equal to ``net.mpls.conf.eth0.input`` or each interface used with -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 - -Add MPLS kernel modules -~~~~~~~~~~~~~~~~~~~~~~~ - -Add the following lines to ``/etc/modules-load.d/modules.conf``: - -:: - - # Load MPLS Kernel Modules - mpls-router - mpls-iptunnel - -**Reboot** or use ``sysctl -p`` to apply the same config to the running -system - -Install the systemd service (if rebooted from last step, change directory back to frr directory) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - sudo install -m 644 tools/frr.service /etc/systemd/system/frr.service - sudo install -m 644 tools/etc/default/frr /etc/default/frr - sudo install -m 644 tools/etc/frr/daemons /etc/frr/daemons - sudo install -m 644 tools/etc/frr/daemons.conf /etc/frr/daemons.conf - sudo install -m 644 tools/etc/frr/frr.conf /etc/frr/frr.conf - sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf - -Enable daemons -~~~~~~~~~~~~~~ - -| Edit ``/etc/frr/daemons`` and change the value from "no" to "yes" for - those daemons you want to start by systemd. -| For example. - -:: - - zebra=yes - bgpd=yes - ospfd=yes - ospf6d=yes - ripd=yes - ripngd=yes - isisd=yes - -Enable the systemd service -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- systemctl enable frr - -Start the systemd service -~~~~~~~~~~~~~~~~~~~~~~~~~ - -- systemctl start frr -- use ``systemctl status frr`` to check its status. diff --git a/doc/developer/OSPF-API.md b/doc/developer/OSPF-API.md deleted file mode 100644 index 5774300c0b..0000000000 --- a/doc/developer/OSPF-API.md +++ /dev/null @@ -1,263 +0,0 @@ -# OSPF API Documentation - -[TOC] - -## Disclaimer - -The OSPF daemon contains an API for application access to the LSA database. This API was created by Ralph Keller, originally as patch for Zebra. Unfortunately, the page containing documentation of the API is no longer online. This page is an attempt to recreate documentation for the API (with lots of help of the WayBackMachine) - -## 1.  Introduction - -This page describes an API that allows external applications to access the link-state database (LSDB) of the OSPF daemon. The implementation is based on the OSPF code from FRRouting (forked from Quagga and formerly Zebra) routing protocol suite and is subject to the GNU General Public License. The OSPF API provides you with the following functionality: - -* Retrieval of the full or partial link-state database of the OSPF daemon. This allows applications to obtain an exact copy of the LSDB including router LSAs, network LSAs and so on. Whenever a new LSA arrives at the OSPF daemon, the API module immediately informs the application by sending a message. This way, the application is always synchronized with the LSDB of the OSPF daemon. -* Origination of own opaque LSAs (of type 9, 10, or 11) which are then distributed transparently to other routers within the flooding scope and received by other applications through the OSPF API. - -Opaque LSAs, which are described in RFC 2370 , allow you to distribute application-specific information within a network using the OSPF protocol. The information contained in opaque LSAs is transparent for the routing process but it can be processed by other modules such as traffic engineering (e.g., MPLS-TE). - -## 2.  Architecture - -The following picture depicts the architecture of the Quagga/Zebra protocol suite. The OSPF daemon is extended with opaque LSA capabilities and an API for external applications. The OSPF core module executes the OSPF protocol by discovering neighbors and exchanging neighbor state. The opaque module, implemented by Masahiko Endo, provides functions to exchange opaque LSAs between routers. Opaque LSAs can be generated by several modules such as the MPLS-TE module or the API server module. These modules then invoke the opaque module to flood their data to neighbors within the flooding scope. - -The client, which is an application potentially running on a different node than the OSPF daemon, links against the OSPF API client library. This client library establishes a socket connection with the API server module of the OSPF daemon and uses this connection to retrieve LSAs and originate opaque LSAs. - -![image](ospf_api_architecture.png) - -The OSPF API server module works like any other internal opaque module (such as the MPLS-TE module), but listens to connections from external applications that want to communicate with the OSPF daemon. The API server module can handle multiple clients concurrently. - -One of the main objectives of the implementation is to make as little changes to the existing Zebra code as possible. - -## 3.  Installation & Configuration - -Download FRRouting and unpack - -Configure your frr version (note that --enable-opaque-lsa also enables the ospfapi server and ospfclient). - -``` -% update-autotools -% sh ./configure --enable-opaque-lsa -% make - -``` - -This should also compile the client library and sample application in ospfclient. - -Make sure that you have enabled opaque LSAs in your configuration. Add the ospf opaque-lsa statement to your ospfd.conf: - -``` -! -*- ospf -*- -! -! OSPFd sample configuration file -! -! -hostname xxxxx -password xxxxx - -router ospf - router-id 10.0.0.1 - network 10.0.0.1/24 area 1 - neighbor 10.0.0.2 - network 10.0.1.2/24 area 1 - neighbor 10.0.1.1 - ospf opaque-lsa <============ add this statement! - -``` - -## 4. Usage - -In the following we describe how you can use the sample application to originate opaque LSAs. The sample application first registers with the OSPF daemon the opaque type it wants to inject and then waits until the OSPF daemon is ready to accept opaque LSAs of that type. Then the client application originates an opaque LSA, waits 10 seconds and then updates the opaque LSA with new opaque data. After another 20 seconds, the client application deletes the opaque LSA from the LSDB. If the clients terminates unexpectedly, the OSPF API module will remove all the opaque LSAs that the application registered. Since the opaque LSAs are flooded to other routers, we will see the opaque LSAs in all routers according to the flooding scope of the opaque LSA. - -We have a very simple demo setup, just two routers connected with an ATM point-to-point link. Start the modified OSPF daemons on two adjacent routers. First run on msr2: - -``` - > msr2:/home/keller/ospfapi/zebra/ospfd# ./ospfd -f /usr/local/etc/ospfd.conf -``` - -And on the neighboring router msr3: - - -``` - > msr3:/home/keller/ospfapi/zebra/ospfd# ./ospfd -f /usr/local/etc/ospfd.conf -``` - -Now the two routers form adjacency and start exchanging their databases. Looking at the OSPF daemon of msr2 (or msr3), you see this: - -``` - ospfd> show ip ospf database - - OSPF Router with ID (10.0.0.1) - - Router Link States (Area 0.0.0.1) - - Link ID ADV Router Age Seq# CkSum Link count - 10.0.0.1 10.0.0.1 55 0x80000003 0xc62f 2 - 10.0.0.2 10.0.0.2 55 0x80000003 0xe3e4 3 - - Net Link States (Area 0.0.0.1) - - Link ID ADV Router Age Seq# CkSum - 10.0.0.2 10.0.0.2 60 0x80000001 0x5fcb - -``` - -Now we start the sample main application that originates an opaque LSA. - - -``` - > cd ospfapi/apiclient - > ./main msr2 10 250 20 0.0.0.0 0.0.0.1 - -``` - -This originates an opaque LSA of type 10 (area local), with opaque type 250 (experimental), opaque id of 20 (chosen arbitrarily), interface address 0.0.0.0 (which is used only for opaque LSAs type 9), and area 0.0.0.1 - -Again looking at the OSPF database you see: - -``` - ospfd> show ip ospf database - - OSPF Router with ID (10.0.0.1) - - Router Link States (Area 0.0.0.1) - - Link ID ADV Router Age Seq# CkSum Link count - 10.0.0.1 10.0.0.1 437 0x80000003 0xc62f 2 - 10.0.0.2 10.0.0.2 437 0x80000003 0xe3e4 3 - - Net Link States (Area 0.0.0.1) - - Link ID ADV Router Age Seq# CkSum - 10.0.0.2 10.0.0.2 442 0x80000001 0x5fcb - - Area-Local Opaque-LSA (Area 0.0.0.1) - - Opaque-Type/Id ADV Router Age Seq# CkSum - 250.0.0.20 10.0.0.1 0 0x80000001 0x58a6 <=== opaque LSA - -``` - -You can take a closer look at this opaque LSA: - -``` - ospfd> show ip ospf database opaque-area - - OSPF Router with ID (10.0.0.1) - - - Area-Local Opaque-LSA (Area 0.0.0.1) - - LS age: 4 - Options: 66 - LS Type: Area-Local Opaque-LSA - Link State ID: 250.0.0.20 (Area-Local Opaque-Type/ID) - Advertising Router: 10.0.0.1 - LS Seq Number: 80000001 - Checksum: 0x58a6 - Length: 24 - Opaque-Type 250 (Private/Experimental) - Opaque-ID 0x14 - Opaque-Info: 4 octets of data - Added using OSPF API: 4 octets of opaque data - Opaque data: 1 0 0 0 <==== counter is 1 - -``` - -Note that the main application updates the opaque LSA after 10 seconds, then it looks as follows: - -``` - ospfd> show ip ospf database opaque-area - - OSPF Router with ID (10.0.0.1) - - - Area-Local Opaque-LSA (Area 0.0.0.1) - - LS age: 1 - Options: 66 - LS Type: Area-Local Opaque-LSA - Link State ID: 250.0.0.20 (Area-Local Opaque-Type/ID) - Advertising Router: 10.0.0.1 - LS Seq Number: 80000002 - Checksum: 0x59a3 - Length: 24 - Opaque-Type 250 (Private/Experimental) - Opaque-ID 0x14 - Opaque-Info: 4 octets of data - Added using OSPF API: 4 octets of opaque data - Opaque data: 2 0 0 0 <==== counter is now 2 - -``` - -Note that the payload of the opaque LSA has changed as you can see above. - -Then, again after another 20 seconds, the opaque LSA is flushed from the LSDB. - -#### Important note: - -In order to originate an opaque LSA, there must be at least one active opaque-capable neighbor. Thus, you cannot originate opaque LSAs of no neighbors are present. If you try to originate even so no neighbor is ready, you will receive a not ready error message. The reason for this restriction is that it might be possible that some routers have an identical opaque LSA from a previous origination in their LSDB that unfortunately could not be flushed due to a crash, and now if the router comes up again and starts originating a new opaque LSA, the new opaque LSA is considered older since it has a lower sequence number and is ignored by other routers (that consider the stalled opaque LSA as more recent). However, if the originating router first synchronizes the database before originating opaque LSAs, it will detect the older opaque LSA and can flush it first. - - -## 5.  Protocol and Message Formats - -If you are developing your own client application and you don't want to make use of the client library (due to the GNU license restriction or whatever reason), you can implement your own client-side message handling. The OSPF API uses two connections between the client and the OSPF API server: One connection is used for a synchronous request /reply protocol and another connection is used for asynchronous notifications (e.g., LSA update, neighbor status change). - -Each message begins with the following header: - -![image](ospf_api_msghdr.png) - -The message type field can take one of the following values: - -Messages to OSPF deamon | Value ------------------------ | ----- -MSG_REGISTER_OPAQUETYPE | 1 -MSG_UNREGISTER_OPAQUETYPE | 2 -MSG_REGISTER_EVENT | 3 -MSG_SYNC_LSDB | 4 -MSG_ORIGINATE_REQUEST | 5 -MSG_DELETE_REQUEST | 6 - -Messages from OSPF deamon | Value -------------------------- | ----- -MSG_REPLY | 10 -MSG_READY_NOTIFY | 11 -MSG_LSA_UPDATE_NOTIFY | 12 -MSG_LSA_DELETE_NOTIFY | 13 -MSG_NEW_IF | 14 -MSG_DEL_IF | 15 -MSG_ISM_CHANGE | 16 -MSG_NSM_CHANGE | 17 - -The synchronous requests and replies have the following message formats: - -![image](ospf_api_msgs1.png) - -The origin field allows to select according to the following types of origins: - -Origin | Value ------- | ----- -NON_SELF_ORIGINATED | 0 -SELF_ORIGINATED | 1 -ANY_ORIGIN | 2 - -The reply message has on of the following error codes: - -Error code | Value ----------- | ----- -API_OK | 0 -API_NOSUCHINTERFACE | -1 -API_NOSUCHAREA | -2 -API_NOSUCHLSA | -3 -API_ILLEGALSATYPE | -4 -API_ILLEGALOPAQUETYPE | -5 -API_OPAQUETYPEINUSE | -6 -API_NOMEMORY | -7 -API_ERROR | -99 -API_UNDEF | -100 - -The asynchronous notifications have the following message formats: - -![image](ospf_api_msgs2.png) - -## 6.  Original Acknowledgments from Ralph Keller - -I would like to thank Masahiko Endo, the author of the opaque LSA extension module, for his great support. His wonderful ASCII graphs explaining the internal workings of this code, and his invaluable input proved to be crucial in designing a useful API for accessing the link state database of the OSPF daemon. Once, he even decided to take the plane from Tokyo to Zurich so that we could actually meet and have face-to-face discussions, which was a lot of fun. Clearly, without Masahiko no API would ever be completed. I also would like to thank Daniel Bauer who wrote an opaque LSA implementation too and was willing to test the OSPF API code in one of his projects. diff --git a/doc/developer/bgp-typecodes.rst b/doc/developer/bgp-typecodes.rst new file mode 100644 index 0000000000..beb7ca1f8a --- /dev/null +++ b/doc/developer/bgp-typecodes.rst @@ -0,0 +1,28 @@ +BGP-4[+] UPDATE Attribute Preprocessor Constants +================================================ + +This is a list of preprocessor constants that map to BGP attributes defined by +various BGP RFCs. In the code these are defined as BGP_ATTR_. + ++-------+------------------+------------------------------------------+ +| Value | Attribute | References | ++=======+==================+==========================================+ +| 1 | ORIGIN | [RFC 4271] | +| 2 | AS_PATH | [RFC 4271] | +| 3 | NEXT_HOP | [RFC 4271] | +| 4 | MULTI_EXIT_DISC | [RFC 4271] | +| 5 | LOCAL_PREF | [RFC 4271] | +| 6 | ATOMIC_AGGREGATE | [RFC 4271] | +| 7 | AGGREGATOR | [RFC 4271] | +| 8 | COMMUNITIES | [RFC 1997] | +| 9 | ORIGINATOR_ID | [RFC 4456] | +| 10 | CLUSTER_LIST | [RFC 4456] | +| 11 | DPA | [draft-ietf-idr-bgp-dpa-05.txt(expired)] | +| 12 | ADVERTISER | [RFC 1863] | +| 13 | RCID_PATH | [RFC 1863] | +| 14 | MP_REACH_NLRI | [RFC 4760] | +| 15 | MP_UNREACH_NLRI | [RFC 4760] | +| 16 | EXT_COMMUNITIES | [RFC 4360] | +| 17 | AS4_PATH | [RFC 4893] | +| 18 | AS4_AGGREGATOR | [RFC 4893] | ++-------+------------------+------------------------------------------+ diff --git a/doc/developer/bgpd.rst b/doc/developer/bgpd.rst index 053c0779de..bda135c446 100644 --- a/doc/developer/bgpd.rst +++ b/doc/developer/bgpd.rst @@ -5,4 +5,5 @@ BGPD :maxdepth: 2 next-hop-tracking + bgp-typecodes diff --git a/doc/developer/building-frr-on-alpine.rst b/doc/developer/building-frr-on-alpine.rst new file mode 100644 index 0000000000..27718bdc80 --- /dev/null +++ b/doc/developer/building-frr-on-alpine.rst @@ -0,0 +1,47 @@ +Building FRR dev packages on Alpine Linux from Git Source +========================================================= + +For building Alpine Linux dev packages, we use docker. + +Install docker 17.05 or later +----------------------------- + +Depending on your host, there are different ways of installing +docker. Refer to the documentation here for instructions on how +to install a free version of docker: https://www.docker.com/community-edition + +Work with sources +----------------- + + git clone https://github.com/frrouting/frr.git frr + cd frr + +Build apk packages +------------------ + + ./docker/alpine/build.sh + +This will put the apk packages in: + + ./docker/pkgs/apk/x86_64/ + +Usage +----- + +To add the packages to a docker image, create a Dockerfile in ./docker/pkgs: + + FROM alpine:3.7 + RUN mkdir -p /pkgs + ADD apk/ /pkgs/ + RUN apk add --no-cache --allow-untrusted /pkgs/x86_64/*.apk + +And build a docker image: + + docker build --rm --force-rm -t alpine-dev-pkgs:latest docker/pkgs + +And run the image: + + docker run -it --rm alpine-dev-pkgs:latest /bin/sh + +Currently, we only package the raw daemons and example files, so, you'll +need to run the daemons by hand (or, better, orchestrate in the Dockerfile). diff --git a/doc/developer/building-frr-on-centos6.rst b/doc/developer/building-frr-on-centos6.rst new file mode 100644 index 0000000000..1c53ea6ba3 --- /dev/null +++ b/doc/developer/building-frr-on-centos6.rst @@ -0,0 +1,255 @@ +CentOS 6 +======================================== + +(As an alternative to this installation, you may prefer to create a FRR +rpm package yourself and install that package instead. See instructions +in redhat/README.rpm\_build.md on how to build a rpm package) + +Instructions are tested with ``CentOS 6.8`` on ``x86_64`` platform + +Warning: +-------- +``CentOS 6`` is very old and not fully supported by the FRR community +anymore. Building FRR takes multiple manual steps to update the build +system with newer packages than what's available from the archives. +However, the built packages can still be installed afterwards on +a standard ``CentOS 6`` without any special packages. + +Support for CentOS 6 is now on a best-effort base by the community. + +CentOS 6 restrictions: +---------------------- + +- PIMd is not supported on ``CentOS 6``. Upgrade to ``CentOS 7`` if + PIMd is needed +- MPLS is not supported on ``CentOS 6``. MPLS requires Linux Kernel 4.5 + or higher (LDP can be built, but may have limited use without MPLS) +- Zebra is unable to detect what bridge/vrf an interface is associcated + with (IFLA\_INFO\_SLAVE\_KIND does not exist in the kernel headers, + you can use a newer kernel + headers to get this functionality) +- frr\_reload.py will not work, as this requires Python 2.7, and CentOS + 6 only has 2.6. You can install Python 2.7 via IUS, but it won't work + properly unless you compile and install the ipaddr package for it. +- Building the package requires Sphinx >= 1.1. Only a non-standard + package provides a newer sphinx and requires manual installation + (see below) + + +Install required packages +------------------------- + +Add packages: + +:: + + sudo yum install git autoconf automake libtool make gawk \ + readline-devel texinfo net-snmp-devel groff pkgconfig \ + json-c-devel pam-devel flex epel-release perl-XML-LibXML \ + c-ares-devel + +Install newer version of bison (CentOS 6 package source is too old) from +CentOS 7 + +:: + + sudo yum install rpm-build + curl -O http://vault.centos.org/7.0.1406/os/Source/SPackages/bison-2.7-4.el7.src.rpm + rpmbuild --rebuild ./bison-2.7-4.el7.src.rpm + sudo yum install ./rpmbuild/RPMS/x86_64/bison-2.7-4.el6.x86_64.rpm + rm -rf rpmbuild + +Install newer version of autoconf and automake (Package versions are too +old) + +:: + + curl -O http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz + tar xvf autoconf-2.69.tar.gz + cd autoconf-2.69 + ./configure --prefix=/usr + make + sudo make install + cd .. + + curl -O http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz + tar xvf automake-1.15.tar.gz + cd automake-1.15 + ./configure --prefix=/usr + make + sudo make install + cd .. + +Install ``Python 2.7`` in parallel to default 2.6. Make sure you've +install EPEL (``epel-release`` as above). Then install current +``python27``, ``python27-devel`` and ``pytest`` + +:: + + sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm + sudo rpm -ivh https://centos6.iuscommunity.org/ius-release.rpm + sudo yum install python27 python27-pip python27-devel + sudo pip2.7 install pytest + +Please note that ``CentOS 6`` needs to keep python pointing to version +2.6 for ``yum`` to keep working, so don't create a symlink for python2.7 +to python + +Install newer ``Sphinx-Build`` based on ``Python 2.7`` + +Create a new repo ``/etc/yum.repos.d/puias6.repo`` with the following contents: + +:: + + ### Name: RPM Repository for RHEL 6 - PUIAS (used for Sphinx-Build) + ### URL: http://springdale.math.ias.edu/data/puias/computational + [puias-computational] + name = RPM Repository for RHEL 6 - Sphinx-Build + baseurl = http://springdale.math.ias.edu/data/puias/computational/$releasever/$basearch + #mirrorlist = + enabled = 1 + protect = 0 + gpgkey = + gpgcheck = 0 + +Update rpm database & Install newer sphinx + +:: + + sudo yum update + sudo yum install python27-sphinx + +Get FRR, compile it and install it (from Git) +--------------------------------------------- + +**This assumes you want to build and install FRR from source and not +using any packages** + +Add frr groups and user +~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo groupadd -g 92 frr + sudo groupadd -r -g 85 frrvt + sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \ + -c "FRR FRRouting suite" -d /var/run/frr frr + +Download Source, configure and compile it +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(You may prefer different options on configure statement. These are just +an example.) + +:: + + git clone https://github.com/frrouting/frr.git frr + cd frr + ./bootstrap.sh + ./configure \ + --bindir=/usr/bin \ + --sbindir=/usr/lib/frr \ + --sysconfdir=/etc/frr \ + --libdir=/usr/lib/frr \ + --libexecdir=/usr/lib/frr \ + --localstatedir=/var/run/frr \ + --with-moduledir=/usr/lib/frr/modules \ + --disable-pimd \ + --enable-snmp=agentx \ + --enable-multipath=64 \ + --enable-ospfclient=yes \ + --enable-ospfapi=yes \ + --enable-user=frr \ + --enable-group=frr \ + --enable-vty-group=frrvt \ + --enable-rtadv \ + --disable-exampledir \ + --enable-watchfrr \ + --disable-ldpd \ + --enable-fpm \ + --enable-nhrpd \ + --enable-eigrpd \ + --enable-babeld \ + --with-pkg-git-version \ + --with-pkg-extra-version=-MyOwnFRRVersion + make SPHINXBUILD=sphinx-build2.7 + make check PYTHON=/usr/bin/python2.7 SPHINXBUILD=sphinx-build2.7 + sudo make SPHINXBUILD=sphinx-build2.7 install + +Create empty FRR configuration files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo mkdir /var/log/frr + sudo mkdir /etc/frr + sudo touch /etc/frr/zebra.conf + sudo touch /etc/frr/bgpd.conf + sudo touch /etc/frr/ospfd.conf + sudo touch /etc/frr/ospf6d.conf + sudo touch /etc/frr/isisd.conf + sudo touch /etc/frr/ripd.conf + sudo touch /etc/frr/ripngd.conf + sudo touch /etc/frr/nhrpd.conf + sudo touch /etc/frr/eigrpd.conf + sudo touch /etc/frr/babeld.conf + sudo chown -R frr:frr /etc/frr/ + sudo touch /etc/frr/vtysh.conf + sudo chown frr:frrvt /etc/frr/vtysh.conf + sudo chmod 640 /etc/frr/*.conf + +Install daemon config file +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo install -p -m 644 redhat/daemons /etc/frr/ + sudo chown frr:frr /etc/frr/daemons + +Edit /etc/frr/daemons as needed to select the required daemons +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Look for the section with ``watchfrr_enable=...`` and ``zebra=...`` etc. +Enable the daemons as required by changing the value to ``yes`` + +Enable IP & IPv6 forwarding +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Edit ``/etc/sysctl.conf`` and set the following values (ignore the other +settings) + +:: + + # Controls IP packet forwarding + net.ipv4.ip_forward = 1 + net.ipv6.conf.all.forwarding=1 + + # Controls source route verification + net.ipv4.conf.default.rp_filter = 0 + +Load the modifed sysctl's on the system: + +:: + + sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf + +Add init.d startup files +~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo install -p -m 755 redhat/frr.init /etc/init.d/frr + sudo chkconfig --add frr + +Enable frr daemon at startup +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo chkconfig frr on + +Start FRR manually (or reboot) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo /etc/init.d/frr start diff --git a/doc/developer/building-frr-on-centos7.rst b/doc/developer/building-frr-on-centos7.rst new file mode 100644 index 0000000000..9807543e17 --- /dev/null +++ b/doc/developer/building-frr-on-centos7.rst @@ -0,0 +1,169 @@ +CentOS 7 +======================================== + +(As an alternative to this installation, you may prefer to create a FRR +rpm package yourself and install that package instead. See instructions +in redhat/README.rpm\_build.md on how to build a rpm package) + +CentOS 7 restrictions: +---------------------- + +- MPLS is not supported on ``CentOS 7`` with default kernel. MPLS + requires Linux Kernel 4.5 or higher (LDP can be built, but may have + limited use without MPLS) + +Install required packages +------------------------- + +Add packages: + +:: + + sudo yum install git autoconf automake libtool make gawk \ + readline-devel texinfo net-snmp-devel groff pkgconfig \ + json-c-devel pam-devel bison flex pytest c-ares-devel \ + perl-XML-LibXML python-devel systemd-devel python-sphinx + +Get FRR, compile it and install it (from Git) +--------------------------------------------- + +**This assumes you want to build and install FRR from source and not +using any packages** + +Add frr groups and user +~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo groupadd -g 92 frr + sudo groupadd -r -g 85 frrvt + sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \ + -c "FRR FRRouting suite" -d /var/run/frr frr + +Download Source, configure and compile it +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(You may prefer different options on configure statement. These are just +an example.) + +:: + + git clone https://github.com/frrouting/frr.git frr + cd frr + ./bootstrap.sh + ./configure \ + --bindir=/usr/bin \ + --sbindir=/usr/lib/frr \ + --sysconfdir=/etc/frr \ + --libdir=/usr/lib/frr \ + --libexecdir=/usr/lib/frr \ + --localstatedir=/var/run/frr \ + --with-moduledir=/usr/lib/frr/modules \ + --enable-pimd \ + --enable-snmp=agentx \ + --enable-multipath=64 \ + --enable-ospfclient=yes \ + --enable-ospfapi=yes \ + --enable-user=frr \ + --enable-group=frr \ + --enable-vty-group=frrvt \ + --enable-rtadv \ + --enable-systemd=yes \ + --disable-exampledir \ + --enable-watchfrr \ + --disable-ldpd \ + --enable-fpm \ + --enable-nhrpd \ + --enable-eigrpd \ + --enable-babeld \ + --with-pkg-git-version \ + --with-pkg-extra-version=-MyOwnFRRVersion + make + make check + sudo make install + +Create empty FRR configuration files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo mkdir /var/log/frr + sudo mkdir /etc/frr + sudo touch /etc/frr/zebra.conf + sudo touch /etc/frr/bgpd.conf + sudo touch /etc/frr/ospfd.conf + sudo touch /etc/frr/ospf6d.conf + sudo touch /etc/frr/isisd.conf + sudo touch /etc/frr/ripd.conf + sudo touch /etc/frr/ripngd.conf + sudo touch /etc/frr/pimd.conf + sudo touch /etc/frr/nhrpd.conf + sudo touch /etc/frr/eigrpd.conf + sudo touch /etc/frr/babeld.conf + sudo chown -R frr:frr /etc/frr/ + sudo touch /etc/frr/vtysh.conf + sudo chown frr:frrvt /etc/frr/vtysh.conf + sudo chmod 640 /etc/frr/*.conf + +Install daemon config file +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo install -p -m 644 redhat/daemons /etc/frr/ + sudo chown frr:frr /etc/frr/daemons + +Edit /etc/frr/daemons as needed to select the required daemons +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Look for the section with ``watchfrr_enable=...`` and ``zebra=...`` etc. +Enable the daemons as required by changing the value to ``yes`` + +Enable IP & IPv6 forwarding +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Create a new file ``/etc/sysctl.d/90-routing-sysctl.conf`` with the +following content: + +:: + + # Sysctl for routing + # + # Routing: We need to forward packets + net.ipv4.conf.all.forwarding=1 + net.ipv6.conf.all.forwarding=1 + +Load the modifed sysctl's on the system: + +:: + + sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf + +Install frr Service and redhat init files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo install -p -m 644 redhat/frr.service /usr/lib/systemd/system/frr.service + sudo install -p -m 755 redhat/frr.init /usr/lib/frr/frr + +Register the systemd files +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo systemctl preset frr.service + +Enable required frr at startup +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo systemctl enable frr + +Reboot or start FRR manually +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo systemctl start frr diff --git a/doc/developer/building-frr-on-debian8.rst b/doc/developer/building-frr-on-debian8.rst new file mode 100644 index 0000000000..36ed0c4e66 --- /dev/null +++ b/doc/developer/building-frr-on-debian8.rst @@ -0,0 +1,156 @@ +Debian 8 +======================================== + +Debian 8 restrictions: +---------------------- + +- MPLS is not supported on ``Debian 8`` with default kernel. MPLS + requires Linux Kernel 4.5 or higher (LDP can be built, but may have + limited use without MPLS) + +Install required packages +------------------------- + +Add packages: + +:: + + sudo apt-get install git autoconf automake libtool make gawk \ + libreadline-dev texinfo libjson-c-dev pkg-config bison flex \ + python-pip libc-ares-dev python3-dev python3-sphinx + +Install newer pytest (>3.0) from pip + +:: + + sudo pip install pytest + +Get FRR, compile it and install it (from Git) +--------------------------------------------- + +**This assumes you want to build and install FRR from source and not +using any packages** + +Add frr groups and user +~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo addgroup --system --gid 92 frr + sudo addgroup --system --gid 85 frrvty + sudo adduser --system --ingroup frr --home /var/run/frr/ \ + --gecos "FRR suite" --shell /bin/false frr + sudo usermod -a -G frrvty frr + +Download Source, configure and compile it +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(You may prefer different options on configure statement. These are just +an example.) + +:: + + git clone https://github.com/frrouting/frr.git frr + cd frr + ./bootstrap.sh + ./configure \ + --enable-exampledir=/usr/share/doc/frr/examples/ \ + --localstatedir=/var/run/frr \ + --sbindir=/usr/lib/frr \ + --sysconfdir=/etc/frr \ + --enable-vtysh \ + --enable-isisd \ + --enable-pimd \ + --enable-watchfrr \ + --enable-ospfclient=yes \ + --enable-ospfapi=yes \ + --enable-multipath=64 \ + --enable-user=frr \ + --enable-group=frr \ + --enable-vty-group=frrvty \ + --enable-configfile-mask=0640 \ + --enable-logfile-mask=0640 \ + --enable-rtadv \ + --enable-fpm \ + --enable-ldpd \ + --with-pkg-git-version \ + --with-pkg-extra-version=-MyOwnFRRVersion + make + make check + sudo make install + +Create empty FRR configuration files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo install -m 755 -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 frr /dev/null /etc/frr/zebra.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf + sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf + +Enable IP & IPv6 forwarding +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the +other settings) + +:: + + # 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 + +Troubleshooting +~~~~~~~~~~~~~~~ + +**Local state directory** + +The local state directory must exist and have the correct permissions +applied for the frrouting daemons to start. In the above ./configure +example the local state directory is set to /var/run/frr +(--localstatedir=/var/run/frr) Debian considers /var/run/frr to be +temporary and this is removed after a reboot. + +When using a different local state directory you need to create the new +directory and change the ownership to the frr user, for example: + +:: + + mkdir /var/opt/frr + chown frr /var/opt/frr + +**Shared library error** + +If you try and start any of the frrouting daemons you may see the below +error due to the frrouting shared library directory not being found: + +:: + + ./zebra: error while loading shared libraries: libfrr.so.0: cannot open shared object file: No such file or directory + +The fix is to add the following line to /etc/ld.so.conf which will +continue to reference the library directory after the system reboots. To +load the library directory path immediately run the ldconfig command +after adding the line to the file eg: + +:: + + echo include /usr/local/lib >> /etc/ld.so.conf + ldconfig diff --git a/doc/developer/building-frr-on-debian9.rst b/doc/developer/building-frr-on-debian9.rst new file mode 100644 index 0000000000..a1aa63236c --- /dev/null +++ b/doc/developer/building-frr-on-debian9.rst @@ -0,0 +1,131 @@ +Debian 9 +======================================== + +Install required packages +------------------------- + +Add packages: + +:: + + sudo apt-get install git autoconf automake libtool make \ + libreadline-dev texinfo libjson-c-dev pkg-config bison flex \ + python-pip libc-ares-dev python3-dev python-pytest python3-sphinx + +Get FRR, compile it and install it (from Git) +--------------------------------------------- + +**This assumes you want to build and install FRR from source and not +using any packages** + +Add frr groups and user +~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo addgroup --system --gid 92 frr + sudo addgroup --system --gid 85 frrvty + sudo adduser --system --ingroup frr --home /var/opt/frr/ \ + --gecos "FRR suite" --shell /bin/false frr + sudo usermod -a -G frrvty frr + +Download Source, configure and compile it +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(You may prefer different options on configure statement. These are just +an example.) + +:: + + git clone https://github.com/frrouting/frr.git frr + cd frr + git checkout stable/3.0 + ./bootstrap.sh + ./configure \ + --enable-exampledir=/usr/share/doc/frr/examples/ \ + --localstatedir=/var/opt/frr \ + --sbindir=/usr/lib/frr \ + --sysconfdir=/etc/frr \ + --enable-vtysh \ + --enable-isisd \ + --enable-pimd \ + --enable-watchfrr \ + --enable-ospfclient=yes \ + --enable-ospfapi=yes \ + --enable-multipath=64 \ + --enable-user=frr \ + --enable-group=frr \ + --enable-vty-group=frrvty \ + --enable-configfile-mask=0640 \ + --enable-logfile-mask=0640 \ + --enable-rtadv \ + --enable-fpm \ + --enable-ldpd \ + --with-pkg-git-version \ + --with-pkg-extra-version=-MyOwnFRRVersion + make + make check + sudo make install + +Create empty FRR configuration files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo install -m 755 -o frr -g frr -d /var/log/frr + sudo install -m 755 -o frr -g frr -d /var/opt/frr + sudo install -m 775 -o frr -g frrvty -d /etc/frr + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf + sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf + +Enable IP & IPv6 forwarding +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the +other settings) + +:: + + # 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 + +Troubleshooting +--------------- + +Shared library error +~~~~~~~~~~~~~~~~~~~~ + +If you try and start any of the frrouting daemons you may see the below +error due to the frrouting shared library directory not being found: + +:: + + ./zebra: error while loading shared libraries: libfrr.so.0: cannot open + shared object file: No such file or directory + +The fix is to add the following line to /etc/ld.so.conf which will +continue to reference the library directory after the system reboots. To +load the library directory path immediately run the ldconfig command +after adding the line to the file eg: + +:: + + echo include /usr/local/lib >> /etc/ld.so.conf + ldconfig diff --git a/doc/developer/building-frr-on-fedora24.rst b/doc/developer/building-frr-on-fedora24.rst new file mode 100644 index 0000000000..ed81d3f59c --- /dev/null +++ b/doc/developer/building-frr-on-fedora24.rst @@ -0,0 +1,177 @@ +Fedora 24 +========================================= + +(As an alternative to this installation, you may prefer to create a FRR +rpm package yourself and install that package instead. See instructions +in redhat/README.rpm\_build.md on how to build a rpm package) + +Install required packages +------------------------- + +Add packages: + +:: + + sudo dnf install git autoconf automake libtool make gawk \ + readline-devel texinfo net-snmp-devel groff pkgconfig \ + json-c-devel pam-devel perl-XML-LibXML pytest bison flex \ + c-ares-devel python3-devel python3-sphinx + +Get FRR, compile it and install it (from Git) +--------------------------------------------- + +**This assumes you want to build and install FRR from source and not +using any packages** + +Add frr groups and user +~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo groupadd -g 92 frr + sudo groupadd -r -g 85 frrvt + sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \ + -c "FRR FRRouting suite" -d /var/run/frr frr + +Download Source, configure and compile it +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(You may prefer different options on configure statement. These are just +an example.) + +:: + + git clone https://github.com/frrouting/frr.git frr + cd frr + ./bootstrap.sh + ./configure \ + --bindir=/usr/bin \ + --sbindir=/usr/lib/frr \ + --sysconfdir=/etc/frr \ + --libdir=/usr/lib/frr \ + --libexecdir=/usr/lib/frr \ + --localstatedir=/var/run/frr \ + --with-moduledir=/usr/lib/frr/modules \ + --enable-pimd \ + --enable-snmp=agentx \ + --enable-multipath=64 \ + --enable-ospfclient=yes \ + --enable-ospfapi=yes \ + --enable-user=frr \ + --enable-group=frr \ + --enable-vty-group=frrvt \ + --enable-rtadv \ + --disable-exampledir \ + --enable-watchfrr \ + --enable-ldpd \ + --enable-fpm \ + --enable-nhrpd \ + --enable-eigrpd \ + --enable-babeld \ + --with-pkg-git-version \ + --with-pkg-extra-version=-MyOwnFRRVersion + make + make check + sudo make install + +Create empty FRR configuration files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo mkdir /var/log/frr + sudo mkdir /etc/frr + sudo touch /etc/frr/zebra.conf + sudo touch /etc/frr/bgpd.conf + sudo touch /etc/frr/ospfd.conf + sudo touch /etc/frr/ospf6d.conf + sudo touch /etc/frr/isisd.conf + sudo touch /etc/frr/ripd.conf + sudo touch /etc/frr/ripngd.conf + sudo touch /etc/frr/pimd.conf + sudo touch /etc/frr/ldpd.conf + sudo touch /etc/frr/nhrpd.conf + sudo touch /etc/frr/eigrpd.conf + sudo touch /etc/frr/babeld.conf + sudo chown -R frr:frr /etc/frr/ + sudo touch /etc/frr/vtysh.conf + sudo chown frr:frrvt /etc/frr/vtysh.conf + sudo chmod 640 /etc/frr/*.conf + +Install daemon config file +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo install -p -m 644 redhat/daemons /etc/frr/ + sudo chown frr:frr /etc/frr/daemons + +Edit /etc/frr/daemons as needed to select the required daemons +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Look for the section with ``watchfrr_enable=...`` and ``zebra=...`` etc. +Enable the daemons as required by changing the value to ``yes`` + +Enable IP & IPv6 forwarding (and MPLS) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Create a new file ``/etc/sysctl.d/90-routing-sysctl.conf`` with the +following content: (Please make sure to list all interfaces with +required MPLS similar to ``net.mpls.conf.eth0.input=1``) + +:: + + # Sysctl for routing + # + # Routing: We need to forward packets + net.ipv4.conf.all.forwarding=1 + net.ipv6.conf.all.forwarding=1 + # + # 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 + +Load the modifed sysctl's on the system: + +:: + + sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf + +Create a new file ``/etc/modules-load.d/mpls.conf`` with the following +content: + +:: + + # Load MPLS Kernel Modules + mpls-router + mpls-iptunnel + +And load the kernel modules on the running system: + +:: + + sudo modprobe mpls-router mpls-iptunnel + +Install frr Service and redhat init files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo install -p -m 644 redhat/frr.service /usr/lib/systemd/system/frr.service + sudo install -p -m 755 redhat/frr.init /usr/lib/frr/frr + +Enable required frr at startup +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo systemctl enable frr + +Reboot or start FRR manually +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo systemctl start frr diff --git a/doc/developer/building-frr-on-freebsd10.rst b/doc/developer/building-frr-on-freebsd10.rst new file mode 100644 index 0000000000..ccbe8c55c3 --- /dev/null +++ b/doc/developer/building-frr-on-freebsd10.rst @@ -0,0 +1,109 @@ +FreeBSD 10 +========================================== + +FreeBSD 10 restrictions: +------------------------ + +- MPLS is not supported on ``FreeBSD``. MPLS requires a Linux Kernel + (4.5 or higher). LDP can be built, but may have limited use without + MPLS + +Install required packages +------------------------- + +Add packages: (Allow the install of the package managment tool if this +is first package install and asked) + +:: + + pkg install git autoconf automake libtool gmake gawk json-c pkgconf \ + bison flex py27-pytest c-ares python3 py-sphinx + +Make sure there is no /usr/bin/flex preinstalled (and use the newly +installed in /usr/local/bin): (FreeBSD frequently provides a older flex +as part of the base OS which takes preference in path) + +:: + + rm -f /usr/bin/flex + +Get FRR, compile it and install it (from Git) +--------------------------------------------- + +**This assumes you want to build and install FRR from source and not +using any packages** + +Add frr group and user +~~~~~~~~~~~~~~~~~~~~~~ + +:: + + pw groupadd frr -g 101 + pw groupadd frrvty -g 102 + pw adduser frr -g 101 -u 101 -G 102 -c "FRR suite" \ + -d /usr/local/etc/frr -s /usr/sbin/nologin + +(You may prefer different options on configure statement. These are just +an example) + +:: + + git clone https://github.com/frrouting/frr.git frr + cd frr + ./bootstrap.sh + export MAKE=gmake + export LDFLAGS="-L/usr/local/lib" + export CPPFLAGS="-I/usr/local/include" + ./configure \ + --sysconfdir=/usr/local/etc/frr \ + --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \ + --localstatedir=/var/run/frr \ + --prefix=/usr/local \ + --enable-ospfclient=yes \ + --enable-ospfapi=yes \ + --enable-multipath=64 \ + --enable-user=frr \ + --enable-group=frr \ + --enable-vty-group=frrvty \ + --enable-configfile-mask=0640 \ + --enable-logfile-mask=0640 \ + --enable-rtadv \ + --enable-fpm \ + --with-pkg-git-version \ + --with-pkg-extra-version=-MyOwnFRRVersion + gmake + gmake check + sudo gmake install + +Create empty FRR configuration files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo mkdir /usr/local/etc/frr + sudo touch /usr/local/etc/frr/zebra.conf + sudo touch /usr/local/etc/frr/bgpd.conf + sudo touch /usr/local/etc/frr/ospfd.conf + sudo touch /usr/local/etc/frr/ospf6d.conf + sudo touch /usr/local/etc/frr/isisd.conf + sudo touch /usr/local/etc/frr/ripd.conf + sudo touch /usr/local/etc/frr/ripngd.conf + sudo touch /usr/local/etc/frr/pimd.conf + sudo chown -R frr:frr /usr/local/etc/frr + sudo touch /usr/local/etc/frr/vtysh.conf + sudo chown frr:frrvty /usr/local/etc/frr/vtysh.conf + sudo chmod 640 /usr/local/etc/frr/*.conf + +Enable IP & IPv6 forwarding +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Add the following lines to the end of ``/etc/sysctl.conf``: + +:: + + # Routing: We need to forward packets + net.inet.ip.forwarding=1 + net.inet6.ip6.forwarding=1 + +**Reboot** or use ``sysctl`` to apply the same config to the running +system diff --git a/doc/developer/building-frr-on-freebsd11.rst b/doc/developer/building-frr-on-freebsd11.rst new file mode 100644 index 0000000000..214fdbf9c8 --- /dev/null +++ b/doc/developer/building-frr-on-freebsd11.rst @@ -0,0 +1,109 @@ +FreeBSD 11 +========================================== + +FreeBSD 11 restrictions: +------------------------ + +- MPLS is not supported on ``FreeBSD``. MPLS requires a Linux Kernel + (4.5 or higher). LDP can be built, but may have limited use without + MPLS + +Install required packages +------------------------- + +Add packages: (Allow the install of the package managment tool if this +is first package install and asked) + +:: + + pkg install git autoconf automake libtool gmake gawk json-c pkgconf \ + bison flex py27-pytest c-ares python3 py-sphinx + +Make sure there is no /usr/bin/flex preinstalled (and use the newly +installed in /usr/local/bin): (FreeBSD frequently provides a older flex +as part of the base OS which takes preference in path) + +:: + + rm -f /usr/bin/flex + +Get FRR, compile it and install it (from Git) +--------------------------------------------- + +**This assumes you want to build and install FRR from source and not +using any packages** + +Add frr group and user +~~~~~~~~~~~~~~~~~~~~~~ + +:: + + pw groupadd frr -g 101 + pw groupadd frrvty -g 102 + pw adduser frr -g 101 -u 101 -G 102 -c "FRR suite" \ + -d /usr/local/etc/frr -s /usr/sbin/nologin + +(You may prefer different options on configure statement. These are just +an example) + +:: + + git clone https://github.com/frrouting/frr.git frr + cd frr + ./bootstrap.sh + export MAKE=gmake + export LDFLAGS="-L/usr/local/lib" + export CPPFLAGS="-I/usr/local/include" + ./configure \ + --sysconfdir=/usr/local/etc/frr \ + --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \ + --localstatedir=/var/run/frr \ + --prefix=/usr/local \ + --enable-ospfclient=yes \ + --enable-ospfapi=yes \ + --enable-multipath=64 \ + --enable-user=frr \ + --enable-group=frr \ + --enable-vty-group=frrvty \ + --enable-configfile-mask=0640 \ + --enable-logfile-mask=0640 \ + --enable-rtadv \ + --enable-fpm \ + --with-pkg-git-version \ + --with-pkg-extra-version=-MyOwnFRRVersion + gmake + gmake check + sudo gmake install + +Create empty FRR configuration files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo mkdir /usr/local/etc/frr + sudo touch /usr/local/etc/frr/zebra.conf + sudo touch /usr/local/etc/frr/bgpd.conf + sudo touch /usr/local/etc/frr/ospfd.conf + sudo touch /usr/local/etc/frr/ospf6d.conf + sudo touch /usr/local/etc/frr/isisd.conf + sudo touch /usr/local/etc/frr/ripd.conf + sudo touch /usr/local/etc/frr/ripngd.conf + sudo touch /usr/local/etc/frr/pimd.conf + sudo chown -R frr:frr /usr/local/etc/frr + sudo touch /usr/local/etc/frr/vtysh.conf + sudo chown frr:frrvty /usr/local/etc/frr/vtysh.conf + sudo chmod 640 /usr/local/etc/frr/*.conf + +Enable IP & IPv6 forwarding +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Add the following lines to the end of ``/etc/sysctl.conf``: + +:: + + # Routing: We need to forward packets + net.inet.ip.forwarding=1 + net.inet6.ip6.forwarding=1 + +**Reboot** or use ``sysctl`` to apply the same config to the running +system diff --git a/doc/developer/building-frr-on-freebsd9.rst b/doc/developer/building-frr-on-freebsd9.rst new file mode 100644 index 0000000000..909b3a8d64 --- /dev/null +++ b/doc/developer/building-frr-on-freebsd9.rst @@ -0,0 +1,122 @@ +FreeBSD 9 +========================================= + +FreeBSD 9 restrictions: +----------------------- + +- MPLS is not supported on ``FreeBSD``. MPLS requires a Linux Kernel + (4.5 or higher). LDP can be built, but may have limited use without + MPLS + +Install required packages +------------------------- + +Add packages: (Allow the install of the package managment tool if this +is first package install and asked) + +:: + + pkg install -y git autoconf automake libtool gmake gawk \ + pkgconf texinfo json-c bison flex py27-pytest c-ares \ + python3 py-sphinx + +Make sure there is no /usr/bin/flex preinstalled (and use the newly +installed in /usr/local/bin): (FreeBSD frequently provides a older flex +as part of the base OS which takes preference in path) + +:: + + rm -f /usr/bin/flex + +For building with clang (instead of gcc), upgrade clang from 3.4 default +to 3.6 *This is needed to build FreeBSD packages as well - for packages +clang is default* (Clang 3.4 as shipped with FreeBSD 9 crashes during +compile) + +:: + + pkg install clang36 + pkg delete clang34 + mv /usr/bin/clang /usr/bin/clang34 + ln -s /usr/local/bin/clang36 /usr/bin/clang + +Get FRR, compile it and install it (from Git) +--------------------------------------------- + +**This assumes you want to build and install FRR from source and not +using any packages** + +Add frr group and user +~~~~~~~~~~~~~~~~~~~~~~ + +:: + + pw groupadd frr -g 101 + pw groupadd frrvty -g 102 + pw adduser frr -g 101 -u 101 -G 102 -c "FRR suite" \ + -d /usr/local/etc/frr -s /usr/sbin/nologin + +(You may prefer different options on configure statement. These are just +an example) + +:: + + git clone https://github.com/frrouting/frr.git frr + cd frr + ./bootstrap.sh + export MAKE=gmake + export LDFLAGS="-L/usr/local/lib" + export CPPFLAGS="-I/usr/local/include" + ./configure \ + --sysconfdir=/usr/local/etc/frr \ + --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \ + --localstatedir=/var/run/frr \ + --prefix=/usr/local \ + --enable-ospfclient=yes \ + --enable-ospfapi=yes \ + --enable-multipath=64 \ + --enable-user=frr \ + --enable-group=frr \ + --enable-vty-group=frrvty \ + --enable-configfile-mask=0640 \ + --enable-logfile-mask=0640 \ + --enable-rtadv \ + --enable-fpm \ + --with-pkg-git-version \ + --with-pkg-extra-version=-MyOwnFRRVersion + gmake + gmake check + sudo gmake install + +Create empty FRR configuration files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo mkdir /usr/local/etc/frr + sudo touch /usr/local/etc/frr/zebra.conf + sudo touch /usr/local/etc/frr/bgpd.conf + sudo touch /usr/local/etc/frr/ospfd.conf + sudo touch /usr/local/etc/frr/ospf6d.conf + sudo touch /usr/local/etc/frr/isisd.conf + sudo touch /usr/local/etc/frr/ripd.conf + sudo touch /usr/local/etc/frr/ripngd.conf + sudo touch /usr/local/etc/frr/pimd.conf + sudo chown -R frr:frr /usr/local/etc/frr + sudo touch /usr/local/etc/frr/vtysh.conf + sudo chown frr:frrvty /usr/local/etc/frr/vtysh.conf + sudo chmod 640 /usr/local/etc/frr/*.conf + +Enable IP & IPv6 forwarding +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Add the following lines to the end of ``/etc/sysctl.conf``: + +:: + + # Routing: We need to forward packets + net.inet.ip.forwarding=1 + net.inet6.ip6.forwarding=1 + +**Reboot** or use ``sysctl`` to apply the same config to the running +system diff --git a/doc/developer/building-frr-on-lede-openwrt.rst b/doc/developer/building-frr-on-lede-openwrt.rst new file mode 100644 index 0000000000..b9ee9c51e1 --- /dev/null +++ b/doc/developer/building-frr-on-lede-openwrt.rst @@ -0,0 +1,108 @@ +OpenWRT/LEDE +============================================= + +- for the moment because of cross compile problems, master is not + supported, only up to 3.0 +- LDP can't be built because of missing Perl-XML-LibXML in OpenWRT/LEDE + tree + +Prepare build environment +------------------------- + +https://lede-project.org/docs/guide-developer/install-buildsystem + +for + +Ubuntu 12.04LTS: + +:: + + sudo apt-get install build-essential subversion git-core \ + libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc \ + libxml-parser-perl mercurial bzr ecj cvs unzip python3-sphinx + +Ubuntu 64bit: + +:: + + sudo apt-get install build-essential subversion libncurses5-dev zlib1g-dev \ + gawk gcc-multilib flex git-core gettext libssl-dev python3-sphinx + +Debian 8 Jessie: + +:: + + sudo apt-get install build-essential libncurses5-dev gawk git subversion \ + libssl-dev gettext unzip zlib1g-dev file python python3-sphinx + +Debian 9 Stretch: + +:: + + sudo apt-get install build-essential libncurses5-dev gawk git subversion \ + libssl-dev gettext zlib1g-dev python3-sphinx + +Centos x86-64 (some packages require EPEL): + +:: + + yum install subversion binutils bzip2 gcc gcc-c++ gawk gettext flex \ + ncurses-devel zlib-devel zlib-static make patch unzip glibc glibc-devel \ + perl-ExtUtils-MakeMaker glibc-static quilt ncurses-libs sed sdcc bison \ + intltool sharutils wget git-core openssl-devel xz python-sphinx + +Fedora 24 - 64Bit: + +:: + + dnf install -y subversion binutils bzip2 gcc gcc-c++ gawk gettext git-core \ + unzip ncurses-devel ncurses-compat-libs zlib-devel zlib-static make \ + flex patch perl-ExtUtils-MakeMaker perl-Thread-Queue glibc glibc-devel \ + glibc-static quilt sed sdcc intltool sharutils bison wget openssl-devel \ + python3-sphinx + +Get LEDE Sources (from Git) +--------------------------- + +LEDE and OpenWRT is planned to remerge and won't cover the similar +OpenWRT build As normal user: git clone +https://git.lede-project.org/source.git lede cd lede ./scripts/feeds +update -a ./scripts/feeds install -a cd feeds/routing git pull origin +pull/319/head ln -s ../../../feeds/routing/frr/ +../../package/feeds/routing/ cd ../.. make menuconfig + +Select the needed target then select needed packages in Network -> +Routing and Redirection -> frr, exit and save + +:: + + make or make package/frr/compile + +It may be possible that on first build ``make package/frr/compile`` not +to work and it may be needed to run a ``make`` for the entire build +envronment, add V=s for debugging + +Work with sources +----------------- + +To update the rc1 version or add other options, the Makefile is found in +feeds/routing/frr + +edit: PKG\_VERSION:= PKG\_SOURCE\_VERSION:= + +Usage +----- + +Edit ``/usr/sbin/frr.init`` and add/remove the daemons name in section +DAEMONS= or don't install unneded packages For example: zebra bgpd ldpd +isisd nhrpd ospfd ospf6d pimd ripd ripngd + +Enable the serivce +~~~~~~~~~~~~~~~~~~ + +- service frr enable + +Start the service +~~~~~~~~~~~~~~~~~ + +- service frr start diff --git a/doc/developer/building-frr-on-netbsd6.rst b/doc/developer/building-frr-on-netbsd6.rst new file mode 100644 index 0000000000..ce5c58045f --- /dev/null +++ b/doc/developer/building-frr-on-netbsd6.rst @@ -0,0 +1,147 @@ +NetBSD 6 +======================================== + +NetBSD 6 restrictions: +---------------------- + +- MPLS is not supported on ``NetBSD``. MPLS requires a Linux Kernel + (4.5 or higher). LDP can be built, but may have limited use without + MPLS + +Install required packages +------------------------- + +Configure Package location: + +:: + + PKG_PATH="ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/`uname -m`/`uname -r`/All" + export PKG_PATH + +Add packages: + +:: + + sudo pkg_add git autoconf automake libtool gmake gawk openssl \ + pkg-config json-c python27 py27-test python35 py-sphinx + +Install SSL Root Certificates (for git https access): + +:: + + sudo pkg_add mozilla-rootcerts + sudo touch /etc/openssl/openssl.cnf + sudo mozilla-rootcerts install + +Select default Python and py.test + +:: + + sudo ln -s /usr/pkg/bin/python2.7 /usr/bin/python + sudo ln -s /usr/pkg/bin/py.test-2.7 /usr/bin/py.test + +Get FRR, compile it and install it (from Git) +--------------------------------------------- + +Add frr groups and user +~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo groupadd -g 92 frr + sudo groupadd -g 93 frrvty + sudo useradd -g 92 -u 92 -G frrvty -c "FRR suite" \ + -d /nonexistent -s /sbin/nologin frr + +Download Source, configure and compile it +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(You may prefer different options on configure statement. These are just +an example) + +:: + + git clone https://github.com/frrouting/frr.git frr + cd frr + ./bootstrap.sh + MAKE=gmake + export LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib" + export CPPFLAGS="-I/usr/pkg/include" + ./configure \ + --sysconfdir=/usr/pkg/etc/frr \ + --enable-exampledir=/usr/pkg/share/examples/frr \ + --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \ + --localstatedir=/var/run/frr \ + --enable-ospfclient=yes \ + --enable-ospfapi=yes \ + --enable-multipath=64 \ + --enable-user=frr \ + --enable-group=frr \ + --enable-vty-group=frrvty \ + --enable-configfile-mask=0640 \ + --enable-logfile-mask=0640 \ + --enable-rtadv \ + --enable-fpm \ + --with-pkg-git-version \ + --with-pkg-extra-version=-MyOwnFRRVersion + gmake + gmake check + sudo gmake install + +Create empty FRR configuration files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo mkdir /var/log/frr + sudo mkdir /usr/pkg/etc/frr + sudo touch /usr/pkg/etc/frr/zebra.conf + sudo touch /usr/pkg/etc/frr/bgpd.conf + sudo touch /usr/pkg/etc/frr/ospfd.conf + sudo touch /usr/pkg/etc/frr/ospf6d.conf + sudo touch /usr/pkg/etc/frr/isisd.conf + sudo touch /usr/pkg/etc/frr/ripd.conf + sudo touch /usr/pkg/etc/frr/ripngd.conf + sudo touch /usr/pkg/etc/frr/pimd.conf + sudo chown -R frr:frr /usr/pkg/etc/frr + sudo touch /usr/local/etc/frr/vtysh.conf + sudo chown frr:frrvty /usr/pkg/etc/frr/*.conf + sudo chmod 640 /usr/pkg/etc/frr/*.conf + +Enable IP & IPv6 forwarding +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Add the following lines to the end of ``/etc/sysctl.conf``: + +:: + + # Routing: We need to forward packets + net.inet.ip.forwarding=1 + net.inet6.ip6.forwarding=1 + +**Reboot** or use ``sysctl`` to apply the same config to the running +system + +Install rc.d init files +~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + cp pkgsrc/*.sh /etc/rc.d/ + chmod 555 /etc/rc.d/*.sh + +Enable FRR processes +~~~~~~~~~~~~~~~~~~~~ + +(Enable the required processes only) + +:: + + echo "zebra=YES" >> /etc/rc.conf + echo "bgpd=YES" >> /etc/rc.conf + echo "ospfd=YES" >> /etc/rc.conf + echo "ospf6d=YES" >> /etc/rc.conf + echo "isisd=YES" >> /etc/rc.conf + echo "ripngd=YES" >> /etc/rc.conf + echo "ripd=YES" >> /etc/rc.conf + echo "pimd=YES" >> /etc/rc.conf diff --git a/doc/developer/building-frr-on-netbsd7.rst b/doc/developer/building-frr-on-netbsd7.rst new file mode 100644 index 0000000000..eaaf87fd19 --- /dev/null +++ b/doc/developer/building-frr-on-netbsd7.rst @@ -0,0 +1,137 @@ +NetBSD 7 +======================================== + +NetBSD 7 restrictions: +---------------------- + +- MPLS is not supported on ``NetBSD``. MPLS requires a Linux Kernel + (4.5 or higher). LDP can be built, but may have limited use without + MPLS + +Install required packages +------------------------- + +:: + + sudo pkgin install git autoconf automake libtool gmake gawk openssl \ + pkg-config json-c python27 py27-test python35 py-sphinx + +Install SSL Root Certificates (for git https access): + +:: + + sudo pkgin install mozilla-rootcerts + sudo touch /etc/openssl/openssl.cnf + sudo mozilla-rootcerts install + +Select default Python and py.test + +:: + + sudo ln -s /usr/pkg/bin/python2.7 /usr/bin/python + sudo ln -s /usr/pkg/bin/py.test-2.7 /usr/bin/py.test + +Get FRR, compile it and install it (from Git) +--------------------------------------------- + +Add frr groups and user +~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo groupadd -g 92 frr + sudo groupadd -g 93 frrvty + sudo useradd -g 92 -u 92 -G frrvty -c "FRR suite" \ + -d /nonexistent -s /sbin/nologin frr + +Download Source, configure and compile it +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(You may prefer different options on configure statement. These are just +an example) + +:: + + git clone https://github.com/frrouting/frr.git frr + cd frr + ./bootstrap.sh + MAKE=gmake + export LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib" + export CPPFLAGS="-I/usr/pkg/include" + ./configure \ + --sysconfdir=/usr/pkg/etc/frr \ + --enable-exampledir=/usr/pkg/share/examples/frr \ + --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \ + --localstatedir=/var/run/frr \ + --enable-ospfclient=yes \ + --enable-ospfapi=yes \ + --enable-multipath=64 \ + --enable-user=frr \ + --enable-group=frr \ + --enable-vty-group=frrvty \ + --enable-configfile-mask=0640 \ + --enable-logfile-mask=0640 \ + --enable-rtadv \ + --enable-fpm \ + --with-pkg-git-version \ + --with-pkg-extra-version=-MyOwnFRRVersion + gmake + gmake check + sudo gmake install + +Create empty FRR configuration files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo mkdir /usr/pkg/etc/frr + sudo touch /usr/pkg/etc/frr/zebra.conf + sudo touch /usr/pkg/etc/frr/bgpd.conf + sudo touch /usr/pkg/etc/frr/ospfd.conf + sudo touch /usr/pkg/etc/frr/ospf6d.conf + sudo touch /usr/pkg/etc/frr/isisd.conf + sudo touch /usr/pkg/etc/frr/ripd.conf + sudo touch /usr/pkg/etc/frr/ripngd.conf + sudo touch /usr/pkg/etc/frr/pimd.conf + sudo chown -R frr:frr /usr/pkg/etc/frr + sudo touch /usr/local/etc/frr/vtysh.conf + sudo chown frr:frrvty /usr/pkg/etc/frr/*.conf + sudo chmod 640 /usr/pkg/etc/frr/*.conf + +Enable IP & IPv6 forwarding +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Add the following lines to the end of ``/etc/sysctl.conf``: + +:: + + # Routing: We need to forward packets + net.inet.ip.forwarding=1 + net.inet6.ip6.forwarding=1 + +**Reboot** or use ``sysctl`` to apply the same config to the running +system + +Install rc.d init files +~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + cp pkgsrc/*.sh /etc/rc.d/ + chmod 555 /etc/rc.d/*.sh + +Enable FRR processes +~~~~~~~~~~~~~~~~~~~~ + +(Enable the required processes only) + +:: + + echo "zebra=YES" >> /etc/rc.conf + echo "bgpd=YES" >> /etc/rc.conf + echo "ospfd=YES" >> /etc/rc.conf + echo "ospf6d=YES" >> /etc/rc.conf + echo "isisd=YES" >> /etc/rc.conf + echo "ripngd=YES" >> /etc/rc.conf + echo "ripd=YES" >> /etc/rc.conf + echo "pimd=YES" >> /etc/rc.conf diff --git a/doc/developer/building-frr-on-omnios.rst b/doc/developer/building-frr-on-omnios.rst new file mode 100644 index 0000000000..0eb2b9fec8 --- /dev/null +++ b/doc/developer/building-frr-on-omnios.rst @@ -0,0 +1,146 @@ +OmniOS (OpenSolaris) +==================================================== + +OmniOS restrictions: +-------------------- + +- MPLS is not supported on ``OmniOS`` or ``Solaris``. MPLS requires a + Linux Kernel (4.5 or higher). LDP can be built, but may have limited + use without MPLS + +Enable IP & IPv6 forwarding +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + routeadm -e ipv4-forwarding + routeadm -e ipv6-forwarding + +Install required packages +------------------------- + +Add packages: + +:: + + pkg install \ + developer/build/autoconf \ + developer/build/automake \ + developer/lexer/flex \ + developer/parser/bison \ + developer/object-file \ + developer/linker \ + developer/library/lint \ + developer/build/gnu-make \ + developer/gcc51 \ + library/idnkit \ + library/idnkit/header-idnkit \ + system/header \ + system/library/math/header-math \ + git libtool gawk pkg-config + +Add additional Solaris packages: + +:: + + pkgadd -d http://get.opencsw.org/now + /opt/csw/bin/pkgutil -U + /opt/csw/bin/pkgutil -y -i texinfo + /opt/csw/bin/pkgutil -y -i perl + /opt/csw/bin/pkgutil -y -i libjson_c_dev + /opt/csw/bin/pkgutil -y -i python27 py_pip python27_dev + +Add libjson to Solaris equivalent of ld.so.conf + +:: + + crle -l /opt/csw/lib -u + +Add pytest: + +:: + + pip install pytest + +Install Sphinx::: + + pip install sphinx + +Select Python 2.7 as default (required for pytest) + +:: + + rm -f /usr/bin/python + ln -s /opt/csw/bin/python2.7 /usr/bin/python + +Fix PATH for all users and non-interactive sessions. Edit +``/etc/default/login`` and add the following default PATH: + +:: + + PATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/opt/csw/bin + +Edit ``~/.profile`` and add the following default PATH: + +:: + + PATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/opt/csw/bin + +Get FRR, compile it and install it (from Git) +--------------------------------------------- + +**This assumes you want to build and install FRR from source and not +using any packages** + +Add frr group and user +~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo groupadd -g 93 frr + sudo groupadd -g 94 frrvty + sudo useradd -g 93 -u 93 -G frrvty -c "FRR suite" \ + -d /nonexistent -s /bin/false frr + +(You may prefer different options on configure statement. These are just +an example) + +:: + + git clone https://github.com/frrouting/frr.git frr + cd frr + ./bootstrap.sh + export MAKE=gmake + export LDFLAGS="-L/opt/csw/lib" + export CPPFLAGS="-I/opt/csw/include" + export PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig + ./configure \ + --sysconfdir=/etc/frr \ + --enable-exampledir=/usr/share/doc/frr/examples/ \ + --localstatedir=/var/run/frr \ + --sbindir=/usr/lib/frr \ + --enable-vtysh \ + --enable-watchfrr \ + --enable-ospfclient=yes \ + --enable-ospfapi=yes \ + --enable-multipath=64 \ + --enable-user=frr \ + --enable-group=frr \ + --enable-vty-group=frrvty \ + --enable-configfile-mask=0640 \ + --enable-logfile-mask=0640 \ + --enable-rtadv \ + --enable-fpm \ + --with-pkg-git-version \ + --with-pkg-extra-version=-MyOwnFRRVersion + gmake + gmake check + sudo gmake install + +Enable IP & IPv6 forwarding +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + routeadm -e ipv4-forwarding + routeadm -e ipv6-forwarding diff --git a/doc/developer/building-frr-on-openbsd6.rst b/doc/developer/building-frr-on-openbsd6.rst new file mode 100644 index 0000000000..895048886e --- /dev/null +++ b/doc/developer/building-frr-on-openbsd6.rst @@ -0,0 +1,169 @@ +OpenBSD 6 +========================================= + +Install required packages +------------------------- + +Configure PKG\_PATH + +:: + + export PKG_PATH=http://ftp5.usa.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(machine -a)/ + +Add packages: + +:: + + pkg_add git autoconf-2.69p2 automake-1.15p0 libtool bison + pkg_add gmake gawk dejagnu openssl json-c py-test py-sphinx + +Select Python2.7 as default (required for pytest) + +:: + + ln -s /usr/local/bin/python2.7 /usr/local/bin/python + +Get FRR, compile it and install it (from Git) +--------------------------------------------- + +**This assumes you want to build and install FRR from source and not +using any packages** + +Add frr group and user +~~~~~~~~~~~~~~~~~~~~~~ + +:: + + groupadd -g 525 _frr + groupadd -g 526 _frrvty + useradd -g 525 -u 525 -c "FRR suite" -G _frrvty \ + -d /nonexistent -s /sbin/nologin _frr + +Download Source, configure and compile it +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(You may prefer different options on configure statement. These are just +an example) + +:: + + git clone https://github.com/frrouting/frr.git frr + cd frr + export AUTOCONF_VERSION="2.69" + export AUTOMAKE_VERSION="1.15" + ./bootstrap.sh + export LDFLAGS="-L/usr/local/lib" + export CPPFLAGS="-I/usr/local/include" + ./configure \ + --sysconfdir=/etc/frr \ + --localstatedir=/var/frr \ + --enable-pimd \ + --enable-ospfclient=yes \ + --enable-ospfapi=yes \ + --enable-multipath=64 \ + --enable-user=_frr \ + --enable-group=_frr \ + --enable-vty-group=_frrvty \ + --enable-configfile-mask=0640 \ + --enable-logfile-mask=0640 \ + --enable-rtadv \ + --enable-fpm \ + --with-pkg-git-version \ + --with-pkg-extra-version=-MyOwnFRRVersion + gmake + gmake check + doas gmake install + +Create empty FRR configuration files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + doas mkdir /var/frr + doas chown _frr:_frr /var/frr + doas chmod 755 /var/frr + doas mkdir /etc/frr + doas touch /etc/frr/zebra.conf + doas touch /etc/frr/bgpd.conf + doas touch /etc/frr/ospfd.conf + doas touch /etc/frr/ospf6d.conf + doas touch /etc/frr/isisd.conf + doas touch /etc/frr/ripd.conf + doas touch /etc/frr/ripngd.conf + doas touch /etc/frr/pimd.conf + doas touch /etc/frr/ldpd.conf + doas touch /etc/frr/nhrpd.conf + doas chown -R _frr:_frr /etc/frr + doas touch /etc/frr/vtysh.conf + doas chown -R _frr:_frrvty /etc/frr/vtysh.conf + doas chmod 750 /etc/frr + doas chmod 640 /etc/frr/*.conf + +Enable IP & IPv6 forwarding +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Add the following lines to the end of ``/etc/rc.conf``: + +:: + + net.inet6.ip6.forwarding=1 # 1=Permit forwarding of IPv6 packets + net.inet6.ip6.mforwarding=1 # 1=Permit forwarding of IPv6 multicast packets + net.inet6.ip6.multipath=1 # 1=Enable IPv6 multipath routing + +**Reboot** to apply the config to the system + +Enable MPLS Forwarding +~~~~~~~~~~~~~~~~~~~~~~ + +To enable MPLS forwarding on a given interface, use the following +command: + +:: + + doas ifconfig em0 mpls + +Alternatively, to make MPLS forwarding persistent across reboots, add +the "mpls" keyword in the hostname.\* files of the desired interfaces. +Example: + +:: + + cat /etc/hostname.em0 + inet 10.0.1.1 255.255.255.0 mpls + +Install rc.d init files +~~~~~~~~~~~~~~~~~~~~~~~ + +(create them in /etc/rc.d - no example are included at this time with +FRR source) + +Example (for zebra - store as ``/etc/rc.d/frr_zebra.sh``) + +:: + + #!/bin/sh + # + # $OpenBSD: frr_zebra.rc,v 1.1 2013/04/18 20:29:08 sthen Exp $ + + daemon="/usr/local/sbin/zebra -d" + + . /etc/rc.d/rc.subr + + rc_cmd $1 + +Enable FRR processes +~~~~~~~~~~~~~~~~~~~~ + +(Enable the required processes only) + +:: + + echo "frr_zebra=YES" >> /etc/rc.conf + echo "frr_bgpd=YES" >> /etc/rc.conf + echo "frr_ospfd=YES" >> /etc/rc.conf + echo "frr_ospf6d=YES" >> /etc/rc.conf + echo "frr_isisd=YES" >> /etc/rc.conf + echo "frr_ripngd=YES" >> /etc/rc.conf + echo "frr_ripd=YES" >> /etc/rc.conf + echo "frr_pimd=YES" >> /etc/rc.conf + echo "frr_ldpd=YES" >> /etc/rc.conf diff --git a/doc/developer/building-frr-on-ubuntu1204.rst b/doc/developer/building-frr-on-ubuntu1204.rst new file mode 100644 index 0000000000..68e476fec2 --- /dev/null +++ b/doc/developer/building-frr-on-ubuntu1204.rst @@ -0,0 +1,187 @@ +Ubuntu 12.04LTS +=============================================== + +- MPLS is not supported on ``Ubuntu 12.04`` with default kernel. MPLS + requires Linux Kernel 4.5 or higher (LDP can be built, but may have + limited use without MPLS) For an updated Ubuntu Kernel, see + http://kernel.ubuntu.com/~kernel-ppa/mainline/ + +Install required packages +------------------------- + +Add packages: + +:: + + apt-get install git autoconf automake libtool make gawk libreadline-dev \ + texinfo libpam0g-dev dejagnu libjson0-dev pkg-config libpam0g-dev \ + libjson0-dev flex python-pip libc-ares-dev python3-dev python3-sphinx + +Install newer bison from 14.04 package source (Ubuntu 12.04 package +source is too old) + +:: + + mkdir builddir + cd builddir + wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg-2.dsc + wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg.orig.tar.bz2 + wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg-2.debian.tar.gz + tar -jxvf bison_3.0.2.dfsg.orig.tar.bz2 + cd bison-3.0.2.dfsg/ + tar xzf ../bison_3.0.2.dfsg-2.debian.tar.gz + sudo apt-get build-dep bison + debuild -b -uc -us + cd .. + sudo dpkg -i ./libbison-dev_3.0.2.dfsg-2_amd64.deb ./bison_3.0.2.dfsg-2_amd64.deb + cd .. + rm -rf builddir + +Install newer version of autoconf and automake: + +:: + + wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz + tar xvf autoconf-2.69.tar.gz + cd autoconf-2.69 + ./configure --prefix=/usr + make + sudo make install + cd .. + + wget http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz + tar xvf automake-1.15.tar.gz + cd automake-1.15 + ./configure --prefix=/usr + make + sudo make install + cd .. + +Install pytest: + +:: + + pip install pytest + +Get FRR, compile it and install it (from Git) +--------------------------------------------- + +**This assumes you want to build and install FRR from source and not +using any packages** + +Add frr groups and user +~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo groupadd -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 + +Download Source, configure and compile it +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(You may prefer different options on configure statement. These are just +an example.) + +:: + + git clone https://github.com/frrouting/frr.git frr + cd frr + ./bootstrap.sh + ./configure \ + --prefix=/usr \ + --enable-exampledir=/usr/share/doc/frr/examples/ \ + --localstatedir=/var/run/frr \ + --sbindir=/usr/lib/frr \ + --sysconfdir=/etc/frr \ + --enable-pimd \ + --enable-watchfrr \ + --enable-ospfclient=yes \ + --enable-ospfapi=yes \ + --enable-multipath=64 \ + --enable-user=frr \ + --enable-group=frr \ + --enable-vty-group=frrvty \ + --enable-configfile-mask=0640 \ + --enable-logfile-mask=0640 \ + --enable-rtadv \ + --enable-fpm \ + --with-pkg-git-version \ + --with-pkg-extra-version=-MyOwnFRRVersion + make + make check + sudo make install + +Create empty FRR configuration files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo install -m 755 -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 frr /dev/null /etc/frr/zebra.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf + sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf + +Enable IP & IPv6 forwarding +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the +other settings) + +:: + + # 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 + +Install the init.d service +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo install -m 755 tools/frr /etc/init.d/frr + sudo install -m 644 tools/etc/frr/daemons /etc/frr/daemons + sudo install -m 644 tools/etc/frr/daemons.conf /etc/frr/daemons.conf + sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf + +Enable daemons +~~~~~~~~~~~~~~ + +| Edit ``/etc/frr/daemons`` and change the value from "no" to "yes" for + those daemons you want to start by systemd. +| For example. + +:: + + zebra=yes + bgpd=yes + ospfd=yes + ospf6d=yes + ripd=yes + ripngd=yes + isisd=yes + +Start the init.d service +~~~~~~~~~~~~~~~~~~~~~~~~ + +- /etc/init.d/frr start +- use ``/etc/init.d/frr status`` to check its status. diff --git a/doc/developer/building-frr-on-ubuntu1404.rst b/doc/developer/building-frr-on-ubuntu1404.rst new file mode 100644 index 0000000000..10944cb8e1 --- /dev/null +++ b/doc/developer/building-frr-on-ubuntu1404.rst @@ -0,0 +1,139 @@ +Ubuntu 14.04LTS +=============================================== + +- MPLS is not supported on ``Ubuntu 14.04`` with default kernel. MPLS + requires Linux Kernel 4.5 or higher (LDP can be built, but may have + limited use without MPLS) For an updated Ubuntu Kernel, see + http://kernel.ubuntu.com/~kernel-ppa/mainline/ + +Install required packages +------------------------- + +Add packages: + +:: + + apt-get install git autoconf automake libtool make gawk libreadline-dev \ + texinfo dejagnu pkg-config libpam0g-dev libjson-c-dev bison flex \ + python-pytest libc-ares-dev python3-dev python3-sphinx + +Get FRR, compile it and install it (from Git) +--------------------------------------------- + +**This assumes you want to build and install FRR from source and not +using any packages** + +Add frr groups and user +~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo groupadd -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 + +Download Source, configure and compile it +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(You may prefer different options on configure statement. These are just +an example.) + +:: + + git clone https://github.com/frrouting/frr.git frr + cd frr + ./bootstrap.sh + ./configure \ + --prefix=/usr \ + --enable-exampledir=/usr/share/doc/frr/examples/ \ + --localstatedir=/var/run/frr \ + --sbindir=/usr/lib/frr \ + --sysconfdir=/etc/frr \ + --enable-pimd \ + --enable-watchfrr \ + --enable-ospfclient=yes \ + --enable-ospfapi=yes \ + --enable-multipath=64 \ + --enable-user=frr \ + --enable-group=frr \ + --enable-vty-group=frrvty \ + --enable-configfile-mask=0640 \ + --enable-logfile-mask=0640 \ + --enable-rtadv \ + --enable-fpm \ + --enable-ldpd \ + --with-pkg-git-version \ + --with-pkg-extra-version=-MyOwnFRRVersion + make + make check + sudo make install + +Create empty FRR configuration files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo install -m 755 -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 frr /dev/null /etc/frr/zebra.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf + sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf + +Enable IP & IPv6 forwarding +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the +other settings) + +:: + + # 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 ### Install the init.d service + +:: + + sudo install -m 755 tools/frr /etc/init.d/frr + sudo install -m 644 tools/etc/frr/daemons /etc/frr/daemons + sudo install -m 644 tools/etc/frr/daemons.conf /etc/frr/daemons.conf + sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf + +Enable daemons +~~~~~~~~~~~~~~ + +| Edit ``/etc/frr/daemons`` and change the value from "no" to "yes" for + those daemons you want to start by systemd. +| For example. + +:: + + zebra=yes + bgpd=yes + ospfd=yes + ospf6d=yes + ripd=yes + ripngd=yes + isisd=yes + +Start the init.d service +~~~~~~~~~~~~~~~~~~~~~~~~ + +- /etc/init.d/frr start +- use ``/etc/init.d/frr status`` to check its status. diff --git a/doc/developer/building-frr-on-ubuntu1604.rst b/doc/developer/building-frr-on-ubuntu1604.rst new file mode 100644 index 0000000000..9c296f8edf --- /dev/null +++ b/doc/developer/building-frr-on-ubuntu1604.rst @@ -0,0 +1,176 @@ +Ubuntu 16.04LTS +=============================================== + +- MPLS is not supported on ``Ubuntu 16.04`` with default kernel. MPLS + requires Linux Kernel 4.5 or higher (LDP can be built, but may have + limited use without MPLS) For an updated Ubuntu Kernel, see + http://kernel.ubuntu.com/~kernel-ppa/mainline/ + +Install required packages +------------------------- + +Add packages: + +:: + + apt-get install git autoconf automake libtool make gawk libreadline-dev \ + texinfo dejagnu pkg-config libpam0g-dev libjson-c-dev bison flex \ + python-pytest libc-ares-dev python3-dev libsystemd-dev python-ipaddr \ + python3-sphinx + +Get FRR, compile it and install it (from Git) +--------------------------------------------- + +**This assumes you want to build and install FRR from source and not +using any packages** + +Add frr groups and user +~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo groupadd -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 + +Download Source, configure and compile it +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(You may prefer different options on configure statement. These are just +an example.) + +:: + + git clone https://github.com/frrouting/frr.git frr + cd frr + ./bootstrap.sh + ./configure \ + --prefix=/usr \ + --enable-exampledir=/usr/share/doc/frr/examples/ \ + --localstatedir=/var/run/frr \ + --sbindir=/usr/lib/frr \ + --sysconfdir=/etc/frr \ + --enable-pimd \ + --enable-watchfrr \ + --enable-ospfclient=yes \ + --enable-ospfapi=yes \ + --enable-multipath=64 \ + --enable-user=frr \ + --enable-group=frr \ + --enable-vty-group=frrvty \ + --enable-configfile-mask=0640 \ + --enable-logfile-mask=0640 \ + --enable-rtadv \ + --enable-fpm \ + --enable-systemd=yes \ + --with-pkg-git-version \ + --with-pkg-extra-version=-MyOwnFRRVersion + make + make check + sudo make install + +Create empty FRR configuration files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo install -m 755 -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 frr /dev/null /etc/frr/zebra.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf + sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf + +Enable IPv4 & IPv6 forwarding +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the +other settings) + +:: + + # 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 + +Enable MPLS Forwarding (with Linux Kernel >= 4.5) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Edit ``/etc/sysctl.conf`` and the following lines. Make sure to add a +line equal to ``net.mpls.conf.eth0.input`` or each interface used with +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 + +Add MPLS kernel modules +~~~~~~~~~~~~~~~~~~~~~~~ + +Add the following lines to ``/etc/modules-load.d/modules.conf``: + +:: + + # Load MPLS Kernel Modules + mpls-router + mpls-iptunnel + +**Reboot** or use ``sysctl -p`` to apply the same config to the running +system + +Install the systemd service (if rebooted from last step, change directory back to frr directory) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + sudo install -m 644 tools/frr.service /etc/systemd/system/frr.service + sudo install -m 644 tools/etc/default/frr /etc/default/frr + sudo install -m 644 tools/etc/frr/daemons /etc/frr/daemons + sudo install -m 644 tools/etc/frr/daemons.conf /etc/frr/daemons.conf + sudo install -m 644 tools/etc/frr/frr.conf /etc/frr/frr.conf + sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf + +Enable daemons +~~~~~~~~~~~~~~ + +| Edit ``/etc/frr/daemons`` and change the value from "no" to "yes" for + those daemons you want to start by systemd. +| For example. + +:: + + zebra=yes + bgpd=yes + ospfd=yes + ospf6d=yes + ripd=yes + ripngd=yes + isisd=yes + +Enable the systemd service +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- systemctl enable frr + +Start the systemd service +~~~~~~~~~~~~~~~~~~~~~~~~~ + +- systemctl start frr +- use ``systemctl status frr`` to check its status. diff --git a/doc/developer/building.rst b/doc/developer/building.rst index e56744ad87..a10e4a245c 100644 --- a/doc/developer/building.rst +++ b/doc/developer/building.rst @@ -4,20 +4,20 @@ Building FRR .. toctree:: :maxdepth: 2 - Building_FRR_on_LEDE-OpenWRT - Building_FRR_on_Alpine - Building_FRR_on_CentOS6 - Building_FRR_on_CentOS7 - Building_FRR_on_Debian8 - Building_FRR_on_Debian9 - Building_FRR_on_Fedora24 - Building_FRR_on_FreeBSD10 - Building_FRR_on_FreeBSD11 - Building_FRR_on_FreeBSD9 - Building_FRR_on_NetBSD6 - Building_FRR_on_NetBSD7 - Building_FRR_on_OmniOS - Building_FRR_on_OpenBSD6 - Building_FRR_on_Ubuntu1204 - Building_FRR_on_Ubuntu1404 - Building_FRR_on_Ubuntu1604 + building-frr-on-lede-openwrt + building-frr-on-alpine + building-frr-on-centos6 + building-frr-on-centos7 + building-frr-on-debian8 + building-frr-on-debian9 + building-frr-on-fedora24 + building-frr-on-freebsd10 + building-frr-on-freebsd11 + building-frr-on-freebsd9 + building-frr-on-netbsd6 + building-frr-on-netbsd7 + building-frr-on-omnios + building-frr-on-openbsd6 + building-frr-on-ubuntu1204 + building-frr-on-ubuntu1404 + building-frr-on-ubuntu1604 diff --git a/doc/developer/dev-modules.md b/doc/developer/dev-modules.md deleted file mode 100644 index 87bc963188..0000000000 --- a/doc/developer/dev-modules.md +++ /dev/null @@ -1,119 +0,0 @@ -# Module and Hook support (developer docs) - -## What it does - -It uses `dlopen()` to load DSOs at startup. - - -## Limitations - -* can't load, unload, or reload during runtime. This just needs some work - and can probably be done in the future. -* doesn't fix any of the "things need to be changed in the code in the library" - issues. Most prominently, you can't add a CLI node because CLI nodes are - listed in the library... -* if your module crashes, the daemon crashes. Should be obvious. -* **does not provide a stable API or ABI**. Your module must match a version - of FRR and you may have to update it frequently to match changes. -* **does not create a license boundary**. Your module will need to link - libzebra and include header files from the daemons, meaning it will be - GPL-encumbered. - - -## Installation - -Look for `moduledir` in `configure.ac`, default is normally -`/usr/lib64/frr/modules` but depends on `--libdir` / `--prefix`. - -The daemon's name is prepended when looking for a module, e.g. "snmp" tries -to find "zebra_snmp" first when used in zebra. This is just to make it nicer -for the user, with the snmp module having the same name everywhere. - -Modules can be packaged separately from FRR. The SNMP and FPM modules are -good candidates for this because they have dependencies (net-snmp / protobuf) -that are not FRR dependencies. However, any distro packages should have an -"exact-match" dependency onto the FRR package. Using a module from a -different FRR version will probably blow up nicely. - -For snapcraft (and during development), modules can be loaded with full path -(e.g. -M `$SNAP/lib/frr/modules/zebra_snmp.so`). Note that libtool puts output -files in the .libs directory, so during development you have to use -`./zebra -M .libs/zebra_snmp.so`. - - -## Creating a module - -... best to look at the existing SNMP or FPM modules. - -Basic boilerplate: - -``` -#include "hook.h" -#include "module.h" - -static int -module_init (void) -{ - hook_register(frr_late_init, module_late_init); - return 0; -} - -FRR_MODULE_SETUP( - .name = "my module", - .version = "0.0", - .description = "my module", - .init = module_init, -) -``` - -The `frr_late_init` hook will be called after the daemon has finished its -other startup and is about to enter the main event loop; this is the best -place for most initialisation. - - -## Compiler & Linker magic - -There's a `THIS_MODULE` (like in the Linux kernel), which uses `visibility` -attributes to restrict it to the current module. If you get a linker error -with `_frrmod_this_module`, there is some linker SNAFU. This shouldn't be -possible, though one way to get it would be to not include libzebra (which -provides a fallback definition for the symbol). - -libzebra and the daemons each have their own `THIS_MODULE`, as do all loadable -modules. In any other libraries (e.g. `libfrrsnmp`), `THIS_MODULE` will use -the definition in libzebra; same applies if the main executable doesn't use -`FRR_DAEMON_INFO` (e.g. all testcases). - -The deciding factor here is "what dynamic linker unit are you using the symbol -from." If you're in a library function and want to know who called you, you -can't use `THIS_MODULE` (because that'll just tell you you're in the library). -Put a macro around your function that adds `THIS_MODULE` in the *caller's -code calling your function*. - -The idea is to use this in the future for module unloading. Hooks already -remember which module they were installed by, as groundwork for a function -that removes all of a module's installed hooks. - -There's also the `frr_module` symbol in modules, pretty much a standard entry -point for loadable modules. - - -## Hooks - -Hooks are just points in the code where you can register your callback to -be called. The parameter list is specific to the hook point. Since there is -no stable API, the hook code has some extra type safety checks making sure -you get a compiler warning when the hook parameter list doesn't match your -callback. Don't ignore these warnings. - - -## Relation to MTYPE macros - -The MTYPE macros, while primarily designed to decouple MTYPEs from the library -and beautify the code, also work very nicely with loadable modules -- both -constructors and destructors are executed when loading/unloading modules. - -This means there is absolutely no change required to MTYPEs, you can just use -them in a module and they will even clean up themselves when we implement -module unloading and an unload happens. In fact, it's impossible to create -a bug where unloading fails to de-register a MTYPE.