From 902726b81f80f0e471f886757e95a51e34f4dc78 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 4 Apr 2017 20:36:16 -0400 Subject: [PATCH 1/7] doc: Cleanup 'Build the Software' The frrouting.org web page: https://frrouting.org/manual/Build-the-Software.html#Build-the-Software is built from doc/install.texi. The output on this page is a bit missleading, let's clean it up some. Signed-off-by: Donald Sharp --- doc/install.texi | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/doc/install.texi b/doc/install.texi index 8c501ed45d..595898277a 100644 --- a/doc/install.texi +++ b/doc/install.texi @@ -218,18 +218,14 @@ routing utility. It contains @command{ifconfig}, @command{route}, After configuring the software, you will need to compile it for your system. Simply issue the command @command{make} in the root of the source -directory and the software will be compiled. If you have *any* problems -at this stage, be certain to send a bug report @xref{Bug Reports}. +directory and the software will be compiled. Cliff Note versions of +different compilation examples can be found in the doc/Building_FRR_on_XXX.md +files. If you have *any* problems at this stage, be certain to send a +bug report @xref{Bug Reports}. @example -% ./configure -. -. -. -./configure output -. -. -. +% ./bootstrap.sh +% ./configure % make @end example @c A - End of node, Building the Software From 2a3a819a9c2b2c9700e6228e7352e53b3562776c Mon Sep 17 00:00:00 2001 From: Martin Winter Date: Wed, 12 Apr 2017 16:00:43 -0700 Subject: [PATCH 2/7] snapcraft: Improve README.usage.md based on feedback received - Fix snap connect (it's now called core, not ubuntu-core) - Add section on MPLS configuration - Add FAQ topic on ospfd/ospf6d crashing before privs are assigned to snap - Add pointer to official webpage Signed-off-by: Martin Winter --- snapcraft/README.usage.md | 59 +++++++++++++++++++++++++++++++++++---- 1 file changed, 54 insertions(+), 5 deletions(-) diff --git a/snapcraft/README.usage.md b/snapcraft/README.usage.md index aaff59438a..c678c8805c 100644 --- a/snapcraft/README.usage.md +++ b/snapcraft/README.usage.md @@ -3,7 +3,7 @@ Using the FRRouting Snap After installing the Snap, the priviledged plug need to be connected: - snap connect frr:network-control ubuntu-core:network-control + snap connect frr:network-control core:network-control Enabling/Disabling FRRouting Daemons ------------------------------------------- @@ -53,25 +53,74 @@ depend on them). These are mainly intended to debug the Snap - `frr.ldpd-debug`: Starts ldpd daemon in foreground +MPLS (LDP) +---------- +The MPLS forwarding requires a Linux Kernel version 4.5 or newer and +specific MPLS kernel modules loaded. It will be auto-detected by +FRR. You can check the detected setup with the `show mpls status` +command from within `frr.vtysh` + +The following kernel modules `mpls-router` and `mpls-iptunnel` +need to be loaded. On Ubuntu 16.04, this can be done by editing +'/etc/modules-load.d/modules.conf' and add the following lines: + + # Load MPLS Kernel Modules + mpls-router + mpls-iptunnel + +For other distributions, please check the documentation on loading +modules. You need to either reboot or use `modprobe` to manually load +the modules as well before MPLS will be available. + +In addition to this, the MPLS Label-Processing needs to be enabled +with `sysctl` on the required interfaces. Assuming the interfaces +are named `eth0`, `eth1` and `eth2`, then the additional lines in +`/etc/sysctl.conf` will enable it on a Ubuntu 16.04 system: + + # 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 + +These settings require either a reboot or a manual configuration with +`sysctl` as well. + FAQ --- - frr.vtysh displays `--MORE--` on long output. How to suppress this? - Define `VTYSH_PAGER` to `cat` (default is `more`). (Ie add `export VTYSH_PAGER=cat` to the end of your `.profile`) +- ospfd / ospf6d are not running after installation + - Installing a new snap starts the daemons, but at this time they + may not have the required priviledged access. Make sure you + issue the `snap connect` command as given above (can be verified + with `snap interfaces`) and **THEN** restart the daemons (or + reboot the system). + This is a limitation of any snap package at this time which + requires priviledged interfaces (ie to manipulate routing tables) + Sourcecode available ==================== The source for this SNAP is available as part of the FRRouting -Source Code Distribution. +Source Code Distribution under `GPLv2 or later` - https://github.com/frrouting/frr.git + -Instructions for rebuilding the snap are in `README.snap_build.md` +Instructions for rebuilding the snap are in `snapcraft/README.snap_build.md` + +*Please checkout the desired branch before following the instructions +as they may have changed between versions of FRR* + +Official Webpage for FRR +======================== + +Official webpage for FRR is at Feedback welcome ================ Please send Feedback about this snap to Martin Winter at `mwinter@opensourcerouting.org` - From 7caef08c842f616c65bf2d30b622828507fb2db1 Mon Sep 17 00:00:00 2001 From: Phil Huang Date: Thu, 13 Apr 2017 18:11:28 +0800 Subject: [PATCH 3/7] Add user `frr` into group `frrvty` Signed-off-by: Phil Huang --- doc/Building_FRR_on_Debian8.md | 8 ++++---- doc/Building_FRR_on_Ubuntu1204.md | 5 +++-- doc/Building_FRR_on_Ubuntu1404.md | 5 +++-- doc/Building_FRR_on_Ubuntu1604.md | 5 +++-- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/doc/Building_FRR_on_Debian8.md b/doc/Building_FRR_on_Debian8.md index 81d58827d3..f14930334e 100644 --- a/doc/Building_FRR_on_Debian8.md +++ b/doc/Building_FRR_on_Debian8.md @@ -31,9 +31,9 @@ any packages** sudo addgroup --system --gid 92 frr sudo addgroup --system --gid 85 frrvty - sudo adduser --system --ingroup frr --groups frrvty --home /var/run/frr/ \ - --gecos "FRR FRRouting suite" --shell /bin/false frr - sudo usermode + 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 @@ -95,4 +95,4 @@ other settings) # based on Router Advertisements for this host net.ipv6.conf.all.forwarding=1 -**Reboot** or use `sysctl` to apply the same config to the running system +**Reboot** or use `sysctl -p` to apply the same config to the running system diff --git a/doc/Building_FRR_on_Ubuntu1204.md b/doc/Building_FRR_on_Ubuntu1204.md index 6e6374c2f8..d39c34f525 100644 --- a/doc/Building_FRR_on_Ubuntu1204.md +++ b/doc/Building_FRR_on_Ubuntu1204.md @@ -65,8 +65,9 @@ any packages** sudo groupadd -g 92 frr sudo groupadd -r -g 85 frrvty - sudo adduser --system --ingroup frr --groups frrvty --home /var/run/frr/ \ + 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 @@ -133,4 +134,4 @@ other settings) # based on Router Advertisements for this host net.ipv6.conf.all.forwarding=1 -**Reboot** or use `sysctl` to apply the same config to the running system +**Reboot** or use `sysctl -p` to apply the same config to the running system diff --git a/doc/Building_FRR_on_Ubuntu1404.md b/doc/Building_FRR_on_Ubuntu1404.md index 6db3f426b4..3c4e518fba 100644 --- a/doc/Building_FRR_on_Ubuntu1404.md +++ b/doc/Building_FRR_on_Ubuntu1404.md @@ -25,8 +25,9 @@ any packages** sudo groupadd -g 92 frr sudo groupadd -r -g 85 frrvty - sudo adduser --system --ingroup frr --groups frrvty --home /var/run/frr/ \ + 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 @@ -91,4 +92,4 @@ other settings) # based on Router Advertisements for this host net.ipv6.conf.all.forwarding=1 -**Reboot** or use `sysctl` to apply the same config to the running system +**Reboot** or use `sysctl -p` to apply the same config to the running system diff --git a/doc/Building_FRR_on_Ubuntu1604.md b/doc/Building_FRR_on_Ubuntu1604.md index 8e71cc1eee..2a6a30f961 100644 --- a/doc/Building_FRR_on_Ubuntu1604.md +++ b/doc/Building_FRR_on_Ubuntu1604.md @@ -26,8 +26,9 @@ any packages** sudo groupadd -g 92 frr sudo groupadd -r -g 85 frrvty - sudo adduser --system --ingroup frr --groups frrvty --home /var/run/frr/ \ + 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 @@ -113,4 +114,4 @@ Add the following lines to `/etc/modules-load.d/modules.conf`: mpls-router mpls-iptunnel -**Reboot** or use `sysctl` to apply the same config to the running system +**Reboot** or use `sysctl -p` to apply the same config to the running system From be9665641df19efdfe08b941fef4507956fff97c Mon Sep 17 00:00:00 2001 From: Phil Huang Date: Thu, 13 Apr 2017 21:20:53 +0800 Subject: [PATCH 4/7] Clean installation guide with Debian/Ubuntu Signed-off-by: Phil Huang --- doc/Building_FRR_on_Debian8.md | 3 +++ doc/Building_FRR_on_Ubuntu1204.md | 28 ++++++++++++---------------- doc/Building_FRR_on_Ubuntu1404.md | 28 +++++++++++++--------------- doc/Building_FRR_on_Ubuntu1604.md | 28 ++++++++++++---------------- 4 files changed, 40 insertions(+), 47 deletions(-) diff --git a/doc/Building_FRR_on_Debian8.md b/doc/Building_FRR_on_Debian8.md index f14930334e..0084433721 100644 --- a/doc/Building_FRR_on_Debian8.md +++ b/doc/Building_FRR_on_Debian8.md @@ -63,6 +63,7 @@ an example.) --enable-rtadv \ --enable-tcp-zebra \ --enable-fpm \ + --enable-ldpd \ --with-pkg-git-version \ --with-pkg-extra-version=-MyOwnFRRVersion make @@ -70,6 +71,7 @@ an example.) 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 @@ -80,6 +82,7 @@ an example.) 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 frrvty /dev/null /etc/frr/vtysh.conf ### Enable IP & IPv6 forwarding diff --git a/doc/Building_FRR_on_Ubuntu1204.md b/doc/Building_FRR_on_Ubuntu1204.md index d39c34f525..7766ff548b 100644 --- a/doc/Building_FRR_on_Ubuntu1204.md +++ b/doc/Building_FRR_on_Ubuntu1204.md @@ -104,22 +104,18 @@ an example.) ### Create empty FRR configuration files - sudo mkdir /var/log/frr - sudo chown frr:fee /var/log/frr - sudo mkdir /etc/frr - sudo touch /etc/frr/etc/zebra.conf - sudo touch /etc/frr/etc/bgpd.conf - sudo touch /etc/frr/etc/ospfd.conf - sudo touch /etc/frr/etc/ospf6d.conf - sudo touch /etc/frr/etc/isisd.conf - sudo touch /etc/frr/etc/ripd.conf - sudo touch /etc/frr/etc/ripngd.conf - sudo touch /etc/frr/etc/pimd.conf - sudo touch /etc/frr/etc/ldpd.conf - sudo chown frr:frr /etc/frr/ - sudo touch /etc/frr/etc/vtysh.conf - sudo chown frr:frrvty /etc/frr/etc/vtysh.conf - sudo chmod 640 /etc/frr/*.conf + 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 frrvty /dev/null /etc/frr/vtysh.conf ### Enable IP & IPv6 forwarding diff --git a/doc/Building_FRR_on_Ubuntu1404.md b/doc/Building_FRR_on_Ubuntu1404.md index 3c4e518fba..43b20e7143 100644 --- a/doc/Building_FRR_on_Ubuntu1404.md +++ b/doc/Building_FRR_on_Ubuntu1404.md @@ -55,6 +55,7 @@ an example.) --enable-rtadv \ --enable-tcp-zebra \ --enable-fpm \ + --enable-ldpd \ --with-pkg-git-version \ --with-pkg-extra-version=-MyOwnFRRVersion make @@ -63,21 +64,18 @@ an example.) ### Create empty FRR configuration files - sudo mkdir /var/log/frr - sudo chown frr:fee /var/log/frr - sudo mkdir /etc/frr - sudo touch /etc/frr/etc/zebra.conf - sudo touch /etc/frr/etc/bgpd.conf - sudo touch /etc/frr/etc/ospfd.conf - sudo touch /etc/frr/etc/ospf6d.conf - sudo touch /etc/frr/etc/isisd.conf - sudo touch /etc/frr/etc/ripd.conf - sudo touch /etc/frr/etc/ripngd.conf - sudo touch /etc/frr/etc/pimd.conf - sudo chown frr:frr /etc/frr/ - sudo touch /etc/frr/etc/vtysh.conf - sudo chown frr:frrvty /etc/frr/etc/vtysh.conf - sudo chmod 640 /etc/frr/*.conf + 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 frrvty /dev/null /etc/frr/vtysh.conf ### Enable IP & IPv6 forwarding diff --git a/doc/Building_FRR_on_Ubuntu1604.md b/doc/Building_FRR_on_Ubuntu1604.md index 2a6a30f961..b213a90858 100644 --- a/doc/Building_FRR_on_Ubuntu1604.md +++ b/doc/Building_FRR_on_Ubuntu1604.md @@ -65,22 +65,18 @@ an example.) ### Create empty FRR configuration files - sudo mkdir /var/log/frr - sudo chown frr:fee /var/log/frr - sudo mkdir /etc/frr - sudo touch /etc/frr/etc/zebra.conf - sudo touch /etc/frr/etc/bgpd.conf - sudo touch /etc/frr/etc/ospfd.conf - sudo touch /etc/frr/etc/ospf6d.conf - sudo touch /etc/frr/etc/isisd.conf - sudo touch /etc/frr/etc/ripd.conf - sudo touch /etc/frr/etc/ripngd.conf - sudo touch /etc/frr/etc/pimd.conf - sudo touch /etc/frr/etc/ldpd.conf - sudo chown frr:frr /etc/frr/ - sudo touch /etc/frr/etc/vtysh.conf - sudo chown frr:frrvty /etc/frr/etc/vtysh.conf - sudo chmod 640 /etc/frr/*.conf + 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 frrvty /dev/null /etc/frr/vtysh.conf ### Enable IP & IPv6 forwarding From 5cf5f2033b3fbbf6ab84dd6095c26f461e4e75b7 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 14 Apr 2017 20:05:48 -0400 Subject: [PATCH 5/7] bgpd: Fix 'set as-path prepend last-as 10' The route-map compilation function was comparing < 10 instead of <= 10. While the cli was accepting 1-10. Fix: ! route-map FOO permit 44 set as-path prepend last-as 10 ! Signed-off-by: Donald Sharp --- bgpd/bgp_routemap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index d0cce4a955..78ecb91abf 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -1362,7 +1362,7 @@ route_set_aspath_prepend_compile (const char *arg) { unsigned int num; - if (sscanf(arg, "last-as %u", &num) == 1 && num > 0 && num < 10) + if (sscanf(arg, "last-as %u", &num) == 1 && num > 0 && num <= 10) return (void*)(uintptr_t)num; return route_aspath_compile(arg); From 8399fd9d36f46ae8f30ea8850b2eb1e50329c2a6 Mon Sep 17 00:00:00 2001 From: Hung-Wei Chiu Date: Thu, 27 Apr 2017 11:10:36 +0800 Subject: [PATCH 6/7] Update Building_FRR_on_Ubuntu1604.md 1. Modify the configure prefix (since there some hard coded path in **/usr/lib/frr/fr** 2. Install the systemd service config --- doc/Building_FRR_on_Ubuntu1604.md | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/doc/Building_FRR_on_Ubuntu1604.md b/doc/Building_FRR_on_Ubuntu1604.md index b213a90858..b3bcdf9f96 100644 --- a/doc/Building_FRR_on_Ubuntu1604.md +++ b/doc/Building_FRR_on_Ubuntu1604.md @@ -39,6 +39,7 @@ an example.) git checkout stable/2.0 ./bootstrap.sh ./configure \ + --prefix=/usr \ --enable-exampledir=/usr/share/doc/frr/examples/ \ --localstatedir=/var/run/frr \ --sbindir=/usr/lib/frr \ @@ -111,3 +112,39 @@ Add the following lines to `/etc/modules-load.d/modules.conf`: mpls-iptunnel **Reboot** or use `sysctl -p` to apply the same config to the running system + + +### Install The Systemd Service + + sudo install -m 644 tools/frr.service /etc/systemd/system/frr.service + sudo install -m 644 cumulus/etc/default/frr /etc/default/frr + sudo install -m 644 cumulus/etc/frr/daemons /etc/frr/daemons + sudo install -m 644 cumulus/etc/frr/debian.conf /etc/frr/debian.conf + sudo install -m 644 cumulus/etc/frr/Frr.conf /etc/frr/Frr.conf + sudo install -m 644 -o frr -g frr cumulus/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 Serivce +Edit `/etc/systemd/system/frr.service` and remove the line **OnFailure=heartbeat-failed@%n.service** +For example. + + [Unit] + Description=Cumulus Linux FRR + After=syslog.target networking.service +     +### Start the Systemd Service +- systemctl start frr +- use `syttemctl status frr` to check its status. From 8a77d75b8ae54d1f52739d0689933e7a0d90fb72 Mon Sep 17 00:00:00 2001 From: Hung-Wei Chiu Date: Thu, 27 Apr 2017 11:22:15 +0800 Subject: [PATCH 7/7] Update Building_FRR_on_Ubuntu1604.md Fix typo --- doc/Building_FRR_on_Ubuntu1604.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/Building_FRR_on_Ubuntu1604.md b/doc/Building_FRR_on_Ubuntu1604.md index b3bcdf9f96..7848ff68ab 100644 --- a/doc/Building_FRR_on_Ubuntu1604.md +++ b/doc/Building_FRR_on_Ubuntu1604.md @@ -114,7 +114,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 -### Install The Systemd Service +### Install the systemd service sudo install -m 644 tools/frr.service /etc/systemd/system/frr.service sudo install -m 644 cumulus/etc/default/frr /etc/default/frr @@ -123,8 +123,7 @@ Add the following lines to `/etc/modules-load.d/modules.conf`: sudo install -m 644 cumulus/etc/frr/Frr.conf /etc/frr/Frr.conf sudo install -m 644 -o frr -g frr cumulus/etc/frr/vtysh.conf /etc/frr/vtysh.conf - -### Enable Daemons +### Enable daemons Edit `/etc/frr/daemons` and change the value from "no" to "yes" for those daemons you want to start by systemd. For example. @@ -137,7 +136,7 @@ For example. ripngd=yes isisd=yes -### Enable the Systemd Serivce +### Enable the systemd serivce Edit `/etc/systemd/system/frr.service` and remove the line **OnFailure=heartbeat-failed@%n.service** For example. @@ -145,6 +144,6 @@ For example. Description=Cumulus Linux FRR After=syslog.target networking.service     -### Start the Systemd Service +### Start the systemd service - systemctl start frr -- use `syttemctl status frr` to check its status. +- use `systemctl status frr` to check its status.