diff options
author | Martin Winter <mwinter@opensourcerouting.org> | 2017-02-16 10:40:09 +0100 |
---|---|---|
committer | Martin Winter <mwinter@opensourcerouting.org> | 2017-02-16 10:40:09 +0100 |
commit | 278fb111f6a2ee693c55335f4fa93e548df42091 (patch) | |
tree | ed9699eff31dbd25fe3b66e9916c02d3d2c7d7ba | |
parent | Merge pull request #206 from opensourcerouting/ldpd-ordered-output (diff) | |
download | frr-278fb111f6a2ee693c55335f4fa93e548df42091.tar.xz frr-278fb111f6a2ee693c55335f4fa93e548df42091.zip |
doc: Add initial set of docs on building FRR on various Distributions
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
-rw-r--r-- | README | 12 | ||||
-rw-r--r-- | doc/Building_FRR_on_CentOS6.md | 153 | ||||
-rw-r--r-- | doc/Building_FRR_on_CentOS7.md | 119 | ||||
-rw-r--r-- | doc/Building_FRR_on_Debian8.md | 94 | ||||
-rw-r--r-- | doc/Building_FRR_on_Fedora24.md | 129 | ||||
-rw-r--r-- | doc/Building_FRR_on_FreeBSD10.md | 91 | ||||
-rw-r--r-- | doc/Building_FRR_on_FreeBSD11.md | 91 | ||||
-rw-r--r-- | doc/Building_FRR_on_FreeBSD9.md | 91 | ||||
-rw-r--r-- | doc/Building_FRR_on_NetBSD6.md | 116 | ||||
-rw-r--r-- | doc/Building_FRR_on_NetBSD7.md | 109 | ||||
-rw-r--r-- | doc/Building_FRR_on_OmniOS.md | 120 | ||||
-rw-r--r-- | doc/Building_FRR_on_OpenBSD6.md | 126 | ||||
-rw-r--r-- | doc/Building_FRR_on_Ubuntu1204.md | 128 | ||||
-rw-r--r-- | doc/Building_FRR_on_Ubuntu1404.md | 88 | ||||
-rw-r--r-- | doc/Building_FRR_on_Ubuntu1604.md | 111 |
15 files changed, 1574 insertions, 4 deletions
@@ -1,9 +1,13 @@ -Quagga is free software that manages various IPv4 and IPv6 routing +FRR is a free fork of Quagga that manages various IPv4 and IPv6 routing protocols. -Currently Quagga supports BGP4, BGP4+, OSPFv2, OSPFv3, RIPv1, -RIPv2, RIPng, PIM-SSM and LDP as well as very early support for IS-IS. +Currently FRR supports BGP4, BGP4+, OSPFv2, OSPFv3, IS-IS, RIPv1, +RIPv2, RIPng, PIM-SSM and LDP. See the file REPORTING-BUGS to report bugs. -Quagga is free software. See the file COPYING for copying conditions. +FRR is free software. See the file COPYING for copying conditions. + +For building instructions from the source, see doc/Building_FRR_on_*.md +documents. + diff --git a/doc/Building_FRR_on_CentOS6.md b/doc/Building_FRR_on_CentOS6.md new file mode 100644 index 000000000..f770aebcf --- /dev/null +++ b/doc/Building_FRR_on_CentOS6.md @@ -0,0 +1,153 @@ +Building FRR on CentOS 6 from Git Source +======================================== + +Instructions are tested with `CentOS 6.8` on `x86_64` platform + +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) + +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 pytest + +Install newer version of bison (CentOS 6 package source is too old) from CentOS 7 + + 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 (needed for `make check` to run unittests). +Pick correct EPEL based on CentOS version used. Then install current `pytest` + + rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm + rpm -ivh https://centos6.iuscommunity.org/ius-release.rpm + yum install python27 python27-pip + 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 + +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 FreeRangeRouting 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.) + +You may want to pay special attention to `/usr/lib64` paths and change them if you are not building on a x86_64 architecture + + git clone https://github.com/freerangerouting/frr.git frr + cd frr + git checkout stable/2.0 + ./bootstrap.sh + ./configure \ + --sysconfdir=/etc/frr \ + --libdir=/usr/lib64/frr \ + --libexecdir=/usr/lib64/frr \ + --localstatedir=/var/run/frr \ + --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 \ + --enable-tcp-zebra \ + --enable-fpm \ + --with-pkg-git-version \ + --with-pkg-extra-version=-MyOwnFRRVersion + make + make check PYTHON=/usr/bin/python2.7 + 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 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 + +### 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 + +**Reboot** or use `sysctl` to apply the same config to the running system + +### Add init.d startup files + sudo cp redhat/bgpd.init /etc/init.d/bgpd + sudo cp redhat/isisd.init /etc/init.d/isisd + sudo cp redhat/ospfd.init /etc/init.d/ospfd + sudo cp redhat/ospf6d.init /etc/init.d/ospf6d + sudo cp redhat/ripngd.init /etc/init.d/ripngd + sudo cp redhat/ripd.init /etc/init.d/ripd + sudo cp redhat/zebra.init /etc/init.d/zebra + sudo chkconfig --add zebra + sudo chkconfig --add ripd + sudo chkconfig --add ripngd + sudo chkconfig --add ospf6d + sudo chkconfig --add ospfd + sudo chkconfig --add bgpd + sudo chkconfig --add isisd + +### Enable required daemons at startup +Only enable zebra and the daemons which are needed for your setup + + sudo chkconfig zebra on + sudo chkconfig ospfd on + sudo chkconfig bgpd on + [...] etc (as needed) diff --git a/doc/Building_FRR_on_CentOS7.md b/doc/Building_FRR_on_CentOS7.md new file mode 100644 index 000000000..36e50e442 --- /dev/null +++ b/doc/Building_FRR_on_CentOS7.md @@ -0,0 +1,119 @@ +Building FRR on CentOS 7 from Git Source +======================================== + +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 + +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 FreeRangeRouting 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.) + +You may want to pay special attention to `/usr/lib64` paths and change them if you are not building on a x86_64 architecture + + git clone https://github.com/freerangerouting/frr.git frr + cd frr + git checkout stable/2.0 + ./bootstrap.sh + ./configure \ + --sysconfdir=/etc/frr \ + --libdir=/usr/lib64/frr \ + --libexecdir=/usr/lib64/frr \ + --localstatedir=/var/run/frr \ + --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-tcp-zebra \ + --enable-fpm \ + --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 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 + +### 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 + +**Reboot** or use `sysctl` to apply the same config to the running system + +### Install Service files + sudo install -p -m 644 redhat/zebra.service /usr/lib/systemd/system/zebra.service + sudo install -p -m 644 redhat/isisd.service /usr/lib/systemd/system/isisd.service + sudo install -p -m 644 redhat/ripd.service /usr/lib/systemd/system/ripd.service + sudo install -p -m 644 redhat/ospfd.service /usr/lib/systemd/system/ospfd.service + sudo install -p -m 644 redhat/bgpd.service /usr/lib/systemd/system/bgpd.service + sudo install -p -m 644 redhat/ospf6d.service /usr/lib/systemd/system/ospf6d.service + sudo install -p -m 644 redhat/ripngd.service /usr/lib/systemd/system/ripngd.service + sudo install -p -m 644 redhat/pimd.service /usr/lib/systemd/system/pimd.service + sudo install -p -m 644 redhat/frr.sysconfig /etc/sysconfig/frr + sudo install -p -m 644 redhat/frr.logrotate /etc/logrotate.d/frr + +### Register the systemd files + sudo systemctl preset zebra.service + sudo systemctl preset ripd.service + sudo systemctl preset ospfd.service + sudo systemctl preset bgpd.service + sudo systemctl preset ospf6d.service + sudo systemctl preset ripngd.service + sudo systemctl preset pimd.service + +### Enable required daemons at startup +Only enable zebra and the daemons which are needed for your setup + + sudo systemctl enable zebra + sudo systemctl enable ospfd + sudo systemctl enable bgpd + [...] etc (as needed) diff --git a/doc/Building_FRR_on_Debian8.md b/doc/Building_FRR_on_Debian8.md new file mode 100644 index 000000000..098a65d62 --- /dev/null +++ b/doc/Building_FRR_on_Debian8.md @@ -0,0 +1,94 @@ +Building FRR on Debian 8 from Git Source +======================================== + +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 + +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 --groups frrvty --home /var/run/frr/ \ + --gecos "FRR FreeRangeRouting suite" --shell /bin/false frr + sudo usermode + +### Download Source, configure and compile it +(You may prefer different options on configure statement. These are just an example.) + + git clone https://github.com/freerangerouting/frr.git frr + cd frr + git checkout stable/2.0 + ./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-tcp-zebra \ + --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 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` to apply the same config to the running system diff --git a/doc/Building_FRR_on_Fedora24.md b/doc/Building_FRR_on_Fedora24.md new file mode 100644 index 000000000..784449d73 --- /dev/null +++ b/doc/Building_FRR_on_Fedora24.md @@ -0,0 +1,129 @@ +Building FRR on Fedora 24 from Git Source +========================================= + +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 + +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 FreeRangeRouting 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.) + +You may want to pay special attention to `/usr/lib64` paths and chenge them if you are not building on a x86_64 architecture + + git clone https://github.com/freerangerouting/frr.git frr + cd frr + git checkout stable/2.0 + ./bootstrap.sh + ./configure \ + --sysconfdir=/etc/frr \ + --libdir=/usr/lib64/frr \ + --libexecdir=/usr/lib64/frr \ + --localstatedir=/var/run/frr \ + --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-tcp-zebra \ + --enable-fpm \ + --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 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 + +### 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 + +Create a new file `/etc/modules-load.d/mpls.conf` with the following content: + + # Load MPLS Kernel Modules + mpls-router + mpls-iptunnel + +**Reboot** or use `sysctl` to apply the same config to the running system + +### Install Service files + install -p -m 644 redhat/zebra.service /usr/lib/systemd/system/zebra.service + install -p -m 644 redhat/isisd.service /usr/lib/systemd/system/isisd.service + install -p -m 644 redhat/ripd.service /usr/lib/systemd/system/ripd.service + install -p -m 644 redhat/ospfd.service /usr/lib/systemd/system/ospfd.service + install -p -m 644 redhat/bgpd.service /usr/lib/systemd/system/bgpd.service + install -p -m 644 redhat/ospf6d.service /usr/lib/systemd/system/ospf6d.service + install -p -m 644 redhat/ripngd.service /usr/lib/systemd/system/ripngd.service + install -p -m 644 redhat/pimd.service /usr/lib/systemd/system/pimd.service + install -p -m 644 redhat/pimd.service /usr/lib/systemd/system/ldpd.service + install -p -m 644 redhat/frr.sysconfig /etc/sysconfig/frr + install -p -m 644 redhat/frr.logrotate /etc/logrotate.d/frr + +### Register the systemd files + systemctl preset zebra.service + systemctl preset ripd.service + systemctl preset ospfd.service + systemctl preset bgpd.service + systemctl preset ospf6d.service + systemctl preset ripngd.service + systemctl preset pimd.service + systemctl preset ldpd.service + +### Enable required daemons at startup +Only enable zebra and the daemons which are needed for your setup + + systemctl enable zebra + systemctl enable ospfd + systemctl enable bgpd + [...] etc (as needed) diff --git a/doc/Building_FRR_on_FreeBSD10.md b/doc/Building_FRR_on_FreeBSD10.md new file mode 100644 index 000000000..4cd0edd1a --- /dev/null +++ b/doc/Building_FRR_on_FreeBSD10.md @@ -0,0 +1,91 @@ +Building FRR on FreeBSD 10 from Git Source +========================================== + +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 + +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 whcih 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/freerangerouting/frr.git frr + cd frr + git checkout stable/2.0 + ./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-tcp-zebra \ + --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/Building_FRR_on_FreeBSD11.md b/doc/Building_FRR_on_FreeBSD11.md new file mode 100644 index 000000000..fec06bc09 --- /dev/null +++ b/doc/Building_FRR_on_FreeBSD11.md @@ -0,0 +1,91 @@ +Building FRR on FreeBSD 11 from Git Source +========================================== + +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 + +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 whcih 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/freerangerouting/frr.git frr + cd frr + git checkout stable/2.0 + ./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-tcp-zebra \ + --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/Building_FRR_on_FreeBSD9.md b/doc/Building_FRR_on_FreeBSD9.md new file mode 100644 index 000000000..37fdd92b1 --- /dev/null +++ b/doc/Building_FRR_on_FreeBSD9.md @@ -0,0 +1,91 @@ +Building FRR on FreeBSD 9 from Git Source +========================================= + +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 + +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 whcih 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/freerangerouting/frr.git frr + cd frr + git checkout stable/2.0 + ./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-tcp-zebra \ + --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/Building_FRR_on_NetBSD6.md b/doc/Building_FRR_on_NetBSD6.md new file mode 100644 index 000000000..0d3f10805 --- /dev/null +++ b/doc/Building_FRR_on_NetBSD6.md @@ -0,0 +1,116 @@ +Building FRR on NetBSD 6 from Git Source +======================================== + +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 p5-XML-LibXML python27 py27-test + +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/freerangerouting/frr.git frr + cd frr + git checkout stable/2.0 + ./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-tcp-zebra \ + --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/Building_FRR_on_NetBSD7.md b/doc/Building_FRR_on_NetBSD7.md new file mode 100644 index 000000000..22c468a6a --- /dev/null +++ b/doc/Building_FRR_on_NetBSD7.md @@ -0,0 +1,109 @@ +Building FRR on NetBSD 7 from Git Source +======================================== + +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 p5-XML-LibXML python27 py27-test + +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/freerangerouting/frr.git frr + cd frr + git checkout stable/2.0 + ./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-tcp-zebra \ + --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/Building_FRR_on_OmniOS.md b/doc/Building_FRR_on_OmniOS.md new file mode 100644 index 000000000..12acc9288 --- /dev/null +++ b/doc/Building_FRR_on_OmniOS.md @@ -0,0 +1,120 @@ +Building FRR on OmniOS (OpenSolaris) from Git Source +==================================================== + +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 + +Add libjson to Solaris equivalent of ld.so.conf + + crle -l /opt/csw/lib -u + +Add Perl packages: + + cpan + cpan[1]> install XML::LibXML + cpan[2]> exit + +Add pytest: + + pip install pytest + +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/freerangerouting/frr.git frr + cd frr + git checkout stable/2.0 + ./bootstrap.sh + export MAKE=gmake + export LDFLAGS="-L/opt/csw/lib" + export CPPFLAGS="-I/opt/csw/include" + ./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-tcp-zebra \ + --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/Building_FRR_on_OpenBSD6.md b/doc/Building_FRR_on_OpenBSD6.md new file mode 100644 index 000000000..3f390d5eb --- /dev/null +++ b/doc/Building_FRR_on_OpenBSD6.md @@ -0,0 +1,126 @@ +Building FRR on OpenBSD 6 from Git Source +========================================= + +OpenBSD restrictions: +--------------------- + +- MPLS is not tested on `OpenBSD`. It may work as it shares the + sources with the LDPd on OpenBSD. Bug reports and fixes are welcome + +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 + pkg_add gmake gawk dejagnu openssl json-c p5-XML-LibXML py-test + +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/freerangerouting/frr.git frr + cd frr + git checkout stable/2.0 + ./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-tcp-zebra \ + --enable-fpm \ + --enable-ldpd \ + --with-pkg-git-version \ + --with-pkg-extra-version=-MyOwnFRRVersion + gmake + gmake check + sudo gmake install + +### Create empty FRR configuration files + + sudo mkdir /var/frr + sudo chown _frr:_frr /var/frr + sudo chmod 755 /var/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 chown -R _frr:_frr /etc/frr + sudo touch /etc/frr/vtysh.conf + sudo chown -R _frr:_frrvty /etc/frr/vtysh.conf + sudo chmod 750 /etc/frr + sudo 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 + +### 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/Building_FRR_on_Ubuntu1204.md b/doc/Building_FRR_on_Ubuntu1204.md new file mode 100644 index 000000000..98ee2b831 --- /dev/null +++ b/doc/Building_FRR_on_Ubuntu1204.md @@ -0,0 +1,128 @@ +Building FRR on Ubuntu 12.04LTS from Git Source +=============================================== + +- 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 pkg-config libpam0g-dev libjson0-dev flex \ + python-pytest + +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 .. + +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 --groups frrvty --home /var/run/frr/ \ + --gecos "FRR suite" --shell /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/freerangerouting/frr.git frr + cd frr + git checkout stable/2.0 + ./bootstrap.sh + ./configure \ + --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-tcp-zebra \ + --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 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 + +### 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` 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 new file mode 100644 index 000000000..319842859 --- /dev/null +++ b/doc/Building_FRR_on_Ubuntu1404.md @@ -0,0 +1,88 @@ +Building FRR on Ubuntu 14.04LTS from Git Source +=============================================== + +- 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 + +Get FRR, compile it and install it (from Git) +--------------------------------------------- + +### Add frr groups and user + + sudo groupadd -g 92 frr + sudo groupadd -r -g 85 frrvty + sudo adduser --system --ingroup frr --groups frrvty --home /var/run/frr/ \ + --gecos "FRR suite" --shell /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/freerangerouting/frr.git frr + cd frr + git checkout stable/2.0 + ./bootstrap.sh + ./configure \ + --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-tcp-zebra \ + --enable-fpm \ + --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 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 + +### 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` 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 new file mode 100644 index 000000000..03f4d6d9e --- /dev/null +++ b/doc/Building_FRR_on_Ubuntu1604.md @@ -0,0 +1,111 @@ +Building FRR on Ubuntu 12.04LTS from Git Source +=============================================== + +- 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 \ + dejagnu pkg-config libpam0g-dev libjson-c-dev bison flex python-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 --groups frrvty --home /var/run/frr/ \ + --gecos "FRR suite" --shell /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/freerangerouting/frr.git frr + cd frr + git checkout stable/2.0 + ./bootstrap.sh + ./configure \ + --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-tcp-zebra \ + --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 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 + +### 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 + +### 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` to apply the same config to the running system |