From a500c91ad5ca08ca69ef9f02e155c5dc218e11a7 Mon Sep 17 00:00:00 2001 From: Jarad Olson Date: Tue, 15 May 2018 11:49:18 -0600 Subject: [PATCH 01/11] Change order of MPLS configuration MPLS kernel modules should be initialized *before* enabling forwarding. Otherwise, errors. Signed-off-by: Jarad Olson --- doc/developer/building-frr-on-ubuntu1804.rst | 28 ++++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/doc/developer/building-frr-on-ubuntu1804.rst b/doc/developer/building-frr-on-ubuntu1804.rst index 17edb7ef4f..7c65747bd5 100644 --- a/doc/developer/building-frr-on-ubuntu1804.rst +++ b/doc/developer/building-frr-on-ubuntu1804.rst @@ -101,6 +101,20 @@ other settings) # based on Router Advertisements for this host net.ipv6.conf.all.forwarding=1 +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 + Enable MPLS Forwarding (with Linux Kernel >= 4.5) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -116,20 +130,6 @@ MPLS 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) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ From 6d30cb199c34920d0c9201cd84c4b0e311e0299b Mon Sep 17 00:00:00 2001 From: Jarad Olson Date: Tue, 15 May 2018 11:50:00 -0600 Subject: [PATCH 02/11] MPLS kernel module name change Names of the MPLS kernel modules changed slightly in recent kernel. Uses underscore instead of dash. Signed-off-by: Jarad Olson --- doc/developer/building-frr-on-ubuntu1804.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/developer/building-frr-on-ubuntu1804.rst b/doc/developer/building-frr-on-ubuntu1804.rst index 7c65747bd5..cc1087966a 100644 --- a/doc/developer/building-frr-on-ubuntu1804.rst +++ b/doc/developer/building-frr-on-ubuntu1804.rst @@ -109,8 +109,8 @@ Add the following lines to ``/etc/modules-load.d/modules.conf``: :: # Load MPLS Kernel Modules - mpls-router - mpls-iptunnel + mpls_router + mpls_iptunnel **Reboot** or use ``sysctl -p`` to apply the same config to the running system From 07b17fdbf756e549333315ecacf3721aa3957728 Mon Sep 17 00:00:00 2001 From: Jarad Olson Date: Tue, 15 May 2018 11:50:34 -0600 Subject: [PATCH 03/11] Change style of required packages list The required packages list should be easier to parse. Updated the style so it's more similar to the ``./configure`` style later in the document. Signed-off-by: Jarad Olson --- doc/developer/building-frr-on-ubuntu1804.rst | 24 ++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/doc/developer/building-frr-on-ubuntu1804.rst b/doc/developer/building-frr-on-ubuntu1804.rst index cc1087966a..1d8d6cb42f 100644 --- a/doc/developer/building-frr-on-ubuntu1804.rst +++ b/doc/developer/building-frr-on-ubuntu1804.rst @@ -8,10 +8,26 @@ Add packages: :: - apt-get install git autoconf automake libtool make gawk libreadline-dev \ - texinfo pkg-config libpam0g-dev libjson-c-dev bison flex \ - python-pytest libc-ares-dev python3-dev libsystemd-dev python-ipaddr \ - python3-sphinx + apt-get install \ + git \ + autoconf \ + automake \ + libtool \ + make \ + gawk \ + libreadline-dev \ + texinfo \ + 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) --------------------------------------------- From acdc582fd5232aec0edea6ddb9f86f36a2cab259 Mon Sep 17 00:00:00 2001 From: Jarad Olson Date: Tue, 15 May 2018 11:51:14 -0600 Subject: [PATCH 04/11] Change 'Install required packages' to 'Install dependencies' Signed-off-by: Jarad Olson --- doc/developer/building-frr-on-ubuntu1804.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/developer/building-frr-on-ubuntu1804.rst b/doc/developer/building-frr-on-ubuntu1804.rst index 1d8d6cb42f..b990c2aba1 100644 --- a/doc/developer/building-frr-on-ubuntu1804.rst +++ b/doc/developer/building-frr-on-ubuntu1804.rst @@ -1,7 +1,7 @@ Ubuntu 18.04LTS =============================================== -Install required packages +Install dependencies ------------------------- Add packages: From 47f64e34086e3bf029fbab2c73b877d3ebca6338 Mon Sep 17 00:00:00 2001 From: Jarad Olson Date: Tue, 15 May 2018 11:51:40 -0600 Subject: [PATCH 05/11] Added optional packages section Signed-off-by: Jarad Olson --- doc/developer/building-frr-on-ubuntu1804.rst | 25 ++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/doc/developer/building-frr-on-ubuntu1804.rst b/doc/developer/building-frr-on-ubuntu1804.rst index b990c2aba1..3ac4b06488 100644 --- a/doc/developer/building-frr-on-ubuntu1804.rst +++ b/doc/developer/building-frr-on-ubuntu1804.rst @@ -3,8 +3,8 @@ Ubuntu 18.04LTS Install dependencies ------------------------- - -Add packages: +Required packages +^^^^^^^^^^^^^^^^^ :: @@ -29,6 +29,27 @@ Add packages: python-ipaddr \ python3-sphinx +Optional packages +^^^^^^^^^^^^^^^^^ + +Dependencies for additional functionality can be installed as-desired. + +Protobuf +~~~~~~~~ + +:: + sudo apt-get install \ + protobuf-c-compiler \ + libprotobuf-c-dev + +ZeroMQ +~~~~~~ + +:: + sudo apt-get install \ + libzmq5 \ + libzmq3-dev + Get FRR, compile it and install it (from Git) --------------------------------------------- From 140b0a5ea220859ae6bf9c991cfb7bdcba9f9017 Mon Sep 17 00:00:00 2001 From: Jarad Olson Date: Tue, 15 May 2018 11:52:05 -0600 Subject: [PATCH 06/11] Split compile section into more granular steps - Added reference for additional configure options - Added configure options for 0MQ and Protobuf Signed-off-by: Jarad Olson --- doc/developer/building-frr-on-ubuntu1804.rst | 32 +++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/doc/developer/building-frr-on-ubuntu1804.rst b/doc/developer/building-frr-on-ubuntu1804.rst index 3ac4b06488..90a393f54e 100644 --- a/doc/developer/building-frr-on-ubuntu1804.rst +++ b/doc/developer/building-frr-on-ubuntu1804.rst @@ -67,15 +67,19 @@ Add frr groups and user --gecos "FRR suite" --shell /sbin/nologin frr sudo usermod -a -G frrvty frr -Download Source, configure and compile it +Download source ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -(You may prefer different options on configure statement. These are just -an example.) - :: git clone https://github.com/frrouting/frr.git frr + +Configure +^^^^^^^^^ +Options below are provided as an example. See `User Guide/Installation ` for more. + +:: + cd frr ./bootstrap.sh ./configure \ @@ -99,6 +103,26 @@ an example.) --enable-systemd=yes \ --with-pkg-git-version \ --with-pkg-extra-version=-MyOwnFRRVersion + +If optional packages were installed, the associated feature may now be +enabled. + +Protobuf +~~~~~~~~ + +:: + --enable-protobuf + +ZeroMQ +~~~~~~ + +:: + --enable-zeromq + +Compile +^^^^^^^ + +:: make make check sudo make install From 0beb75be81f61864ffd2de1143ba19ba090ee4cc Mon Sep 17 00:00:00 2001 From: Jarad Olson Date: Tue, 15 May 2018 11:52:32 -0600 Subject: [PATCH 07/11] Changed apt-get to sudo apt-get Context should be unpriviliged until explicity stated. Signed-off-by: Jarad Olson --- doc/developer/building-frr-on-ubuntu1804.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/developer/building-frr-on-ubuntu1804.rst b/doc/developer/building-frr-on-ubuntu1804.rst index 90a393f54e..5512158034 100644 --- a/doc/developer/building-frr-on-ubuntu1804.rst +++ b/doc/developer/building-frr-on-ubuntu1804.rst @@ -8,7 +8,7 @@ Required packages :: - apt-get install \ + sudo apt-get install \ git \ autoconf \ automake \ From d0648b3e674b3d784262b8356e163394e8b81cc3 Mon Sep 17 00:00:00 2001 From: Jarad Olson Date: Tue, 15 May 2018 12:01:11 -0600 Subject: [PATCH 08/11] Fixup code block formatting errors Signed-off-by: Jarad Olson --- doc/developer/building-frr-on-ubuntu1804.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/developer/building-frr-on-ubuntu1804.rst b/doc/developer/building-frr-on-ubuntu1804.rst index 5512158034..2efa1e655d 100644 --- a/doc/developer/building-frr-on-ubuntu1804.rst +++ b/doc/developer/building-frr-on-ubuntu1804.rst @@ -38,6 +38,7 @@ Protobuf ~~~~~~~~ :: + sudo apt-get install \ protobuf-c-compiler \ libprotobuf-c-dev @@ -46,6 +47,7 @@ ZeroMQ ~~~~~~ :: + sudo apt-get install \ libzmq5 \ libzmq3-dev @@ -111,18 +113,21 @@ Protobuf ~~~~~~~~ :: + --enable-protobuf ZeroMQ ~~~~~~ :: + --enable-zeromq Compile ^^^^^^^ :: + make make check sudo make install From bd938314384005118b9cd4a7c712836fe58f5f57 Mon Sep 17 00:00:00 2001 From: Jarad Olson Date: Tue, 15 May 2018 12:04:48 -0600 Subject: [PATCH 09/11] Re-worded information on MPLS support in 18.04 Signed-off-by: Jarad Olson --- doc/developer/building-frr-on-ubuntu1804.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/developer/building-frr-on-ubuntu1804.rst b/doc/developer/building-frr-on-ubuntu1804.rst index 2efa1e655d..a117a82e0c 100644 --- a/doc/developer/building-frr-on-ubuntu1804.rst +++ b/doc/developer/building-frr-on-ubuntu1804.rst @@ -170,7 +170,8 @@ other settings) Add MPLS kernel modules ^^^^^^^^^^^^^^^^^^^^^^^ -Add the following lines to ``/etc/modules-load.d/modules.conf``: +Ubuntu 18.04 ships with kernel 4.15. MPLS modules are present by default. +To enable, add the following lines to ``/etc/modules-load.d/modules.conf``: :: @@ -181,7 +182,7 @@ Add the following lines to ``/etc/modules-load.d/modules.conf``: **Reboot** or use ``sysctl -p`` to apply the same config to the running system -Enable MPLS Forwarding (with Linux Kernel >= 4.5) +Enable MPLS Forwarding ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Edit ``/etc/sysctl.conf`` and the following lines. Make sure to add a From d5c8283249e2081490f74d006523d6ea373f019c Mon Sep 17 00:00:00 2001 From: Jarad Olson Date: Tue, 15 May 2018 12:25:07 -0600 Subject: [PATCH 10/11] Add more detail around confiugration files Signed-off-by: Jarad Olson --- doc/developer/building-frr-on-ubuntu1804.rst | 24 +++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/doc/developer/building-frr-on-ubuntu1804.rst b/doc/developer/building-frr-on-ubuntu1804.rst index a117a82e0c..afea8ba24c 100644 --- a/doc/developer/building-frr-on-ubuntu1804.rst +++ b/doc/developer/building-frr-on-ubuntu1804.rst @@ -135,6 +135,20 @@ Compile Create empty FRR configuration files ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Although not strictly necessary, it's good practice to create empty +configuration files _before_ starting FRR. This assures that the permissions +are correct. If the files are not already present, FRR will create them. + +It's also important to consider _which_ files to create. FRR supports writing +configuration to a monolithic file, ``/etc/frr/frr.conf``, which is not +recommended, according to the +`user guide `. +The presence of ``/etc/frr/frr.conf`` on startup implicitly configures FRR to +ignore daemon-specific configuration files. + +Daemon-specific configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + :: sudo install -m 755 -o frr -g frr -d /var/log/frr @@ -149,7 +163,15 @@ Create empty FRR configuration files 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 + +Monolithic configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + 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/frr.conf Enable IPv4 & IPv6 forwarding ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ From b2c8e6f84787ebac1c5fe67334af3e4b0ee35c00 Mon Sep 17 00:00:00 2001 From: Jarad Olson Date: Tue, 15 May 2018 14:04:54 -0600 Subject: [PATCH 11/11] Suggested changes by @qlyoung - Changed hard-linked references to soft-link - Changed configuration options from code block to ``.. option::`` blocks Signed-off-by: Jarad Olson --- doc/developer/building-frr-on-ubuntu1804.rst | 23 +++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/doc/developer/building-frr-on-ubuntu1804.rst b/doc/developer/building-frr-on-ubuntu1804.rst index afea8ba24c..d9fc37c172 100644 --- a/doc/developer/building-frr-on-ubuntu1804.rst +++ b/doc/developer/building-frr-on-ubuntu1804.rst @@ -78,7 +78,9 @@ Download source Configure ^^^^^^^^^ -Options below are provided as an example. See `User Guide/Installation ` for more. +Options below are provided as an example. + +.. seealso:: *Installation* section of user guide :: @@ -109,19 +111,13 @@ Options below are provided as an example. See `User Guide/Installation `. +recommended +.. seealso:: *VTYSH* section of user guide + The presence of ``/etc/frr/frr.conf`` on startup implicitly configures FRR to ignore daemon-specific configuration files.