2017-12-08 17:47:49 +01:00
|
|
|
CentOS 6
|
2017-02-16 10:40:09 +01:00
|
|
|
========================================
|
|
|
|
|
2017-07-12 03:30:04 +02:00
|
|
|
(As an alternative to this installation, you may prefer to create a FRR
|
2017-12-08 17:47:49 +01:00
|
|
|
rpm package yourself and install that package instead. See instructions
|
|
|
|
in redhat/README.rpm\_build.md on how to build a rpm package)
|
2017-07-12 03:30:04 +02:00
|
|
|
|
2017-12-08 17:47:49 +01:00
|
|
|
Instructions are tested with ``CentOS 6.8`` on ``x86_64`` platform
|
2017-02-16 10:40:09 +01:00
|
|
|
|
|
|
|
CentOS 6 restrictions:
|
|
|
|
----------------------
|
|
|
|
|
2017-12-08 17:47:49 +01:00
|
|
|
- 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.
|
2017-02-16 10:40:09 +01:00
|
|
|
|
|
|
|
Install required packages
|
|
|
|
-------------------------
|
2017-02-16 16:55:09 +01:00
|
|
|
|
2017-02-16 10:40:09 +01:00
|
|
|
Add packages:
|
|
|
|
|
2017-12-08 17:47:49 +01:00
|
|
|
::
|
|
|
|
|
2017-07-12 03:30:04 +02:00
|
|
|
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 \
|
2018-02-15 16:43:30 +01:00
|
|
|
c-ares-devel python-sphinx10
|
2017-02-16 10:40:09 +01:00
|
|
|
|
2017-12-08 17:47:49 +01:00
|
|
|
Install newer version of bison (CentOS 6 package source is too old) from
|
2017-02-16 16:55:09 +01:00
|
|
|
CentOS 7
|
2017-02-16 10:40:09 +01:00
|
|
|
|
2017-12-08 17:47:49 +01:00
|
|
|
::
|
|
|
|
|
2017-07-12 03:30:04 +02:00
|
|
|
sudo yum install rpm-build
|
2017-02-16 16:55:09 +01:00
|
|
|
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
|
2017-02-16 10:40:09 +01:00
|
|
|
|
2017-12-08 17:47:49 +01:00
|
|
|
Install newer version of autoconf and automake (Package versions are too
|
|
|
|
old)
|
|
|
|
|
|
|
|
::
|
2017-02-16 10:40:09 +01:00
|
|
|
|
2017-02-16 16:55:09 +01:00
|
|
|
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 ..
|
2017-12-08 17:47:49 +01:00
|
|
|
|
2017-02-16 16:55:09 +01:00
|
|
|
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 ..
|
|
|
|
|
2017-12-08 17:47:49 +01:00
|
|
|
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``
|
|
|
|
|
|
|
|
::
|
2017-02-16 10:40:09 +01:00
|
|
|
|
2017-07-12 03:30:04 +02:00
|
|
|
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
|
2017-02-16 10:40:09 +01:00
|
|
|
|
2017-12-08 17:47:49 +01:00
|
|
|
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
|
2017-03-25 08:57:53 +01:00
|
|
|
|
2017-02-16 10:40:09 +01:00
|
|
|
Get FRR, compile it and install it (from Git)
|
|
|
|
---------------------------------------------
|
|
|
|
|
2017-12-08 17:47:49 +01:00
|
|
|
**This assumes you want to build and install FRR from source and not
|
|
|
|
using any packages**
|
2017-02-16 10:40:09 +01:00
|
|
|
|
2017-12-08 17:47:49 +01:00
|
|
|
Add frr groups and user
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
::
|
2017-02-16 10:40:09 +01:00
|
|
|
|
2017-02-16 16:55:09 +01:00
|
|
|
sudo groupadd -g 92 frr
|
|
|
|
sudo groupadd -r -g 85 frrvt
|
|
|
|
sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \
|
2017-03-30 20:22:35 +02:00
|
|
|
-c "FRR FRRouting suite" -d /var/run/frr frr
|
2017-02-16 10:40:09 +01:00
|
|
|
|
2017-12-08 17:47:49 +01:00
|
|
|
Download Source, configure and compile it
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
(You may prefer different options on configure statement. These are just
|
2017-02-16 16:55:09 +01:00
|
|
|
an example.)
|
|
|
|
|
2017-12-08 17:47:49 +01:00
|
|
|
::
|
|
|
|
|
2017-03-30 20:24:05 +02:00
|
|
|
git clone https://github.com/frrouting/frr.git frr
|
2017-02-16 16:55:09 +01:00
|
|
|
cd frr
|
|
|
|
./bootstrap.sh
|
|
|
|
./configure \
|
2017-07-12 03:30:04 +02:00
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/lib/frr \
|
2017-02-16 16:55:09 +01:00
|
|
|
--sysconfdir=/etc/frr \
|
2017-07-12 03:30:04 +02:00
|
|
|
--libdir=/usr/lib/frr \
|
|
|
|
--libexecdir=/usr/lib/frr \
|
2017-02-16 16:55:09 +01:00
|
|
|
--localstatedir=/var/run/frr \
|
2017-07-12 03:30:04 +02:00
|
|
|
--with-moduledir=/usr/lib/frr/modules \
|
2017-02-16 16:55:09 +01:00
|
|
|
--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 \
|
2017-07-12 03:30:04 +02:00
|
|
|
--disable-ldpd \
|
2017-02-16 16:55:09 +01:00
|
|
|
--enable-fpm \
|
2017-07-12 03:30:04 +02:00
|
|
|
--enable-nhrpd \
|
|
|
|
--enable-eigrpd \
|
|
|
|
--enable-babeld \
|
2017-02-16 16:55:09 +01:00
|
|
|
--with-pkg-git-version \
|
2017-07-12 03:30:04 +02:00
|
|
|
--with-pkg-extra-version=-MyOwnFRRVersion
|
2017-02-16 16:55:09 +01:00
|
|
|
make
|
|
|
|
make check PYTHON=/usr/bin/python2.7
|
|
|
|
sudo make install
|
2017-02-16 10:40:09 +01:00
|
|
|
|
2017-12-08 17:47:49 +01:00
|
|
|
Create empty FRR configuration files
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
::
|
|
|
|
|
2017-02-16 16:55:09 +01:00
|
|
|
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
|
2017-07-12 03:30:04 +02:00
|
|
|
sudo touch /etc/frr/nhrpd.conf
|
|
|
|
sudo touch /etc/frr/eigrpd.conf
|
|
|
|
sudo touch /etc/frr/babeld.conf
|
2017-02-16 16:55:09 +01:00
|
|
|
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
|
2017-02-16 10:40:09 +01:00
|
|
|
|
2017-12-08 17:47:49 +01:00
|
|
|
Install daemon config file
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
::
|
|
|
|
|
2017-07-12 03:30:04 +02:00
|
|
|
sudo install -p -m 644 redhat/daemons /etc/frr/
|
|
|
|
sudo chown frr:frr /etc/frr/daemons
|
|
|
|
|
2017-12-08 17:47:49 +01:00
|
|
|
Edit /etc/frr/daemons as needed to select the required daemons
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2017-07-12 03:30:04 +02:00
|
|
|
|
2017-12-08 17:47:49 +01:00
|
|
|
Look for the section with ``watchfrr_enable=...`` and ``zebra=...`` etc.
|
|
|
|
Enable the daemons as required by changing the value to ``yes``
|
2017-07-12 03:30:04 +02:00
|
|
|
|
2017-12-08 17:47:49 +01:00
|
|
|
Enable IP & IPv6 forwarding
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2017-02-16 10:40:09 +01:00
|
|
|
|
2017-12-08 17:47:49 +01:00
|
|
|
Edit ``/etc/sysctl.conf`` and set the following values (ignore the other
|
2017-02-16 16:55:09 +01:00
|
|
|
settings)
|
2017-02-16 10:40:09 +01:00
|
|
|
|
2017-12-08 17:47:49 +01:00
|
|
|
::
|
|
|
|
|
2017-02-16 16:55:09 +01:00
|
|
|
# Controls IP packet forwarding
|
|
|
|
net.ipv4.ip_forward = 1
|
|
|
|
net.ipv6.conf.all.forwarding=1
|
2017-02-16 10:40:09 +01:00
|
|
|
|
2017-02-16 16:55:09 +01:00
|
|
|
# Controls source route verification
|
|
|
|
net.ipv4.conf.default.rp_filter = 0
|
2017-02-16 10:40:09 +01:00
|
|
|
|
2017-07-12 03:30:04 +02:00
|
|
|
Load the modifed sysctl's on the system:
|
|
|
|
|
2017-12-08 17:47:49 +01:00
|
|
|
::
|
|
|
|
|
2017-07-12 03:30:04 +02:00
|
|
|
sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
|
2017-02-16 10:40:09 +01:00
|
|
|
|
2017-12-08 17:47:49 +01:00
|
|
|
Add init.d startup files
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
::
|
|
|
|
|
2017-07-12 03:30:04 +02:00
|
|
|
sudo install -p -m 755 redhat/frr.init /etc/init.d/frr
|
|
|
|
sudo chkconfig --add frr
|
|
|
|
|
2017-12-08 17:47:49 +01:00
|
|
|
Enable frr daemon at startup
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
::
|
|
|
|
|
2017-07-12 03:30:04 +02:00
|
|
|
sudo chkconfig frr on
|
|
|
|
|
2017-12-08 17:47:49 +01:00
|
|
|
Start FRR manually (or reboot)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
::
|
|
|
|
|
2017-07-12 03:30:04 +02:00
|
|
|
sudo /etc/init.d/frr start
|