mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 14:04:32 +00:00
doc: Fixed a few typos on Building Doc's, Changed Tab's to spaces and limited line length to < 80 chars where possible
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
This commit is contained in:
parent
278fb111f6
commit
eb651bbceb
@ -6,148 +6,155 @@ Instructions are tested with `CentOS 6.8` on `x86_64` platform
|
|||||||
CentOS 6 restrictions:
|
CentOS 6 restrictions:
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
- PIMd is not supported on `CentOS 6`. Upgrade to `CentOS 7` if PIMd is needed
|
- PIMd is not supported on `CentOS 6`. Upgrade to `CentOS 7` if PIMd is
|
||||||
- MPLS is not supported on `CentOS 6`. MPLS requires Linux Kernel 4.5 or higher
|
needed
|
||||||
(LDP can be built, but may have limited use without MPLS)
|
- 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
|
Install required packages
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
Add packages:
|
Add packages:
|
||||||
|
|
||||||
sudo yum install git autoconf automake libtool make gawk readline-devel \
|
sudo yum install git autoconf automake libtool make gawk readline-devel \
|
||||||
texinfo net-snmp-devel groff pkgconfig json-c-devel pam-devel \
|
texinfo net-snmp-devel groff pkgconfig json-c-devel pam-devel \
|
||||||
flex pytest
|
flex pytest
|
||||||
|
|
||||||
Install newer version of bison (CentOS 6 package source is too old) from CentOS 7
|
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
|
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
|
rpmbuild --rebuild ./bison-2.7-4.el7.src.rpm
|
||||||
sudo yum install ./rpmbuild/RPMS/x86_64/bison-2.7-4.el6.x86_64.rpm
|
sudo yum install ./rpmbuild/RPMS/x86_64/bison-2.7-4.el6.x86_64.rpm
|
||||||
rm -rf rpmbuild
|
rm -rf rpmbuild
|
||||||
|
|
||||||
Install newer version of autoconf and automake (Package versions are too old)
|
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
|
curl -O http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
|
||||||
tar xvf autoconf-2.69.tar.gz
|
tar xvf autoconf-2.69.tar.gz
|
||||||
cd autoconf-2.69
|
cd autoconf-2.69
|
||||||
./configure --prefix=/usr
|
./configure --prefix=/usr
|
||||||
make
|
make
|
||||||
sudo make install
|
sudo make install
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
curl -O http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
|
curl -O http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
|
||||||
tar xvf automake-1.15.tar.gz
|
tar xvf automake-1.15.tar.gz
|
||||||
cd automake-1.15
|
cd automake-1.15
|
||||||
./configure --prefix=/usr
|
./configure --prefix=/usr
|
||||||
make
|
make
|
||||||
sudo make install
|
sudo make install
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
Install `Python 2.7` in parallel to default 2.6 (needed for `make check` to run unittests).
|
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`
|
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 http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
|
||||||
rpm -ivh https://centos6.iuscommunity.org/ius-release.rpm
|
rpm -ivh https://centos6.iuscommunity.org/ius-release.rpm
|
||||||
yum install python27 python27-pip
|
yum install python27 python27-pip
|
||||||
pip2.7 install pytest
|
pip2.7 install pytest
|
||||||
|
|
||||||
Please note that `CentOS 6` needs to keep python pointing to version 2.6 for `yum` to keep
|
Please note that `CentOS 6` needs to keep python pointing to version 2.6
|
||||||
working, so don't create a symlink for python2.7 to python
|
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)
|
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**
|
**This assumes you want to build and install FRR from source and not using
|
||||||
|
any packages**
|
||||||
|
|
||||||
### Add frr groups and user
|
### Add frr groups and user
|
||||||
|
|
||||||
sudo groupadd -g 92 frr
|
sudo groupadd -g 92 frr
|
||||||
sudo groupadd -r -g 85 frrvt
|
sudo groupadd -r -g 85 frrvt
|
||||||
sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \
|
sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \
|
||||||
-c "FRR FreeRangeRouting suite" -d /var/run/frr frr
|
-c "FRR FreeRangeRouting suite" -d /var/run/frr frr
|
||||||
|
|
||||||
### Download Source, configure and compile it
|
### Download Source, configure and compile it
|
||||||
(You may prefer different options on configure statement. These are just an example.)
|
(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
|
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
|
git clone https://github.com/freerangerouting/frr.git frr
|
||||||
cd frr
|
cd frr
|
||||||
git checkout stable/2.0
|
git checkout stable/2.0
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
./configure \
|
./configure \
|
||||||
--sysconfdir=/etc/frr \
|
--sysconfdir=/etc/frr \
|
||||||
--libdir=/usr/lib64/frr \
|
--libdir=/usr/lib64/frr \
|
||||||
--libexecdir=/usr/lib64/frr \
|
--libexecdir=/usr/lib64/frr \
|
||||||
--localstatedir=/var/run/frr \
|
--localstatedir=/var/run/frr \
|
||||||
--disable-pimd \
|
--disable-pimd \
|
||||||
--enable-snmp=agentx \
|
--enable-snmp=agentx \
|
||||||
--enable-multipath=64 \
|
--enable-multipath=64 \
|
||||||
--enable-ospfclient=yes \
|
--enable-ospfclient=yes \
|
||||||
--enable-ospfapi=yes \
|
--enable-ospfapi=yes \
|
||||||
--enable-user=frr \
|
--enable-user=frr \
|
||||||
--enable-group=frr \
|
--enable-group=frr \
|
||||||
--enable-vty-group=frrvt \
|
--enable-vty-group=frrvt \
|
||||||
--enable-rtadv \
|
--enable-rtadv \
|
||||||
--disable-exampledir \
|
--disable-exampledir \
|
||||||
--enable-watchfrr \
|
--enable-watchfrr \
|
||||||
--enable-tcp-zebra \
|
--enable-tcp-zebra \
|
||||||
--enable-fpm \
|
--enable-fpm \
|
||||||
--with-pkg-git-version \
|
--with-pkg-git-version \
|
||||||
--with-pkg-extra-version=-MyOwnFRRVersion
|
--with-pkg-extra-version=-MyOwnFRRVersion
|
||||||
make
|
make
|
||||||
make check PYTHON=/usr/bin/python2.7
|
make check PYTHON=/usr/bin/python2.7
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
### Create empty FRR configuration files
|
### Create empty FRR configuration files
|
||||||
sudo mkdir /var/log/frr
|
sudo mkdir /var/log/frr
|
||||||
sudo mkdir /etc/frr
|
sudo mkdir /etc/frr
|
||||||
sudo touch /etc/frr/zebra.conf
|
sudo touch /etc/frr/zebra.conf
|
||||||
sudo touch /etc/frr/bgpd.conf
|
sudo touch /etc/frr/bgpd.conf
|
||||||
sudo touch /etc/frr/ospfd.conf
|
sudo touch /etc/frr/ospfd.conf
|
||||||
sudo touch /etc/frr/ospf6d.conf
|
sudo touch /etc/frr/ospf6d.conf
|
||||||
sudo touch /etc/frr/isisd.conf
|
sudo touch /etc/frr/isisd.conf
|
||||||
sudo touch /etc/frr/ripd.conf
|
sudo touch /etc/frr/ripd.conf
|
||||||
sudo touch /etc/frr/ripngd.conf
|
sudo touch /etc/frr/ripngd.conf
|
||||||
sudo chown -R frr:frr /etc/frr/
|
sudo chown -R frr:frr /etc/frr/
|
||||||
sudo touch /etc/frr/vtysh.conf
|
sudo touch /etc/frr/vtysh.conf
|
||||||
sudo chown frr:frrvt /etc/frr/vtysh.conf
|
sudo chown frr:frrvt /etc/frr/vtysh.conf
|
||||||
sudo chmod 640 /etc/frr/*.conf
|
sudo chmod 640 /etc/frr/*.conf
|
||||||
|
|
||||||
### Enable IP & IPv6 forwarding
|
### Enable IP & IPv6 forwarding
|
||||||
|
|
||||||
Edit `/etc/sysctl.conf` and set the following values (ignore the other settings)
|
Edit `/etc/sysctl.conf` and set the following values (ignore the other
|
||||||
|
settings)
|
||||||
|
|
||||||
# Controls IP packet forwarding
|
# Controls IP packet forwarding
|
||||||
net.ipv4.ip_forward = 1
|
net.ipv4.ip_forward = 1
|
||||||
net.ipv6.conf.all.forwarding=1
|
net.ipv6.conf.all.forwarding=1
|
||||||
|
|
||||||
# Controls source route verification
|
# Controls source route verification
|
||||||
net.ipv4.conf.default.rp_filter = 0
|
net.ipv4.conf.default.rp_filter = 0
|
||||||
|
|
||||||
**Reboot** or use `sysctl` to apply the same config to the running system
|
**Reboot** or use `sysctl` to apply the same config to the running system
|
||||||
|
|
||||||
### Add init.d startup files
|
### Add init.d startup files
|
||||||
sudo cp redhat/bgpd.init /etc/init.d/bgpd
|
sudo cp redhat/bgpd.init /etc/init.d/bgpd
|
||||||
sudo cp redhat/isisd.init /etc/init.d/isisd
|
sudo cp redhat/isisd.init /etc/init.d/isisd
|
||||||
sudo cp redhat/ospfd.init /etc/init.d/ospfd
|
sudo cp redhat/ospfd.init /etc/init.d/ospfd
|
||||||
sudo cp redhat/ospf6d.init /etc/init.d/ospf6d
|
sudo cp redhat/ospf6d.init /etc/init.d/ospf6d
|
||||||
sudo cp redhat/ripngd.init /etc/init.d/ripngd
|
sudo cp redhat/ripngd.init /etc/init.d/ripngd
|
||||||
sudo cp redhat/ripd.init /etc/init.d/ripd
|
sudo cp redhat/ripd.init /etc/init.d/ripd
|
||||||
sudo cp redhat/zebra.init /etc/init.d/zebra
|
sudo cp redhat/zebra.init /etc/init.d/zebra
|
||||||
sudo chkconfig --add zebra
|
sudo chkconfig --add zebra
|
||||||
sudo chkconfig --add ripd
|
sudo chkconfig --add ripd
|
||||||
sudo chkconfig --add ripngd
|
sudo chkconfig --add ripngd
|
||||||
sudo chkconfig --add ospf6d
|
sudo chkconfig --add ospf6d
|
||||||
sudo chkconfig --add ospfd
|
sudo chkconfig --add ospfd
|
||||||
sudo chkconfig --add bgpd
|
sudo chkconfig --add bgpd
|
||||||
sudo chkconfig --add isisd
|
sudo chkconfig --add isisd
|
||||||
|
|
||||||
### Enable required daemons at startup
|
### Enable required daemons at startup
|
||||||
Only enable zebra and the daemons which are needed for your setup
|
Only enable zebra and the daemons which are needed for your setup
|
||||||
|
|
||||||
sudo chkconfig zebra on
|
sudo chkconfig zebra on
|
||||||
sudo chkconfig ospfd on
|
sudo chkconfig ospfd on
|
||||||
sudo chkconfig bgpd on
|
sudo chkconfig bgpd on
|
||||||
[...] etc (as needed)
|
[...] etc (as needed)
|
||||||
|
@ -10,76 +10,80 @@ CentOS 7 restrictions:
|
|||||||
|
|
||||||
Install required packages
|
Install required packages
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
Add packages:
|
Add packages:
|
||||||
|
|
||||||
sudo yum install git autoconf automake libtool make gawk readline-devel \
|
sudo yum install git autoconf automake libtool make gawk readline-devel \
|
||||||
texinfo net-snmp-devel groff pkgconfig json-c-devel pam-devel \
|
texinfo net-snmp-devel groff pkgconfig json-c-devel pam-devel \
|
||||||
bison flex pytest
|
bison flex pytest
|
||||||
|
|
||||||
Get FRR, compile it and install it (from Git)
|
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**
|
**This assumes you want to build and install FRR from source and not using
|
||||||
|
any packages**
|
||||||
|
|
||||||
### Add frr groups and user
|
### Add frr groups and user
|
||||||
|
|
||||||
sudo groupadd -g 92 frr
|
sudo groupadd -g 92 frr
|
||||||
sudo groupadd -r -g 85 frrvt
|
sudo groupadd -r -g 85 frrvt
|
||||||
sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \
|
sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \
|
||||||
-c "FRR FreeRangeRouting suite" -d /var/run/frr frr
|
-c "FRR FreeRangeRouting suite" -d /var/run/frr frr
|
||||||
|
|
||||||
### Download Source, configure and compile it
|
### Download Source, configure and compile it
|
||||||
(You may prefer different options on configure statement. These are just an example.)
|
(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
|
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
|
git clone https://github.com/freerangerouting/frr.git frr
|
||||||
cd frr
|
cd frr
|
||||||
git checkout stable/2.0
|
git checkout stable/2.0
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
./configure \
|
./configure \
|
||||||
--sysconfdir=/etc/frr \
|
--sysconfdir=/etc/frr \
|
||||||
--libdir=/usr/lib64/frr \
|
--libdir=/usr/lib64/frr \
|
||||||
--libexecdir=/usr/lib64/frr \
|
--libexecdir=/usr/lib64/frr \
|
||||||
--localstatedir=/var/run/frr \
|
--localstatedir=/var/run/frr \
|
||||||
--enable-snmp=agentx \
|
--enable-snmp=agentx \
|
||||||
--enable-multipath=64 \
|
--enable-multipath=64 \
|
||||||
--enable-ospfclient=yes \
|
--enable-ospfclient=yes \
|
||||||
--enable-ospfapi=yes \
|
--enable-ospfapi=yes \
|
||||||
--enable-user=frr \
|
--enable-user=frr \
|
||||||
--enable-group=frr \
|
--enable-group=frr \
|
||||||
--enable-vty-group=frrvt \
|
--enable-vty-group=frrvt \
|
||||||
--enable-rtadv \
|
--enable-rtadv \
|
||||||
--disable-exampledir \
|
--disable-exampledir \
|
||||||
--enable-watchfrr \
|
--enable-watchfrr \
|
||||||
--enable-tcp-zebra \
|
--enable-tcp-zebra \
|
||||||
--enable-fpm \
|
--enable-fpm \
|
||||||
--with-pkg-git-version \
|
--with-pkg-git-version \
|
||||||
--with-pkg-extra-version=-MyOwnFRRVersion
|
--with-pkg-extra-version=-MyOwnFRRVersion
|
||||||
make
|
make
|
||||||
make check
|
make check
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
### Create empty FRR configuration files
|
### Create empty FRR configuration files
|
||||||
sudo mkdir /var/log/frr
|
sudo mkdir /var/log/frr
|
||||||
sudo mkdir /etc/frr
|
sudo mkdir /etc/frr
|
||||||
sudo touch /etc/frr/zebra.conf
|
sudo touch /etc/frr/zebra.conf
|
||||||
sudo touch /etc/frr/bgpd.conf
|
sudo touch /etc/frr/bgpd.conf
|
||||||
sudo touch /etc/frr/ospfd.conf
|
sudo touch /etc/frr/ospfd.conf
|
||||||
sudo touch /etc/frr/ospf6d.conf
|
sudo touch /etc/frr/ospf6d.conf
|
||||||
sudo touch /etc/frr/isisd.conf
|
sudo touch /etc/frr/isisd.conf
|
||||||
sudo touch /etc/frr/ripd.conf
|
sudo touch /etc/frr/ripd.conf
|
||||||
sudo touch /etc/frr/ripngd.conf
|
sudo touch /etc/frr/ripngd.conf
|
||||||
sudo touch /etc/frr/pimd.conf
|
sudo touch /etc/frr/pimd.conf
|
||||||
sudo chown -R frr:frr /etc/frr/
|
sudo chown -R frr:frr /etc/frr/
|
||||||
sudo touch /etc/frr/vtysh.conf
|
sudo touch /etc/frr/vtysh.conf
|
||||||
sudo chown frr:frrvt /etc/frr/vtysh.conf
|
sudo chown frr:frrvt /etc/frr/vtysh.conf
|
||||||
sudo chmod 640 /etc/frr/*.conf
|
sudo chmod 640 /etc/frr/*.conf
|
||||||
|
|
||||||
### Enable IP & IPv6 forwarding
|
### Enable IP & IPv6 forwarding
|
||||||
|
|
||||||
Create a new file `/etc/sysctl.d/90-routing-sysctl.conf` with the following content:
|
Create a new file `/etc/sysctl.d/90-routing-sysctl.conf` with the
|
||||||
|
following content:
|
||||||
|
|
||||||
# Sysctl for routing
|
# Sysctl for routing
|
||||||
#
|
#
|
||||||
@ -90,30 +94,30 @@ Create a new file `/etc/sysctl.d/90-routing-sysctl.conf` with the following cont
|
|||||||
**Reboot** or use `sysctl` to apply the same config to the running system
|
**Reboot** or use `sysctl` to apply the same config to the running system
|
||||||
|
|
||||||
### Install Service files
|
### Install Service files
|
||||||
sudo install -p -m 644 redhat/zebra.service /usr/lib/systemd/system/zebra.service
|
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/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/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/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/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/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/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/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.sysconfig /etc/sysconfig/frr
|
||||||
sudo install -p -m 644 redhat/frr.logrotate /etc/logrotate.d/frr
|
sudo install -p -m 644 redhat/frr.logrotate /etc/logrotate.d/frr
|
||||||
|
|
||||||
### Register the systemd files
|
### Register the systemd files
|
||||||
sudo systemctl preset zebra.service
|
sudo systemctl preset zebra.service
|
||||||
sudo systemctl preset ripd.service
|
sudo systemctl preset ripd.service
|
||||||
sudo systemctl preset ospfd.service
|
sudo systemctl preset ospfd.service
|
||||||
sudo systemctl preset bgpd.service
|
sudo systemctl preset bgpd.service
|
||||||
sudo systemctl preset ospf6d.service
|
sudo systemctl preset ospf6d.service
|
||||||
sudo systemctl preset ripngd.service
|
sudo systemctl preset ripngd.service
|
||||||
sudo systemctl preset pimd.service
|
sudo systemctl preset pimd.service
|
||||||
|
|
||||||
### Enable required daemons at startup
|
### Enable required daemons at startup
|
||||||
Only enable zebra and the daemons which are needed for your setup
|
Only enable zebra and the daemons which are needed for your setup
|
||||||
|
|
||||||
sudo systemctl enable zebra
|
sudo systemctl enable zebra
|
||||||
sudo systemctl enable ospfd
|
sudo systemctl enable ospfd
|
||||||
sudo systemctl enable bgpd
|
sudo systemctl enable bgpd
|
||||||
[...] etc (as needed)
|
[...] etc (as needed)
|
||||||
|
@ -10,85 +10,89 @@ Debian 8 restrictions:
|
|||||||
|
|
||||||
Install required packages
|
Install required packages
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
Add packages:
|
Add packages:
|
||||||
|
|
||||||
sudo apt-get install git autoconf automake libtool make gawk libreadline-dev \
|
sudo apt-get install git autoconf automake libtool make gawk \
|
||||||
texinfo libjson-c-dev pkg-config bison flex python-pip
|
libreadline-dev texinfo libjson-c-dev pkg-config bison flex \
|
||||||
|
python-pip
|
||||||
|
|
||||||
Install newer pytest (>3.0) from pip
|
Install newer pytest (>3.0) from pip
|
||||||
|
|
||||||
|
sudo pip install pytest
|
||||||
|
|
||||||
sudo pip install pytest
|
|
||||||
|
|
||||||
Get FRR, compile it and install it (from Git)
|
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**
|
**This assumes you want to build and install FRR from source and not using
|
||||||
|
any packages**
|
||||||
|
|
||||||
### Add frr groups and user
|
### Add frr groups and user
|
||||||
|
|
||||||
sudo addgroup --system --gid 92 frr
|
sudo addgroup --system --gid 92 frr
|
||||||
sudo addgroup --system --gid 85 frrvty
|
sudo addgroup --system --gid 85 frrvty
|
||||||
sudo adduser --system --ingroup frr --groups frrvty --home /var/run/frr/ \
|
sudo adduser --system --ingroup frr --groups frrvty --home /var/run/frr/ \
|
||||||
--gecos "FRR FreeRangeRouting suite" --shell /bin/false frr
|
--gecos "FRR FreeRangeRouting suite" --shell /bin/false frr
|
||||||
sudo usermode
|
sudo usermode
|
||||||
|
|
||||||
### Download Source, configure and compile it
|
### Download Source, configure and compile it
|
||||||
(You may prefer different options on configure statement. These are just an example.)
|
(You may prefer different options on configure statement. These are just
|
||||||
|
an example.)
|
||||||
|
|
||||||
git clone https://github.com/freerangerouting/frr.git frr
|
git clone https://github.com/freerangerouting/frr.git frr
|
||||||
cd frr
|
cd frr
|
||||||
git checkout stable/2.0
|
git checkout stable/2.0
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
./configure \
|
./configure \
|
||||||
--enable-exampledir=/usr/share/doc/frr/examples/ \
|
--enable-exampledir=/usr/share/doc/frr/examples/ \
|
||||||
--localstatedir=/var/run/frr \
|
--localstatedir=/var/run/frr \
|
||||||
--sbindir=/usr/lib/frr \
|
--sbindir=/usr/lib/frr \
|
||||||
--sysconfdir=/etc/frr \
|
--sysconfdir=/etc/frr \
|
||||||
--enable-vtysh \
|
--enable-vtysh \
|
||||||
--enable-isisd \
|
--enable-isisd \
|
||||||
--enable-pimd \
|
--enable-pimd \
|
||||||
--enable-watchfrr \
|
--enable-watchfrr \
|
||||||
--enable-ospfclient=yes \
|
--enable-ospfclient=yes \
|
||||||
--enable-ospfapi=yes \
|
--enable-ospfapi=yes \
|
||||||
--enable-multipath=64 \
|
--enable-multipath=64 \
|
||||||
--enable-user=frr \
|
--enable-user=frr \
|
||||||
--enable-group=frr \
|
--enable-group=frr \
|
||||||
--enable-vty-group=frrvty \
|
--enable-vty-group=frrvty \
|
||||||
--enable-configfile-mask=0640 \
|
--enable-configfile-mask=0640 \
|
||||||
--enable-logfile-mask=0640 \
|
--enable-logfile-mask=0640 \
|
||||||
--enable-rtadv \
|
--enable-rtadv \
|
||||||
--enable-tcp-zebra \
|
--enable-tcp-zebra \
|
||||||
--enable-fpm \
|
--enable-fpm \
|
||||||
--with-pkg-git-version \
|
--with-pkg-git-version \
|
||||||
--with-pkg-extra-version=-MyOwnFRRVersion
|
--with-pkg-extra-version=-MyOwnFRRVersion
|
||||||
make
|
make
|
||||||
make check
|
make check
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
### Create empty FRR configuration files
|
### Create empty FRR configuration files
|
||||||
sudo install -m 755 -o frr -g frr -d /var/log/frr
|
sudo install -m 755 -o frr -g frr -d /var/log/frr
|
||||||
sudo install -m 775 -o frr -g frrvty -d /etc/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/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/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/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/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/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/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/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/pimd.conf
|
||||||
sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
|
sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
|
||||||
|
|
||||||
### Enable IP & IPv6 forwarding
|
### Enable IP & IPv6 forwarding
|
||||||
|
|
||||||
Edit `/etc/sysctl.conf` and uncomment the following values (ignore the other settings)
|
Edit `/etc/sysctl.conf` and uncomment the following values (ignore the
|
||||||
|
other settings)
|
||||||
|
|
||||||
# Uncomment the next line to enable packet forwarding for IPv4
|
# Uncomment the next line to enable packet forwarding for IPv4
|
||||||
net.ipv4.ip_forward=1
|
net.ipv4.ip_forward=1
|
||||||
|
|
||||||
# Uncomment the next line to enable packet forwarding for IPv6
|
# Uncomment the next line to enable packet forwarding for IPv6
|
||||||
# Enabling this option disables Stateless Address Autoconfiguration
|
# Enabling this option disables Stateless Address Autoconfiguration
|
||||||
# based on Router Advertisements for this host
|
# based on Router Advertisements for this host
|
||||||
net.ipv6.conf.all.forwarding=1
|
net.ipv6.conf.all.forwarding=1
|
||||||
|
|
||||||
**Reboot** or use `sysctl` to apply the same config to the running system
|
**Reboot** or use `sysctl` to apply the same config to the running system
|
||||||
|
@ -3,17 +3,18 @@ Building FRR on Fedora 24 from Git Source
|
|||||||
|
|
||||||
Install required packages
|
Install required packages
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
Add packages:
|
Add packages:
|
||||||
|
|
||||||
sudo dnf install git autoconf automake libtool make gawk readline-devel \
|
sudo dnf install git autoconf automake libtool make gawk \
|
||||||
texinfo net-snmp-devel groff pkgconfig json-c-devel pam-devel \
|
readline-devel texinfo net-snmp-devel groff pkgconfig \
|
||||||
perl-XML-LibXML pytest
|
json-c-devel pam-devel perl-XML-LibXML pytest
|
||||||
|
|
||||||
Get FRR, compile it and install it (from Git)
|
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**
|
**This assumes you want to build and install FRR from source and not
|
||||||
|
using any packages**
|
||||||
|
|
||||||
### Add frr groups and user
|
### Add frr groups and user
|
||||||
|
|
||||||
@ -23,77 +24,81 @@ Get FRR, compile it and install it (from Git)
|
|||||||
-c "FRR FreeRangeRouting suite" -d /var/run/frr frr
|
-c "FRR FreeRangeRouting suite" -d /var/run/frr frr
|
||||||
|
|
||||||
### Download Source, configure and compile it
|
### Download Source, configure and compile it
|
||||||
(You may prefer different options on configure statement. These are just an example.)
|
(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
|
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
|
git clone https://github.com/freerangerouting/frr.git frr
|
||||||
cd frr
|
cd frr
|
||||||
git checkout stable/2.0
|
git checkout stable/2.0
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
./configure \
|
./configure \
|
||||||
--sysconfdir=/etc/frr \
|
--sysconfdir=/etc/frr \
|
||||||
--libdir=/usr/lib64/frr \
|
--libdir=/usr/lib64/frr \
|
||||||
--libexecdir=/usr/lib64/frr \
|
--libexecdir=/usr/lib64/frr \
|
||||||
--localstatedir=/var/run/frr \
|
--localstatedir=/var/run/frr \
|
||||||
--enable-pimd \
|
--enable-pimd \
|
||||||
--enable-snmp=agentx \
|
--enable-snmp=agentx \
|
||||||
--enable-multipath=64 \
|
--enable-multipath=64 \
|
||||||
--enable-ospfclient=yes \
|
--enable-ospfclient=yes \
|
||||||
--enable-ospfapi=yes \
|
--enable-ospfapi=yes \
|
||||||
--enable-user=frr \
|
--enable-user=frr \
|
||||||
--enable-group=frr \
|
--enable-group=frr \
|
||||||
--enable-vty-group=frrvt \
|
--enable-vty-group=frrvt \
|
||||||
--enable-rtadv \
|
--enable-rtadv \
|
||||||
--disable-exampledir \
|
--disable-exampledir \
|
||||||
--enable-watchfrr \
|
--enable-watchfrr \
|
||||||
--enable-tcp-zebra \
|
--enable-tcp-zebra \
|
||||||
--enable-fpm \
|
--enable-fpm \
|
||||||
--with-pkg-git-version \
|
--with-pkg-git-version \
|
||||||
--with-pkg-extra-version=-MyOwnFRRVersion
|
--with-pkg-extra-version=-MyOwnFRRVersion
|
||||||
make
|
make
|
||||||
make check
|
make check
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
### Create empty FRR configuration files
|
### Create empty FRR configuration files
|
||||||
sudo mkdir /var/log/frr
|
sudo mkdir /var/log/frr
|
||||||
sudo mkdir /etc/frr
|
sudo mkdir /etc/frr
|
||||||
sudo touch /etc/frr/zebra.conf
|
sudo touch /etc/frr/zebra.conf
|
||||||
sudo touch /etc/frr/bgpd.conf
|
sudo touch /etc/frr/bgpd.conf
|
||||||
sudo touch /etc/frr/ospfd.conf
|
sudo touch /etc/frr/ospfd.conf
|
||||||
sudo touch /etc/frr/ospf6d.conf
|
sudo touch /etc/frr/ospf6d.conf
|
||||||
sudo touch /etc/frr/isisd.conf
|
sudo touch /etc/frr/isisd.conf
|
||||||
sudo touch /etc/frr/ripd.conf
|
sudo touch /etc/frr/ripd.conf
|
||||||
sudo touch /etc/frr/ripngd.conf
|
sudo touch /etc/frr/ripngd.conf
|
||||||
sudo touch /etc/frr/pimd.conf
|
sudo touch /etc/frr/pimd.conf
|
||||||
sudo touch /etc/frr/ldpd.conf
|
sudo touch /etc/frr/ldpd.conf
|
||||||
sudo chown -R frr:frr /etc/frr/
|
sudo chown -R frr:frr /etc/frr/
|
||||||
sudo touch /etc/frr/vtysh.conf
|
sudo touch /etc/frr/vtysh.conf
|
||||||
sudo chown frr:frrvt /etc/frr/vtysh.conf
|
sudo chown frr:frrvt /etc/frr/vtysh.conf
|
||||||
sudo chmod 640 /etc/frr/*.conf
|
sudo chmod 640 /etc/frr/*.conf
|
||||||
|
|
||||||
### Enable IP & IPv6 forwarding (and MPLS)
|
### Enable IP & IPv6 forwarding (and MPLS)
|
||||||
|
|
||||||
Create a new file `/etc/sysctl.d/90-routing-sysctl.conf` with the following content:
|
Create a new file `/etc/sysctl.d/90-routing-sysctl.conf` with the
|
||||||
(Please make sure to list all interfaces with required MPLS similar to `net.mpls.conf.eth0.input=1`)
|
following content:
|
||||||
|
(Please make sure to list all interfaces with required MPLS similar
|
||||||
|
to `net.mpls.conf.eth0.input=1`)
|
||||||
|
|
||||||
# Sysctl for routing
|
# Sysctl for routing
|
||||||
#
|
#
|
||||||
# Routing: We need to forward packets
|
# Routing: We need to forward packets
|
||||||
net.ipv4.conf.all.forwarding=1
|
net.ipv4.conf.all.forwarding=1
|
||||||
net.ipv6.conf.all.forwarding=1
|
net.ipv6.conf.all.forwarding=1
|
||||||
#
|
#
|
||||||
# Enable MPLS Label processing on all interfaces
|
# Enable MPLS Label processing on all interfaces
|
||||||
net.mpls.conf.eth0.input=1
|
net.mpls.conf.eth0.input=1
|
||||||
net.mpls.conf.eth1.input=1
|
net.mpls.conf.eth1.input=1
|
||||||
net.mpls.conf.eth2.input=1
|
net.mpls.conf.eth2.input=1
|
||||||
net.mpls.platform_labels=100000
|
net.mpls.platform_labels=100000
|
||||||
|
|
||||||
Create a new file `/etc/modules-load.d/mpls.conf` with the following content:
|
Create a new file `/etc/modules-load.d/mpls.conf` with the following content:
|
||||||
|
|
||||||
# Load MPLS Kernel Modules
|
# Load MPLS Kernel Modules
|
||||||
mpls-router
|
mpls-router
|
||||||
mpls-iptunnel
|
mpls-iptunnel
|
||||||
|
|
||||||
**Reboot** or use `sysctl` to apply the same config to the running system
|
**Reboot** or use `sysctl` to apply the same config to the running system
|
||||||
|
|
||||||
|
@ -12,80 +12,85 @@ Install required packages
|
|||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
Add packages:
|
Add packages:
|
||||||
(Allow the install of the package managment tool if this is first package install and asked)
|
(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 \
|
pkg install git autoconf automake libtool gmake gawk json-c pkgconf \
|
||||||
bison flex py27-pytest
|
bison flex py27-pytest
|
||||||
|
|
||||||
Make sure there is no /usr/bin/flex preinstalled (and use the newly installed in /usr/local/bin):
|
Make sure there is no /usr/bin/flex preinstalled (and use the newly
|
||||||
(FreeBSD frequently provides a older flex as part of the base OS whcih takes preference in path)
|
installed in /usr/local/bin):
|
||||||
|
(FreeBSD frequently provides a older flex as part of the base OS which
|
||||||
|
takes preference in path)
|
||||||
|
|
||||||
|
rm -f /usr/bin/flex
|
||||||
|
|
||||||
rm -f /usr/bin/flex
|
|
||||||
|
|
||||||
Get FRR, compile it and install it (from Git)
|
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**
|
**This assumes you want to build and install FRR from source and not
|
||||||
|
using any packages**
|
||||||
|
|
||||||
### Add frr group and user
|
### Add frr group and user
|
||||||
|
|
||||||
pw groupadd frr -g 101
|
pw groupadd frr -g 101
|
||||||
pw groupadd frrvty -g 102
|
pw groupadd frrvty -g 102
|
||||||
pw adduser frr -g 101 -u 101 -G 102 -c "FRR suite" \
|
pw adduser frr -g 101 -u 101 -G 102 -c "FRR suite" \
|
||||||
-d /usr/local/etc/frr -s /usr/sbin/nologin
|
-d /usr/local/etc/frr -s /usr/sbin/nologin
|
||||||
|
|
||||||
(You may prefer different options on configure statement. These are just an example)
|
(You may prefer different options on configure statement. These are just
|
||||||
|
an example)
|
||||||
|
|
||||||
git clone https://github.com/freerangerouting/frr.git frr
|
git clone https://github.com/freerangerouting/frr.git frr
|
||||||
cd frr
|
cd frr
|
||||||
git checkout stable/2.0
|
git checkout stable/2.0
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
export MAKE=gmake
|
export MAKE=gmake
|
||||||
export LDFLAGS="-L/usr/local/lib"
|
export LDFLAGS="-L/usr/local/lib"
|
||||||
export CPPFLAGS="-I/usr/local/include"
|
export CPPFLAGS="-I/usr/local/include"
|
||||||
./configure \
|
./configure \
|
||||||
--sysconfdir=/usr/local/etc/frr \
|
--sysconfdir=/usr/local/etc/frr \
|
||||||
--enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
|
--enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
|
||||||
--localstatedir=/var/run/frr \
|
--localstatedir=/var/run/frr \
|
||||||
--prefix=/usr/local \
|
--prefix=/usr/local \
|
||||||
--enable-ospfclient=yes \
|
--enable-ospfclient=yes \
|
||||||
--enable-ospfapi=yes \
|
--enable-ospfapi=yes \
|
||||||
--enable-multipath=64 \
|
--enable-multipath=64 \
|
||||||
--enable-user=frr \
|
--enable-user=frr \
|
||||||
--enable-group=frr \
|
--enable-group=frr \
|
||||||
--enable-vty-group=frrvty \
|
--enable-vty-group=frrvty \
|
||||||
--enable-configfile-mask=0640 \
|
--enable-configfile-mask=0640 \
|
||||||
--enable-logfile-mask=0640 \
|
--enable-logfile-mask=0640 \
|
||||||
--enable-rtadv \
|
--enable-rtadv \
|
||||||
--enable-tcp-zebra \
|
--enable-tcp-zebra \
|
||||||
--enable-fpm \
|
--enable-fpm \
|
||||||
--with-pkg-git-version \
|
--with-pkg-git-version \
|
||||||
--with-pkg-extra-version=-MyOwnFRRVersion
|
--with-pkg-extra-version=-MyOwnFRRVersion
|
||||||
gmake
|
gmake
|
||||||
gmake check
|
gmake check
|
||||||
sudo gmake install
|
sudo gmake install
|
||||||
|
|
||||||
### Create empty FRR configuration files
|
### Create empty FRR configuration files
|
||||||
sudo mkdir /usr/local/etc/frr
|
sudo mkdir /usr/local/etc/frr
|
||||||
sudo touch /usr/local/etc/frr/zebra.conf
|
sudo touch /usr/local/etc/frr/zebra.conf
|
||||||
sudo touch /usr/local/etc/frr/bgpd.conf
|
sudo touch /usr/local/etc/frr/bgpd.conf
|
||||||
sudo touch /usr/local/etc/frr/ospfd.conf
|
sudo touch /usr/local/etc/frr/ospfd.conf
|
||||||
sudo touch /usr/local/etc/frr/ospf6d.conf
|
sudo touch /usr/local/etc/frr/ospf6d.conf
|
||||||
sudo touch /usr/local/etc/frr/isisd.conf
|
sudo touch /usr/local/etc/frr/isisd.conf
|
||||||
sudo touch /usr/local/etc/frr/ripd.conf
|
sudo touch /usr/local/etc/frr/ripd.conf
|
||||||
sudo touch /usr/local/etc/frr/ripngd.conf
|
sudo touch /usr/local/etc/frr/ripngd.conf
|
||||||
sudo touch /usr/local/etc/frr/pimd.conf
|
sudo touch /usr/local/etc/frr/pimd.conf
|
||||||
sudo chown -R frr:frr /usr/local/etc/frr
|
sudo chown -R frr:frr /usr/local/etc/frr
|
||||||
sudo touch /usr/local/etc/frr/vtysh.conf
|
sudo touch /usr/local/etc/frr/vtysh.conf
|
||||||
sudo chown frr:frrvty /usr/local/etc/frr/vtysh.conf
|
sudo chown frr:frrvty /usr/local/etc/frr/vtysh.conf
|
||||||
sudo chmod 640 /usr/local/etc/frr/*.conf
|
sudo chmod 640 /usr/local/etc/frr/*.conf
|
||||||
|
|
||||||
### Enable IP & IPv6 forwarding
|
### Enable IP & IPv6 forwarding
|
||||||
|
|
||||||
Add the following lines to the end of `/etc/sysctl.conf`:
|
Add the following lines to the end of `/etc/sysctl.conf`:
|
||||||
|
|
||||||
# Routing: We need to forward packets
|
# Routing: We need to forward packets
|
||||||
net.inet.ip.forwarding=1
|
net.inet.ip.forwarding=1
|
||||||
net.inet6.ip6.forwarding=1
|
net.inet6.ip6.forwarding=1
|
||||||
|
|
||||||
**Reboot** or use `sysctl` to apply the same config to the running system
|
**Reboot** or use `sysctl` to apply the same config to the running system
|
||||||
|
@ -12,80 +12,85 @@ Install required packages
|
|||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
Add packages:
|
Add packages:
|
||||||
(Allow the install of the package managment tool if this is first package install and asked)
|
(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 \
|
pkg install git autoconf automake libtool gmake gawk json-c pkgconf \
|
||||||
bison flex py27-pytest
|
bison flex py27-pytest
|
||||||
|
|
||||||
Make sure there is no /usr/bin/flex preinstalled (and use the newly installed in /usr/local/bin):
|
Make sure there is no /usr/bin/flex preinstalled (and use the newly
|
||||||
(FreeBSD frequently provides a older flex as part of the base OS whcih takes preference in path)
|
installed in /usr/local/bin):
|
||||||
|
(FreeBSD frequently provides a older flex as part of the base OS which
|
||||||
|
takes preference in path)
|
||||||
|
|
||||||
|
rm -f /usr/bin/flex
|
||||||
|
|
||||||
rm -f /usr/bin/flex
|
|
||||||
|
|
||||||
Get FRR, compile it and install it (from Git)
|
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**
|
**This assumes you want to build and install FRR from source and not
|
||||||
|
using any packages**
|
||||||
|
|
||||||
### Add frr group and user
|
### Add frr group and user
|
||||||
|
|
||||||
pw groupadd frr -g 101
|
pw groupadd frr -g 101
|
||||||
pw groupadd frrvty -g 102
|
pw groupadd frrvty -g 102
|
||||||
pw adduser frr -g 101 -u 101 -G 102 -c "FRR suite" \
|
pw adduser frr -g 101 -u 101 -G 102 -c "FRR suite" \
|
||||||
-d /usr/local/etc/frr -s /usr/sbin/nologin
|
-d /usr/local/etc/frr -s /usr/sbin/nologin
|
||||||
|
|
||||||
(You may prefer different options on configure statement. These are just an example)
|
(You may prefer different options on configure statement. These are just
|
||||||
|
an example)
|
||||||
|
|
||||||
git clone https://github.com/freerangerouting/frr.git frr
|
git clone https://github.com/freerangerouting/frr.git frr
|
||||||
cd frr
|
cd frr
|
||||||
git checkout stable/2.0
|
git checkout stable/2.0
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
export MAKE=gmake
|
export MAKE=gmake
|
||||||
export LDFLAGS="-L/usr/local/lib"
|
export LDFLAGS="-L/usr/local/lib"
|
||||||
export CPPFLAGS="-I/usr/local/include"
|
export CPPFLAGS="-I/usr/local/include"
|
||||||
./configure \
|
./configure \
|
||||||
--sysconfdir=/usr/local/etc/frr \
|
--sysconfdir=/usr/local/etc/frr \
|
||||||
--enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
|
--enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
|
||||||
--localstatedir=/var/run/frr \
|
--localstatedir=/var/run/frr \
|
||||||
--prefix=/usr/local \
|
--prefix=/usr/local \
|
||||||
--enable-ospfclient=yes \
|
--enable-ospfclient=yes \
|
||||||
--enable-ospfapi=yes \
|
--enable-ospfapi=yes \
|
||||||
--enable-multipath=64 \
|
--enable-multipath=64 \
|
||||||
--enable-user=frr \
|
--enable-user=frr \
|
||||||
--enable-group=frr \
|
--enable-group=frr \
|
||||||
--enable-vty-group=frrvty \
|
--enable-vty-group=frrvty \
|
||||||
--enable-configfile-mask=0640 \
|
--enable-configfile-mask=0640 \
|
||||||
--enable-logfile-mask=0640 \
|
--enable-logfile-mask=0640 \
|
||||||
--enable-rtadv \
|
--enable-rtadv \
|
||||||
--enable-tcp-zebra \
|
--enable-tcp-zebra \
|
||||||
--enable-fpm \
|
--enable-fpm \
|
||||||
--with-pkg-git-version \
|
--with-pkg-git-version \
|
||||||
--with-pkg-extra-version=-MyOwnFRRVersion
|
--with-pkg-extra-version=-MyOwnFRRVersion
|
||||||
gmake
|
gmake
|
||||||
gmake check
|
gmake check
|
||||||
sudo gmake install
|
sudo gmake install
|
||||||
|
|
||||||
### Create empty FRR configuration files
|
### Create empty FRR configuration files
|
||||||
sudo mkdir /usr/local/etc/frr
|
sudo mkdir /usr/local/etc/frr
|
||||||
sudo touch /usr/local/etc/frr/zebra.conf
|
sudo touch /usr/local/etc/frr/zebra.conf
|
||||||
sudo touch /usr/local/etc/frr/bgpd.conf
|
sudo touch /usr/local/etc/frr/bgpd.conf
|
||||||
sudo touch /usr/local/etc/frr/ospfd.conf
|
sudo touch /usr/local/etc/frr/ospfd.conf
|
||||||
sudo touch /usr/local/etc/frr/ospf6d.conf
|
sudo touch /usr/local/etc/frr/ospf6d.conf
|
||||||
sudo touch /usr/local/etc/frr/isisd.conf
|
sudo touch /usr/local/etc/frr/isisd.conf
|
||||||
sudo touch /usr/local/etc/frr/ripd.conf
|
sudo touch /usr/local/etc/frr/ripd.conf
|
||||||
sudo touch /usr/local/etc/frr/ripngd.conf
|
sudo touch /usr/local/etc/frr/ripngd.conf
|
||||||
sudo touch /usr/local/etc/frr/pimd.conf
|
sudo touch /usr/local/etc/frr/pimd.conf
|
||||||
sudo chown -R frr:frr /usr/local/etc/frr
|
sudo chown -R frr:frr /usr/local/etc/frr
|
||||||
sudo touch /usr/local/etc/frr/vtysh.conf
|
sudo touch /usr/local/etc/frr/vtysh.conf
|
||||||
sudo chown frr:frrvty /usr/local/etc/frr/vtysh.conf
|
sudo chown frr:frrvty /usr/local/etc/frr/vtysh.conf
|
||||||
sudo chmod 640 /usr/local/etc/frr/*.conf
|
sudo chmod 640 /usr/local/etc/frr/*.conf
|
||||||
|
|
||||||
### Enable IP & IPv6 forwarding
|
### Enable IP & IPv6 forwarding
|
||||||
|
|
||||||
Add the following lines to the end of `/etc/sysctl.conf`:
|
Add the following lines to the end of `/etc/sysctl.conf`:
|
||||||
|
|
||||||
# Routing: We need to forward packets
|
# Routing: We need to forward packets
|
||||||
net.inet.ip.forwarding=1
|
net.inet.ip.forwarding=1
|
||||||
net.inet6.ip6.forwarding=1
|
net.inet6.ip6.forwarding=1
|
||||||
|
|
||||||
**Reboot** or use `sysctl` to apply the same config to the running system
|
**Reboot** or use `sysctl` to apply the same config to the running system
|
||||||
|
@ -12,80 +12,85 @@ Install required packages
|
|||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
Add packages:
|
Add packages:
|
||||||
(Allow the install of the package managment tool if this is first package install and asked)
|
(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 \
|
pkg install -y git autoconf automake libtool gmake gawk \
|
||||||
pkgconf texinfo json-c bison flex py27-pytest
|
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):
|
Make sure there is no /usr/bin/flex preinstalled (and use the newly
|
||||||
(FreeBSD frequently provides a older flex as part of the base OS whcih takes preference in path)
|
installed in /usr/local/bin):
|
||||||
|
(FreeBSD frequently provides a older flex as part of the base OS which
|
||||||
|
takes preference in path)
|
||||||
|
|
||||||
|
rm -f /usr/bin/flex
|
||||||
|
|
||||||
rm -f /usr/bin/flex
|
|
||||||
|
|
||||||
Get FRR, compile it and install it (from Git)
|
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**
|
**This assumes you want to build and install FRR from source and not
|
||||||
|
using any packages**
|
||||||
|
|
||||||
### Add frr group and user
|
### Add frr group and user
|
||||||
|
|
||||||
pw groupadd frr -g 101
|
pw groupadd frr -g 101
|
||||||
pw groupadd frrvty -g 102
|
pw groupadd frrvty -g 102
|
||||||
pw adduser frr -g 101 -u 101 -G 102 -c "FRR suite" \
|
pw adduser frr -g 101 -u 101 -G 102 -c "FRR suite" \
|
||||||
-d /usr/local/etc/frr -s /usr/sbin/nologin
|
-d /usr/local/etc/frr -s /usr/sbin/nologin
|
||||||
|
|
||||||
(You may prefer different options on configure statement. These are just an example)
|
(You may prefer different options on configure statement. These are just
|
||||||
|
an example)
|
||||||
|
|
||||||
git clone https://github.com/freerangerouting/frr.git frr
|
git clone https://github.com/freerangerouting/frr.git frr
|
||||||
cd frr
|
cd frr
|
||||||
git checkout stable/2.0
|
git checkout stable/2.0
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
export MAKE=gmake
|
export MAKE=gmake
|
||||||
export LDFLAGS="-L/usr/local/lib"
|
export LDFLAGS="-L/usr/local/lib"
|
||||||
export CPPFLAGS="-I/usr/local/include"
|
export CPPFLAGS="-I/usr/local/include"
|
||||||
./configure \
|
./configure \
|
||||||
--sysconfdir=/usr/local/etc/frr \
|
--sysconfdir=/usr/local/etc/frr \
|
||||||
--enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
|
--enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
|
||||||
--localstatedir=/var/run/frr \
|
--localstatedir=/var/run/frr \
|
||||||
--prefix=/usr/local \
|
--prefix=/usr/local \
|
||||||
--enable-ospfclient=yes \
|
--enable-ospfclient=yes \
|
||||||
--enable-ospfapi=yes \
|
--enable-ospfapi=yes \
|
||||||
--enable-multipath=64 \
|
--enable-multipath=64 \
|
||||||
--enable-user=frr \
|
--enable-user=frr \
|
||||||
--enable-group=frr \
|
--enable-group=frr \
|
||||||
--enable-vty-group=frrvty \
|
--enable-vty-group=frrvty \
|
||||||
--enable-configfile-mask=0640 \
|
--enable-configfile-mask=0640 \
|
||||||
--enable-logfile-mask=0640 \
|
--enable-logfile-mask=0640 \
|
||||||
--enable-rtadv \
|
--enable-rtadv \
|
||||||
--enable-tcp-zebra \
|
--enable-tcp-zebra \
|
||||||
--enable-fpm \
|
--enable-fpm \
|
||||||
--with-pkg-git-version \
|
--with-pkg-git-version \
|
||||||
--with-pkg-extra-version=-MyOwnFRRVersion
|
--with-pkg-extra-version=-MyOwnFRRVersion
|
||||||
gmake
|
gmake
|
||||||
gmake check
|
gmake check
|
||||||
sudo gmake install
|
sudo gmake install
|
||||||
|
|
||||||
### Create empty FRR configuration files
|
### Create empty FRR configuration files
|
||||||
sudo mkdir /usr/local/etc/frr
|
sudo mkdir /usr/local/etc/frr
|
||||||
sudo touch /usr/local/etc/frr/zebra.conf
|
sudo touch /usr/local/etc/frr/zebra.conf
|
||||||
sudo touch /usr/local/etc/frr/bgpd.conf
|
sudo touch /usr/local/etc/frr/bgpd.conf
|
||||||
sudo touch /usr/local/etc/frr/ospfd.conf
|
sudo touch /usr/local/etc/frr/ospfd.conf
|
||||||
sudo touch /usr/local/etc/frr/ospf6d.conf
|
sudo touch /usr/local/etc/frr/ospf6d.conf
|
||||||
sudo touch /usr/local/etc/frr/isisd.conf
|
sudo touch /usr/local/etc/frr/isisd.conf
|
||||||
sudo touch /usr/local/etc/frr/ripd.conf
|
sudo touch /usr/local/etc/frr/ripd.conf
|
||||||
sudo touch /usr/local/etc/frr/ripngd.conf
|
sudo touch /usr/local/etc/frr/ripngd.conf
|
||||||
sudo touch /usr/local/etc/frr/pimd.conf
|
sudo touch /usr/local/etc/frr/pimd.conf
|
||||||
sudo chown -R frr:frr /usr/local/etc/frr
|
sudo chown -R frr:frr /usr/local/etc/frr
|
||||||
sudo touch /usr/local/etc/frr/vtysh.conf
|
sudo touch /usr/local/etc/frr/vtysh.conf
|
||||||
sudo chown frr:frrvty /usr/local/etc/frr/vtysh.conf
|
sudo chown frr:frrvty /usr/local/etc/frr/vtysh.conf
|
||||||
sudo chmod 640 /usr/local/etc/frr/*.conf
|
sudo chmod 640 /usr/local/etc/frr/*.conf
|
||||||
|
|
||||||
### Enable IP & IPv6 forwarding
|
### Enable IP & IPv6 forwarding
|
||||||
|
|
||||||
Add the following lines to the end of `/etc/sysctl.conf`:
|
Add the following lines to the end of `/etc/sysctl.conf`:
|
||||||
|
|
||||||
# Routing: We need to forward packets
|
# Routing: We need to forward packets
|
||||||
net.inet.ip.forwarding=1
|
net.inet.ip.forwarding=1
|
||||||
net.inet6.ip6.forwarding=1
|
net.inet6.ip6.forwarding=1
|
||||||
|
|
||||||
**Reboot** or use `sysctl` to apply the same config to the running system
|
**Reboot** or use `sysctl` to apply the same config to the running system
|
||||||
|
@ -12,105 +12,106 @@ Install required packages
|
|||||||
-------------------------
|
-------------------------
|
||||||
Configure Package location:
|
Configure Package location:
|
||||||
|
|
||||||
PKG_PATH="ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/`uname -m`/`uname -r`/All"
|
PKG_PATH="ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/`uname -m`/`uname -r`/All"
|
||||||
export PKG_PATH
|
export PKG_PATH
|
||||||
|
|
||||||
Add packages:
|
Add packages:
|
||||||
|
|
||||||
sudo pkg_add git autoconf automake libtool gmake gawk openssl pkg-config \
|
sudo pkg_add git autoconf automake libtool gmake gawk openssl \
|
||||||
json-c p5-XML-LibXML python27 py27-test
|
pkg-config json-c p5-XML-LibXML python27 py27-test
|
||||||
|
|
||||||
Install SSL Root Certificates (for git https access):
|
Install SSL Root Certificates (for git https access):
|
||||||
|
|
||||||
sudo pkg_add mozilla-rootcerts
|
sudo pkg_add mozilla-rootcerts
|
||||||
sudo touch /etc/openssl/openssl.cnf
|
sudo touch /etc/openssl/openssl.cnf
|
||||||
sudo mozilla-rootcerts install
|
sudo mozilla-rootcerts install
|
||||||
|
|
||||||
Select default Python and py.test
|
Select default Python and py.test
|
||||||
|
|
||||||
sudo ln -s /usr/pkg/bin/python2.7 /usr/bin/python
|
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
|
sudo ln -s /usr/pkg/bin/py.test-2.7 /usr/bin/py.test
|
||||||
|
|
||||||
Get FRR, compile it and install it (from Git)
|
Get FRR, compile it and install it (from Git)
|
||||||
------------------------------------------------
|
------------------------------------------------
|
||||||
|
|
||||||
### Add frr groups and user
|
### Add frr groups and user
|
||||||
|
|
||||||
sudo groupadd -g 92 frr
|
sudo groupadd -g 92 frr
|
||||||
sudo groupadd -g 93 frrvty
|
sudo groupadd -g 93 frrvty
|
||||||
sudo useradd -g 92 -u 92 -G frrvty -c "FRR suite" \
|
sudo useradd -g 92 -u 92 -G frrvty -c "FRR suite" \
|
||||||
-d /nonexistent -s /sbin/nologin frr
|
-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
|
### Download Source, configure and compile it
|
||||||
cd frr
|
(You may prefer different options on configure statement. These are just
|
||||||
git checkout stable/2.0
|
an example)
|
||||||
./bootstrap.sh
|
|
||||||
MAKE=gmake
|
git clone https://github.com/freerangerouting/frr.git frr
|
||||||
export LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib"
|
cd frr
|
||||||
export CPPFLAGS="-I/usr/pkg/include"
|
git checkout stable/2.0
|
||||||
./configure \
|
./bootstrap.sh
|
||||||
--sysconfdir=/usr/pkg/etc/frr \
|
MAKE=gmake
|
||||||
--enable-exampledir=/usr/pkg/share/examples/frr \
|
export LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib"
|
||||||
--enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
|
export CPPFLAGS="-I/usr/pkg/include"
|
||||||
--localstatedir=/var/run/frr \
|
./configure \
|
||||||
--enable-ospfclient=yes \
|
--sysconfdir=/usr/pkg/etc/frr \
|
||||||
--enable-ospfapi=yes \
|
--enable-exampledir=/usr/pkg/share/examples/frr \
|
||||||
--enable-multipath=64 \
|
--enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
|
||||||
--enable-user=frr \
|
--localstatedir=/var/run/frr \
|
||||||
--enable-group=frr \
|
--enable-ospfclient=yes \
|
||||||
--enable-vty-group=frrvty \
|
--enable-ospfapi=yes \
|
||||||
--enable-configfile-mask=0640 \
|
--enable-multipath=64 \
|
||||||
--enable-logfile-mask=0640 \
|
--enable-user=frr \
|
||||||
--enable-rtadv \
|
--enable-group=frr \
|
||||||
--enable-tcp-zebra \
|
--enable-vty-group=frrvty \
|
||||||
--enable-fpm \
|
--enable-configfile-mask=0640 \
|
||||||
--with-pkg-git-version \
|
--enable-logfile-mask=0640 \
|
||||||
--with-pkg-extra-version=-MyOwnFRRVersion
|
--enable-rtadv \
|
||||||
gmake
|
--enable-tcp-zebra \
|
||||||
gmake check
|
--enable-fpm \
|
||||||
sudo gmake install
|
--with-pkg-git-version \
|
||||||
|
--with-pkg-extra-version=-MyOwnFRRVersion
|
||||||
|
gmake
|
||||||
|
gmake check
|
||||||
|
sudo gmake install
|
||||||
|
|
||||||
### Create empty FRR configuration files
|
### Create empty FRR configuration files
|
||||||
sudo mkdir /var/log/frr
|
sudo mkdir /var/log/frr
|
||||||
sudo mkdir /usr/pkg/etc/frr
|
sudo mkdir /usr/pkg/etc/frr
|
||||||
sudo touch /usr/pkg/etc/frr/zebra.conf
|
sudo touch /usr/pkg/etc/frr/zebra.conf
|
||||||
sudo touch /usr/pkg/etc/frr/bgpd.conf
|
sudo touch /usr/pkg/etc/frr/bgpd.conf
|
||||||
sudo touch /usr/pkg/etc/frr/ospfd.conf
|
sudo touch /usr/pkg/etc/frr/ospfd.conf
|
||||||
sudo touch /usr/pkg/etc/frr/ospf6d.conf
|
sudo touch /usr/pkg/etc/frr/ospf6d.conf
|
||||||
sudo touch /usr/pkg/etc/frr/isisd.conf
|
sudo touch /usr/pkg/etc/frr/isisd.conf
|
||||||
sudo touch /usr/pkg/etc/frr/ripd.conf
|
sudo touch /usr/pkg/etc/frr/ripd.conf
|
||||||
sudo touch /usr/pkg/etc/frr/ripngd.conf
|
sudo touch /usr/pkg/etc/frr/ripngd.conf
|
||||||
sudo touch /usr/pkg/etc/frr/pimd.conf
|
sudo touch /usr/pkg/etc/frr/pimd.conf
|
||||||
sudo chown -R frr:frr /usr/pkg/etc/frr
|
sudo chown -R frr:frr /usr/pkg/etc/frr
|
||||||
sudo touch /usr/local/etc/frr/vtysh.conf
|
sudo touch /usr/local/etc/frr/vtysh.conf
|
||||||
sudo chown frr:frrvty /usr/pkg/etc/frr/*.conf
|
sudo chown frr:frrvty /usr/pkg/etc/frr/*.conf
|
||||||
sudo chmod 640 /usr/pkg/etc/frr/*.conf
|
sudo chmod 640 /usr/pkg/etc/frr/*.conf
|
||||||
|
|
||||||
### Enable IP & IPv6 forwarding
|
### Enable IP & IPv6 forwarding
|
||||||
|
|
||||||
Add the following lines to the end of `/etc/sysctl.conf`:
|
Add the following lines to the end of `/etc/sysctl.conf`:
|
||||||
|
|
||||||
# Routing: We need to forward packets
|
# Routing: We need to forward packets
|
||||||
net.inet.ip.forwarding=1
|
net.inet.ip.forwarding=1
|
||||||
net.inet6.ip6.forwarding=1
|
net.inet6.ip6.forwarding=1
|
||||||
|
|
||||||
**Reboot** or use `sysctl` to apply the same config to the running system
|
**Reboot** or use `sysctl` to apply the same config to the running system
|
||||||
|
|
||||||
### Install rc.d init files
|
### Install rc.d init files
|
||||||
cp pkgsrc/*.sh /etc/rc.d/
|
cp pkgsrc/*.sh /etc/rc.d/
|
||||||
chmod 555 /etc/rc.d/*.sh
|
chmod 555 /etc/rc.d/*.sh
|
||||||
|
|
||||||
### Enable FRR processes
|
### Enable FRR processes
|
||||||
(Enable the required processes only)
|
(Enable the required processes only)
|
||||||
|
|
||||||
echo "zebra=YES" >> /etc/rc.conf
|
echo "zebra=YES" >> /etc/rc.conf
|
||||||
echo "bgpd=YES" >> /etc/rc.conf
|
echo "bgpd=YES" >> /etc/rc.conf
|
||||||
echo "ospfd=YES" >> /etc/rc.conf
|
echo "ospfd=YES" >> /etc/rc.conf
|
||||||
echo "ospf6d=YES" >> /etc/rc.conf
|
echo "ospf6d=YES" >> /etc/rc.conf
|
||||||
echo "isisd=YES" >> /etc/rc.conf
|
echo "isisd=YES" >> /etc/rc.conf
|
||||||
echo "ripngd=YES" >> /etc/rc.conf
|
echo "ripngd=YES" >> /etc/rc.conf
|
||||||
echo "ripd=YES" >> /etc/rc.conf
|
echo "ripd=YES" >> /etc/rc.conf
|
||||||
echo "pimd=YES" >> /etc/rc.conf
|
echo "pimd=YES" >> /etc/rc.conf
|
||||||
|
@ -11,99 +11,100 @@ NetBSD 7 restrictions:
|
|||||||
Install required packages
|
Install required packages
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
sudo pkgin install git autoconf automake libtool gmake gawk openssl pkg-config \
|
sudo pkgin install git autoconf automake libtool gmake gawk openssl \
|
||||||
json-c p5-XML-LibXML python27 py27-test
|
pkg-config json-c p5-XML-LibXML python27 py27-test
|
||||||
|
|
||||||
Install SSL Root Certificates (for git https access):
|
Install SSL Root Certificates (for git https access):
|
||||||
|
|
||||||
sudo pkgin install mozilla-rootcerts
|
sudo pkgin install mozilla-rootcerts
|
||||||
sudo touch /etc/openssl/openssl.cnf
|
sudo touch /etc/openssl/openssl.cnf
|
||||||
sudo mozilla-rootcerts install
|
sudo mozilla-rootcerts install
|
||||||
|
|
||||||
Select default Python and py.test
|
Select default Python and py.test
|
||||||
|
|
||||||
sudo ln -s /usr/pkg/bin/python2.7 /usr/bin/python
|
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
|
sudo ln -s /usr/pkg/bin/py.test-2.7 /usr/bin/py.test
|
||||||
|
|
||||||
Get FRR, compile it and install it (from Git)
|
Get FRR, compile it and install it (from Git)
|
||||||
------------------------------------------------
|
------------------------------------------------
|
||||||
|
|
||||||
### Add frr groups and user
|
### Add frr groups and user
|
||||||
|
|
||||||
sudo groupadd -g 92 frr
|
sudo groupadd -g 92 frr
|
||||||
sudo groupadd -g 93 frrvty
|
sudo groupadd -g 93 frrvty
|
||||||
sudo useradd -g 92 -u 92 -G frrvty -c "FRR suite" \
|
sudo useradd -g 92 -u 92 -G frrvty -c "FRR suite" \
|
||||||
-d /nonexistent -s /sbin/nologin frr
|
-d /nonexistent -s /sbin/nologin frr
|
||||||
|
|
||||||
### Download Source, configure and compile it
|
### Download Source, configure and compile it
|
||||||
(You may prefer different options on configure statement. These are just an example)
|
(You may prefer different options on configure statement. These are just
|
||||||
|
an example)
|
||||||
|
|
||||||
git clone https://github.com/freerangerouting/frr.git frr
|
git clone https://github.com/freerangerouting/frr.git frr
|
||||||
cd frr
|
cd frr
|
||||||
git checkout stable/2.0
|
git checkout stable/2.0
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
MAKE=gmake
|
MAKE=gmake
|
||||||
export LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib"
|
export LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib"
|
||||||
export CPPFLAGS="-I/usr/pkg/include"
|
export CPPFLAGS="-I/usr/pkg/include"
|
||||||
./configure \
|
./configure \
|
||||||
--sysconfdir=/usr/pkg/etc/frr \
|
--sysconfdir=/usr/pkg/etc/frr \
|
||||||
--enable-exampledir=/usr/pkg/share/examples/frr \
|
--enable-exampledir=/usr/pkg/share/examples/frr \
|
||||||
--enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
|
--enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
|
||||||
--localstatedir=/var/run/frr \
|
--localstatedir=/var/run/frr \
|
||||||
--enable-ospfclient=yes \
|
--enable-ospfclient=yes \
|
||||||
--enable-ospfapi=yes \
|
--enable-ospfapi=yes \
|
||||||
--enable-multipath=64 \
|
--enable-multipath=64 \
|
||||||
--enable-user=frr \
|
--enable-user=frr \
|
||||||
--enable-group=frr \
|
--enable-group=frr \
|
||||||
--enable-vty-group=frrvty \
|
--enable-vty-group=frrvty \
|
||||||
--enable-configfile-mask=0640 \
|
--enable-configfile-mask=0640 \
|
||||||
--enable-logfile-mask=0640 \
|
--enable-logfile-mask=0640 \
|
||||||
--enable-rtadv \
|
--enable-rtadv \
|
||||||
--enable-tcp-zebra \
|
--enable-tcp-zebra \
|
||||||
--enable-fpm \
|
--enable-fpm \
|
||||||
--with-pkg-git-version \
|
--with-pkg-git-version \
|
||||||
--with-pkg-extra-version=-MyOwnFRRVersion
|
--with-pkg-extra-version=-MyOwnFRRVersion
|
||||||
gmake
|
gmake
|
||||||
gmake check
|
gmake check
|
||||||
sudo gmake install
|
sudo gmake install
|
||||||
|
|
||||||
### Create empty FRR configuration files
|
### Create empty FRR configuration files
|
||||||
sudo mkdir /usr/pkg/etc/frr
|
sudo mkdir /usr/pkg/etc/frr
|
||||||
sudo touch /usr/pkg/etc/frr/zebra.conf
|
sudo touch /usr/pkg/etc/frr/zebra.conf
|
||||||
sudo touch /usr/pkg/etc/frr/bgpd.conf
|
sudo touch /usr/pkg/etc/frr/bgpd.conf
|
||||||
sudo touch /usr/pkg/etc/frr/ospfd.conf
|
sudo touch /usr/pkg/etc/frr/ospfd.conf
|
||||||
sudo touch /usr/pkg/etc/frr/ospf6d.conf
|
sudo touch /usr/pkg/etc/frr/ospf6d.conf
|
||||||
sudo touch /usr/pkg/etc/frr/isisd.conf
|
sudo touch /usr/pkg/etc/frr/isisd.conf
|
||||||
sudo touch /usr/pkg/etc/frr/ripd.conf
|
sudo touch /usr/pkg/etc/frr/ripd.conf
|
||||||
sudo touch /usr/pkg/etc/frr/ripngd.conf
|
sudo touch /usr/pkg/etc/frr/ripngd.conf
|
||||||
sudo touch /usr/pkg/etc/frr/pimd.conf
|
sudo touch /usr/pkg/etc/frr/pimd.conf
|
||||||
sudo chown -R frr:frr /usr/pkg/etc/frr
|
sudo chown -R frr:frr /usr/pkg/etc/frr
|
||||||
sudo touch /usr/local/etc/frr/vtysh.conf
|
sudo touch /usr/local/etc/frr/vtysh.conf
|
||||||
sudo chown frr:frrvty /usr/pkg/etc/frr/*.conf
|
sudo chown frr:frrvty /usr/pkg/etc/frr/*.conf
|
||||||
sudo chmod 640 /usr/pkg/etc/frr/*.conf
|
sudo chmod 640 /usr/pkg/etc/frr/*.conf
|
||||||
|
|
||||||
### Enable IP & IPv6 forwarding
|
### Enable IP & IPv6 forwarding
|
||||||
|
|
||||||
Add the following lines to the end of `/etc/sysctl.conf`:
|
Add the following lines to the end of `/etc/sysctl.conf`:
|
||||||
|
|
||||||
# Routing: We need to forward packets
|
# Routing: We need to forward packets
|
||||||
net.inet.ip.forwarding=1
|
net.inet.ip.forwarding=1
|
||||||
net.inet6.ip6.forwarding=1
|
net.inet6.ip6.forwarding=1
|
||||||
|
|
||||||
**Reboot** or use `sysctl` to apply the same config to the running system
|
**Reboot** or use `sysctl` to apply the same config to the running system
|
||||||
|
|
||||||
### Install rc.d init files
|
### Install rc.d init files
|
||||||
cp pkgsrc/*.sh /etc/rc.d/
|
cp pkgsrc/*.sh /etc/rc.d/
|
||||||
chmod 555 /etc/rc.d/*.sh
|
chmod 555 /etc/rc.d/*.sh
|
||||||
|
|
||||||
### Enable FRR processes
|
### Enable FRR processes
|
||||||
(Enable the required processes only)
|
(Enable the required processes only)
|
||||||
|
|
||||||
echo "zebra=YES" >> /etc/rc.conf
|
echo "zebra=YES" >> /etc/rc.conf
|
||||||
echo "bgpd=YES" >> /etc/rc.conf
|
echo "bgpd=YES" >> /etc/rc.conf
|
||||||
echo "ospfd=YES" >> /etc/rc.conf
|
echo "ospfd=YES" >> /etc/rc.conf
|
||||||
echo "ospf6d=YES" >> /etc/rc.conf
|
echo "ospf6d=YES" >> /etc/rc.conf
|
||||||
echo "isisd=YES" >> /etc/rc.conf
|
echo "isisd=YES" >> /etc/rc.conf
|
||||||
echo "ripngd=YES" >> /etc/rc.conf
|
echo "ripngd=YES" >> /etc/rc.conf
|
||||||
echo "ripd=YES" >> /etc/rc.conf
|
echo "ripd=YES" >> /etc/rc.conf
|
||||||
echo "pimd=YES" >> /etc/rc.conf
|
echo "pimd=YES" >> /etc/rc.conf
|
||||||
|
@ -4,117 +4,121 @@ Building FRR on OmniOS (OpenSolaris) from Git Source
|
|||||||
OmniOS restrictions:
|
OmniOS restrictions:
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
- MPLS is not supported on `OmniOS` or `Solaris`. MPLS requires a Linux Kernel
|
- MPLS is not supported on `OmniOS` or `Solaris`. MPLS requires a Linux
|
||||||
(4.5 or higher). LDP can be built, but may have limited use without MPLS
|
Kernel (4.5 or higher). LDP can be built, but may have limited use
|
||||||
|
without MPLS
|
||||||
|
|
||||||
### Enable IP & IPv6 forwarding
|
### Enable IP & IPv6 forwarding
|
||||||
|
|
||||||
routeadm -e ipv4-forwarding
|
routeadm -e ipv4-forwarding
|
||||||
routeadm -e ipv6-forwarding
|
routeadm -e ipv6-forwarding
|
||||||
|
|
||||||
Install required packages
|
Install required packages
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
Add packages:
|
Add packages:
|
||||||
|
|
||||||
pkg install \
|
pkg install \
|
||||||
developer/build/autoconf \
|
developer/build/autoconf \
|
||||||
developer/build/automake \
|
developer/build/automake \
|
||||||
developer/lexer/flex \
|
developer/lexer/flex \
|
||||||
developer/parser/bison \
|
developer/parser/bison \
|
||||||
developer/object-file \
|
developer/object-file \
|
||||||
developer/linker \
|
developer/linker \
|
||||||
developer/library/lint \
|
developer/library/lint \
|
||||||
developer/build/gnu-make \
|
developer/build/gnu-make \
|
||||||
developer/gcc51 \
|
developer/gcc51 \
|
||||||
library/idnkit \
|
library/idnkit \
|
||||||
library/idnkit/header-idnkit \
|
library/idnkit/header-idnkit \
|
||||||
system/header \
|
system/header \
|
||||||
system/library/math/header-math \
|
system/library/math/header-math \
|
||||||
git libtool gawk pkg-config
|
git libtool gawk pkg-config
|
||||||
|
|
||||||
Add additional Solaris packages:
|
Add additional Solaris packages:
|
||||||
|
|
||||||
pkgadd -d http://get.opencsw.org/now
|
pkgadd -d http://get.opencsw.org/now
|
||||||
/opt/csw/bin/pkgutil -U
|
/opt/csw/bin/pkgutil -U
|
||||||
/opt/csw/bin/pkgutil -y -i texinfo
|
/opt/csw/bin/pkgutil -y -i texinfo
|
||||||
/opt/csw/bin/pkgutil -y -i perl
|
/opt/csw/bin/pkgutil -y -i perl
|
||||||
/opt/csw/bin/pkgutil -y -i libjson_c_dev
|
/opt/csw/bin/pkgutil -y -i libjson_c_dev
|
||||||
/opt/csw/bin/pkgutil -y -i python27 py_pip
|
/opt/csw/bin/pkgutil -y -i python27 py_pip
|
||||||
|
|
||||||
Add libjson to Solaris equivalent of ld.so.conf
|
Add libjson to Solaris equivalent of ld.so.conf
|
||||||
|
|
||||||
crle -l /opt/csw/lib -u
|
crle -l /opt/csw/lib -u
|
||||||
|
|
||||||
Add Perl packages:
|
Add Perl packages:
|
||||||
|
|
||||||
cpan
|
cpan
|
||||||
cpan[1]> install XML::LibXML
|
cpan[1]> install XML::LibXML
|
||||||
cpan[2]> exit
|
cpan[2]> exit
|
||||||
|
|
||||||
Add pytest:
|
Add pytest:
|
||||||
|
|
||||||
pip install pytest
|
pip install pytest
|
||||||
|
|
||||||
Select Python 2.7 as default (required for pytest)
|
Select Python 2.7 as default (required for pytest)
|
||||||
|
|
||||||
rm -f /usr/bin/python
|
rm -f /usr/bin/python
|
||||||
ln -s /opt/csw/bin/python2.7 /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:
|
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
|
||||||
|
|
||||||
PATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/opt/csw/bin
|
|
||||||
|
|
||||||
Edit `~/.profile` and add the following default PATH:
|
Edit `~/.profile` and add the following default PATH:
|
||||||
|
|
||||||
PATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/opt/csw/bin
|
PATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/opt/csw/bin
|
||||||
|
|
||||||
Get FRR, compile it and install it (from Git)
|
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**
|
**This assumes you want to build and install FRR from source and not using
|
||||||
|
any packages**
|
||||||
|
|
||||||
### Add frr group and user
|
### Add frr group and user
|
||||||
|
|
||||||
sudo groupadd -g 93 frr
|
sudo groupadd -g 93 frr
|
||||||
sudo groupadd -g 94 frrvty
|
sudo groupadd -g 94 frrvty
|
||||||
sudo useradd -g 93 -u 93 -G frrvty -c "FRR suite" \
|
sudo useradd -g 93 -u 93 -G frrvty -c "FRR suite" \
|
||||||
-d /nonexistent -s /bin/false frr
|
-d /nonexistent -s /bin/false frr
|
||||||
|
|
||||||
(You may prefer different options on configure statement. These are just an example)
|
(You may prefer different options on configure statement. These are just
|
||||||
|
an example)
|
||||||
|
|
||||||
git clone https://github.com/freerangerouting/frr.git frr
|
git clone https://github.com/freerangerouting/frr.git frr
|
||||||
cd frr
|
cd frr
|
||||||
git checkout stable/2.0
|
git checkout stable/2.0
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
export MAKE=gmake
|
export MAKE=gmake
|
||||||
export LDFLAGS="-L/opt/csw/lib"
|
export LDFLAGS="-L/opt/csw/lib"
|
||||||
export CPPFLAGS="-I/opt/csw/include"
|
export CPPFLAGS="-I/opt/csw/include"
|
||||||
./configure \
|
./configure \
|
||||||
--sysconfdir=/etc/frr \
|
--sysconfdir=/etc/frr \
|
||||||
--enable-exampledir=/usr/share/doc/frr/examples/ \
|
--enable-exampledir=/usr/share/doc/frr/examples/ \
|
||||||
--localstatedir=/var/run/frr \
|
--localstatedir=/var/run/frr \
|
||||||
--sbindir=/usr/lib/frr \
|
--sbindir=/usr/lib/frr \
|
||||||
--enable-vtysh \
|
--enable-vtysh \
|
||||||
--enable-watchfrr \
|
--enable-watchfrr \
|
||||||
--enable-ospfclient=yes \
|
--enable-ospfclient=yes \
|
||||||
--enable-ospfapi=yes \
|
--enable-ospfapi=yes \
|
||||||
--enable-multipath=64 \
|
--enable-multipath=64 \
|
||||||
--enable-user=frr \
|
--enable-user=frr \
|
||||||
--enable-group=frr \
|
--enable-group=frr \
|
||||||
--enable-vty-group=frrvty \
|
--enable-vty-group=frrvty \
|
||||||
--enable-configfile-mask=0640 \
|
--enable-configfile-mask=0640 \
|
||||||
--enable-logfile-mask=0640 \
|
--enable-logfile-mask=0640 \
|
||||||
--enable-rtadv \
|
--enable-rtadv \
|
||||||
--enable-tcp-zebra \
|
--enable-tcp-zebra \
|
||||||
--enable-fpm \
|
--enable-fpm \
|
||||||
--with-pkg-git-version \
|
--with-pkg-git-version \
|
||||||
--with-pkg-extra-version=-MyOwnFRRVersion
|
--with-pkg-extra-version=-MyOwnFRRVersion
|
||||||
gmake
|
gmake
|
||||||
gmake check
|
gmake check
|
||||||
sudo gmake install
|
sudo gmake install
|
||||||
|
|
||||||
### Enable IP & IPv6 forwarding
|
### Enable IP & IPv6 forwarding
|
||||||
|
|
||||||
routeadm -e ipv4-forwarding
|
routeadm -e ipv4-forwarding
|
||||||
routeadm -e ipv6-forwarding
|
routeadm -e ipv6-forwarding
|
||||||
|
@ -12,80 +12,82 @@ Install required packages
|
|||||||
|
|
||||||
Configure PKG_PATH
|
Configure PKG_PATH
|
||||||
|
|
||||||
export PKG_PATH=http://ftp5.usa.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(machine -a)/
|
export PKG_PATH=http://ftp5.usa.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(machine -a)/
|
||||||
|
|
||||||
Add packages:
|
Add packages:
|
||||||
|
|
||||||
pkg_add git autoconf-2.69p2 automake-1.15p0 libtool
|
pkg_add git autoconf-2.69p2 automake-1.15p0 libtool
|
||||||
pkg_add gmake gawk dejagnu openssl json-c p5-XML-LibXML py-test
|
pkg_add gmake gawk dejagnu openssl json-c p5-XML-LibXML py-test
|
||||||
|
|
||||||
Select Python2.7 as default (required for pytest)
|
Select Python2.7 as default (required for pytest)
|
||||||
|
|
||||||
ln -s /usr/local/bin/python2.7 /usr/local/bin/python
|
ln -s /usr/local/bin/python2.7 /usr/local/bin/python
|
||||||
|
|
||||||
Get FRR, compile it and install it (from Git)
|
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**
|
**This assumes you want to build and install FRR from source and not using
|
||||||
|
any packages**
|
||||||
|
|
||||||
### Add frr group and user
|
### Add frr group and user
|
||||||
|
|
||||||
groupadd -g 525 _frr
|
groupadd -g 525 _frr
|
||||||
groupadd -g 526 _frrvty
|
groupadd -g 526 _frrvty
|
||||||
useradd -g 525 -u 525 -c "FRR suite" -G _frrvty \
|
useradd -g 525 -u 525 -c "FRR suite" -G _frrvty \
|
||||||
-d /nonexistent -s /sbin/nologin _frr
|
-d /nonexistent -s /sbin/nologin _frr
|
||||||
|
|
||||||
### Download Source, configure and compile it
|
### Download Source, configure and compile it
|
||||||
(You may prefer different options on configure statement. These are just an example)
|
(You may prefer different options on configure statement. These are just
|
||||||
|
an example)
|
||||||
|
|
||||||
git clone https://github.com/freerangerouting/frr.git frr
|
git clone https://github.com/freerangerouting/frr.git frr
|
||||||
cd frr
|
cd frr
|
||||||
git checkout stable/2.0
|
git checkout stable/2.0
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
export LDFLAGS="-L/usr/local/lib"
|
export LDFLAGS="-L/usr/local/lib"
|
||||||
export CPPFLAGS="-I/usr/local/include"
|
export CPPFLAGS="-I/usr/local/include"
|
||||||
./configure \
|
./configure \
|
||||||
--sysconfdir=/etc/frr \
|
--sysconfdir=/etc/frr \
|
||||||
--localstatedir=/var/frr \
|
--localstatedir=/var/frr \
|
||||||
--enable-pimd \
|
--enable-pimd \
|
||||||
--enable-ospfclient=yes \
|
--enable-ospfclient=yes \
|
||||||
--enable-ospfapi=yes \
|
--enable-ospfapi=yes \
|
||||||
--enable-multipath=64 \
|
--enable-multipath=64 \
|
||||||
--enable-user=_frr \
|
--enable-user=_frr \
|
||||||
--enable-group=_frr \
|
--enable-group=_frr \
|
||||||
--enable-vty-group=_frrvty \
|
--enable-vty-group=_frrvty \
|
||||||
--enable-configfile-mask=0640 \
|
--enable-configfile-mask=0640 \
|
||||||
--enable-logfile-mask=0640 \
|
--enable-logfile-mask=0640 \
|
||||||
--enable-rtadv \
|
--enable-rtadv \
|
||||||
--enable-tcp-zebra \
|
--enable-tcp-zebra \
|
||||||
--enable-fpm \
|
--enable-fpm \
|
||||||
--enable-ldpd \
|
--enable-ldpd \
|
||||||
--with-pkg-git-version \
|
--with-pkg-git-version \
|
||||||
--with-pkg-extra-version=-MyOwnFRRVersion
|
--with-pkg-extra-version=-MyOwnFRRVersion
|
||||||
gmake
|
gmake
|
||||||
gmake check
|
gmake check
|
||||||
sudo gmake install
|
sudo gmake install
|
||||||
|
|
||||||
### Create empty FRR configuration files
|
### Create empty FRR configuration files
|
||||||
|
|
||||||
sudo mkdir /var/frr
|
sudo mkdir /var/frr
|
||||||
sudo chown _frr:_frr /var/frr
|
sudo chown _frr:_frr /var/frr
|
||||||
sudo chmod 755 /var/frr
|
sudo chmod 755 /var/frr
|
||||||
sudo mkdir /etc/frr
|
sudo mkdir /etc/frr
|
||||||
sudo touch /etc/frr/zebra.conf
|
sudo touch /etc/frr/zebra.conf
|
||||||
sudo touch /etc/frr/bgpd.conf
|
sudo touch /etc/frr/bgpd.conf
|
||||||
sudo touch /etc/frr/ospfd.conf
|
sudo touch /etc/frr/ospfd.conf
|
||||||
sudo touch /etc/frr/ospf6d.conf
|
sudo touch /etc/frr/ospf6d.conf
|
||||||
sudo touch /etc/frr/isisd.conf
|
sudo touch /etc/frr/isisd.conf
|
||||||
sudo touch /etc/frr/ripd.conf
|
sudo touch /etc/frr/ripd.conf
|
||||||
sudo touch /etc/frr/ripngd.conf
|
sudo touch /etc/frr/ripngd.conf
|
||||||
sudo touch /etc/frr/pimd.conf
|
sudo touch /etc/frr/pimd.conf
|
||||||
sudo touch /etc/frr/ldpd.conf
|
sudo touch /etc/frr/ldpd.conf
|
||||||
sudo chown -R _frr:_frr /etc/frr
|
sudo chown -R _frr:_frr /etc/frr
|
||||||
sudo touch /etc/frr/vtysh.conf
|
sudo touch /etc/frr/vtysh.conf
|
||||||
sudo chown -R _frr:_frrvty /etc/frr/vtysh.conf
|
sudo chown -R _frr:_frrvty /etc/frr/vtysh.conf
|
||||||
sudo chmod 750 /etc/frr
|
sudo chmod 750 /etc/frr
|
||||||
sudo chmod 640 /etc/frr/*.conf
|
sudo chmod 640 /etc/frr/*.conf
|
||||||
|
|
||||||
### Enable IP & IPv6 forwarding
|
### Enable IP & IPv6 forwarding
|
||||||
|
|
||||||
@ -98,29 +100,30 @@ Add the following lines to the end of `/etc/rc.conf`:
|
|||||||
**Reboot** to apply the config to the system
|
**Reboot** to apply the config to the system
|
||||||
|
|
||||||
### Install rc.d init files
|
### Install rc.d init files
|
||||||
(create them in /etc/rc.d - no example are included at this time with FRR source)
|
(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`)
|
Example (for zebra - store as `/etc/rc.d/frr_zebra.sh`)
|
||||||
|
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# $OpenBSD: frr_zebra.rc,v 1.1 2013/04/18 20:29:08 sthen Exp $
|
# $OpenBSD: frr_zebra.rc,v 1.1 2013/04/18 20:29:08 sthen Exp $
|
||||||
|
|
||||||
daemon="/usr/local/sbin/zebra -d"
|
daemon="/usr/local/sbin/zebra -d"
|
||||||
|
|
||||||
. /etc/rc.d/rc.subr
|
. /etc/rc.d/rc.subr
|
||||||
|
|
||||||
rc_cmd $1
|
rc_cmd $1
|
||||||
|
|
||||||
### Enable FRR processes
|
### Enable FRR processes
|
||||||
(Enable the required processes only)
|
(Enable the required processes only)
|
||||||
|
|
||||||
echo "frr_zebra=YES" >> /etc/rc.conf
|
echo "frr_zebra=YES" >> /etc/rc.conf
|
||||||
echo "frr_bgpd=YES" >> /etc/rc.conf
|
echo "frr_bgpd=YES" >> /etc/rc.conf
|
||||||
echo "frr_ospfd=YES" >> /etc/rc.conf
|
echo "frr_ospfd=YES" >> /etc/rc.conf
|
||||||
echo "frr_ospf6d=YES" >> /etc/rc.conf
|
echo "frr_ospf6d=YES" >> /etc/rc.conf
|
||||||
echo "frr_isisd=YES" >> /etc/rc.conf
|
echo "frr_isisd=YES" >> /etc/rc.conf
|
||||||
echo "frr_ripngd=YES" >> /etc/rc.conf
|
echo "frr_ripngd=YES" >> /etc/rc.conf
|
||||||
echo "frr_ripd=YES" >> /etc/rc.conf
|
echo "frr_ripd=YES" >> /etc/rc.conf
|
||||||
echo "frr_pimd=YES" >> /etc/rc.conf
|
echo "frr_pimd=YES" >> /etc/rc.conf
|
||||||
echo "frr_ldpd=YES" >> /etc/rc.conf
|
echo "frr_ldpd=YES" >> /etc/rc.conf
|
||||||
|
@ -8,121 +8,125 @@ Building FRR on Ubuntu 12.04LTS from Git Source
|
|||||||
|
|
||||||
Install required packages
|
Install required packages
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
Add packages:
|
Add packages:
|
||||||
|
|
||||||
apt-get install git autoconf automake libtool make gawk libreadline-dev texinfo \
|
apt-get install git autoconf automake libtool make gawk libreadline-dev \
|
||||||
libpam0g-dev dejagnu libjson0 pkg-config libpam0g-dev libjson0-dev flex \
|
texinfo libpam0g-dev dejagnu libjson0 pkg-config libpam0g-dev \
|
||||||
python-pytest
|
libjson0-dev flex python-pytest
|
||||||
|
|
||||||
Install newer bison from 14.04 package source (Ubuntu 12.04 package source is too old)
|
Install newer bison from 14.04 package source (Ubuntu 12.04 package source
|
||||||
|
is too old)
|
||||||
|
|
||||||
mkdir builddir
|
mkdir builddir
|
||||||
cd 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-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.orig.tar.bz2
|
||||||
wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg-2.debian.tar.gz
|
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
|
tar -jxvf bison_3.0.2.dfsg.orig.tar.bz2
|
||||||
cd bison-3.0.2.dfsg/
|
cd bison-3.0.2.dfsg/
|
||||||
tar xzf ../bison_3.0.2.dfsg-2.debian.tar.gz
|
tar xzf ../bison_3.0.2.dfsg-2.debian.tar.gz
|
||||||
sudo apt-get build-dep bison
|
sudo apt-get build-dep bison
|
||||||
debuild -b -uc -us
|
debuild -b -uc -us
|
||||||
cd ..
|
cd ..
|
||||||
sudo dpkg -i ./libbison-dev_3.0.2.dfsg-2_amd64.deb ./bison_3.0.2.dfsg-2_amd64.deb
|
sudo dpkg -i ./libbison-dev_3.0.2.dfsg-2_amd64.deb ./bison_3.0.2.dfsg-2_amd64.deb
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf builddir
|
rm -rf builddir
|
||||||
|
|
||||||
Install newer version of autoconf and automake:
|
Install newer version of autoconf and automake:
|
||||||
|
|
||||||
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
|
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
|
||||||
tar xvf autoconf-2.69.tar.gz
|
tar xvf autoconf-2.69.tar.gz
|
||||||
cd autoconf-2.69
|
cd autoconf-2.69
|
||||||
./configure --prefix=/usr
|
./configure --prefix=/usr
|
||||||
make
|
make
|
||||||
sudo make install
|
sudo make install
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
wget http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
|
wget http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
|
||||||
tar xvf automake-1.15.tar.gz
|
tar xvf automake-1.15.tar.gz
|
||||||
cd automake-1.15
|
cd automake-1.15
|
||||||
./configure --prefix=/usr
|
./configure --prefix=/usr
|
||||||
make
|
make
|
||||||
sudo make install
|
sudo make install
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
Get FRR, compile it and install it (from Git)
|
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**
|
**This assumes you want to build and install FRR from source and not using
|
||||||
|
any packages**
|
||||||
|
|
||||||
### Add frr groups and user
|
### Add frr groups and user
|
||||||
|
|
||||||
sudo groupadd -g 92 frr
|
sudo groupadd -g 92 frr
|
||||||
sudo groupadd -r -g 85 frrvty
|
sudo groupadd -r -g 85 frrvty
|
||||||
sudo adduser --system --ingroup frr --groups frrvty --home /var/run/frr/ \
|
sudo adduser --system --ingroup frr --groups frrvty --home /var/run/frr/ \
|
||||||
--gecos "FRR suite" --shell /sbin/nologin frr
|
--gecos "FRR suite" --shell /sbin/nologin frr
|
||||||
|
|
||||||
### Download Source, configure and compile it
|
### Download Source, configure and compile it
|
||||||
(You may prefer different options on configure statement. These are just an example.)
|
(You may prefer different options on configure statement. These are just
|
||||||
|
an example.)
|
||||||
|
|
||||||
git clone https://github.com/freerangerouting/frr.git frr
|
git clone https://github.com/freerangerouting/frr.git frr
|
||||||
cd frr
|
cd frr
|
||||||
git checkout stable/2.0
|
git checkout stable/2.0
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
./configure \
|
./configure \
|
||||||
--enable-exampledir=/usr/share/doc/frr/examples/ \
|
--enable-exampledir=/usr/share/doc/frr/examples/ \
|
||||||
--localstatedir=/var/run/frr \
|
--localstatedir=/var/run/frr \
|
||||||
--sbindir=/usr/lib/frr \
|
--sbindir=/usr/lib/frr \
|
||||||
--sysconfdir=/etc/frr \
|
--sysconfdir=/etc/frr \
|
||||||
--enable-pimd \
|
--enable-pimd \
|
||||||
--enable-watchfrr \
|
--enable-watchfrr \
|
||||||
--enable-ospfclient=yes \
|
--enable-ospfclient=yes \
|
||||||
--enable-ospfapi=yes \
|
--enable-ospfapi=yes \
|
||||||
--enable-multipath=64 \
|
--enable-multipath=64 \
|
||||||
--enable-user=frr \
|
--enable-user=frr \
|
||||||
--enable-group=frr \
|
--enable-group=frr \
|
||||||
--enable-vty-group=frrvty \
|
--enable-vty-group=frrvty \
|
||||||
--enable-configfile-mask=0640 \
|
--enable-configfile-mask=0640 \
|
||||||
--enable-logfile-mask=0640 \
|
--enable-logfile-mask=0640 \
|
||||||
--enable-rtadv \
|
--enable-rtadv \
|
||||||
--enable-tcp-zebra \
|
--enable-tcp-zebra \
|
||||||
--enable-fpm \
|
--enable-fpm \
|
||||||
--enable-ldpd \
|
--enable-ldpd \
|
||||||
--with-pkg-git-version \
|
--with-pkg-git-version \
|
||||||
--with-pkg-extra-version=-MyOwnFRRVersion
|
--with-pkg-extra-version=-MyOwnFRRVersion
|
||||||
make
|
make
|
||||||
make check
|
make check
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
### Create empty FRR configuration files
|
### Create empty FRR configuration files
|
||||||
|
|
||||||
sudo mkdir /var/log/frr
|
sudo mkdir /var/log/frr
|
||||||
sudo chown frr:fee /var/log/frr
|
sudo chown frr:fee /var/log/frr
|
||||||
sudo mkdir /etc/frr
|
sudo mkdir /etc/frr
|
||||||
sudo touch /etc/frr/etc/zebra.conf
|
sudo touch /etc/frr/etc/zebra.conf
|
||||||
sudo touch /etc/frr/etc/bgpd.conf
|
sudo touch /etc/frr/etc/bgpd.conf
|
||||||
sudo touch /etc/frr/etc/ospfd.conf
|
sudo touch /etc/frr/etc/ospfd.conf
|
||||||
sudo touch /etc/frr/etc/ospf6d.conf
|
sudo touch /etc/frr/etc/ospf6d.conf
|
||||||
sudo touch /etc/frr/etc/isisd.conf
|
sudo touch /etc/frr/etc/isisd.conf
|
||||||
sudo touch /etc/frr/etc/ripd.conf
|
sudo touch /etc/frr/etc/ripd.conf
|
||||||
sudo touch /etc/frr/etc/ripngd.conf
|
sudo touch /etc/frr/etc/ripngd.conf
|
||||||
sudo touch /etc/frr/etc/pimd.conf
|
sudo touch /etc/frr/etc/pimd.conf
|
||||||
sudo touch /etc/frr/etc/ldpd.conf
|
sudo touch /etc/frr/etc/ldpd.conf
|
||||||
sudo chown frr:frr /etc/frr/
|
sudo chown frr:frr /etc/frr/
|
||||||
sudo touch /etc/frr/etc/vtysh.conf
|
sudo touch /etc/frr/etc/vtysh.conf
|
||||||
sudo chown frr:frrvty /etc/frr/etc/vtysh.conf
|
sudo chown frr:frrvty /etc/frr/etc/vtysh.conf
|
||||||
sudo chmod 640 /etc/frr/*.conf
|
sudo chmod 640 /etc/frr/*.conf
|
||||||
|
|
||||||
### Enable IP & IPv6 forwarding
|
### Enable IP & IPv6 forwarding
|
||||||
|
|
||||||
Edit `/etc/sysctl.conf` and uncomment the following values (ignore the other settings)
|
Edit `/etc/sysctl.conf` and uncomment the following values (ignore the
|
||||||
|
other settings)
|
||||||
|
|
||||||
# Uncomment the next line to enable packet forwarding for IPv4
|
# Uncomment the next line to enable packet forwarding for IPv4
|
||||||
net.ipv4.ip_forward=1
|
net.ipv4.ip_forward=1
|
||||||
|
|
||||||
# Uncomment the next line to enable packet forwarding for IPv6
|
# Uncomment the next line to enable packet forwarding for IPv6
|
||||||
# Enabling this option disables Stateless Address Autoconfiguration
|
# Enabling this option disables Stateless Address Autoconfiguration
|
||||||
# based on Router Advertisements for this host
|
# based on Router Advertisements for this host
|
||||||
net.ipv6.conf.all.forwarding=1
|
net.ipv6.conf.all.forwarding=1
|
||||||
|
|
||||||
**Reboot** or use `sysctl` to apply the same config to the running system
|
**Reboot** or use `sysctl` to apply the same config to the running system
|
||||||
|
@ -8,81 +8,87 @@ Building FRR on Ubuntu 14.04LTS from Git Source
|
|||||||
|
|
||||||
Install required packages
|
Install required packages
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
Add packages:
|
Add packages:
|
||||||
|
|
||||||
apt-get install git autoconf automake libtool make gawk libreadline-dev texinfo \
|
apt-get install git autoconf automake libtool make gawk libreadline-dev \
|
||||||
dejagnu pkg-config libpam0g-dev libjson-c-dev bison flex python-pytest
|
texinfo dejagnu pkg-config libpam0g-dev libjson-c-dev bison flex \
|
||||||
|
python-pytest
|
||||||
|
|
||||||
Get FRR, compile it and install it (from Git)
|
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
|
### Add frr groups and user
|
||||||
|
|
||||||
sudo groupadd -g 92 frr
|
sudo groupadd -g 92 frr
|
||||||
sudo groupadd -r -g 85 frrvty
|
sudo groupadd -r -g 85 frrvty
|
||||||
sudo adduser --system --ingroup frr --groups frrvty --home /var/run/frr/ \
|
sudo adduser --system --ingroup frr --groups frrvty --home /var/run/frr/ \
|
||||||
--gecos "FRR suite" --shell /sbin/nologin frr
|
--gecos "FRR suite" --shell /sbin/nologin frr
|
||||||
|
|
||||||
### Download Source, configure and compile it
|
### Download Source, configure and compile it
|
||||||
(You may prefer different options on configure statement. These are just an example.)
|
(You may prefer different options on configure statement. These are just
|
||||||
|
an example.)
|
||||||
|
|
||||||
git clone https://github.com/freerangerouting/frr.git frr
|
git clone https://github.com/freerangerouting/frr.git frr
|
||||||
cd frr
|
cd frr
|
||||||
git checkout stable/2.0
|
git checkout stable/2.0
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
./configure \
|
./configure \
|
||||||
--enable-exampledir=/usr/share/doc/frr/examples/ \
|
--enable-exampledir=/usr/share/doc/frr/examples/ \
|
||||||
--localstatedir=/var/run/frr \
|
--localstatedir=/var/run/frr \
|
||||||
--sbindir=/usr/lib/frr \
|
--sbindir=/usr/lib/frr \
|
||||||
--sysconfdir=/etc/frr \
|
--sysconfdir=/etc/frr \
|
||||||
--enable-pimd \
|
--enable-pimd \
|
||||||
--enable-watchfrr \
|
--enable-watchfrr \
|
||||||
--enable-ospfclient=yes \
|
--enable-ospfclient=yes \
|
||||||
--enable-ospfapi=yes \
|
--enable-ospfapi=yes \
|
||||||
--enable-multipath=64 \
|
--enable-multipath=64 \
|
||||||
--enable-user=frr \
|
--enable-user=frr \
|
||||||
--enable-group=frr \
|
--enable-group=frr \
|
||||||
--enable-vty-group=frrvty \
|
--enable-vty-group=frrvty \
|
||||||
--enable-configfile-mask=0640 \
|
--enable-configfile-mask=0640 \
|
||||||
--enable-logfile-mask=0640 \
|
--enable-logfile-mask=0640 \
|
||||||
--enable-rtadv \
|
--enable-rtadv \
|
||||||
--enable-tcp-zebra \
|
--enable-tcp-zebra \
|
||||||
--enable-fpm \
|
--enable-fpm \
|
||||||
--with-pkg-git-version \
|
--with-pkg-git-version \
|
||||||
--with-pkg-extra-version=-MyOwnFRRVersion
|
--with-pkg-extra-version=-MyOwnFRRVersion
|
||||||
make
|
make
|
||||||
make check
|
make check
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
### Create empty FRR configuration files
|
### Create empty FRR configuration files
|
||||||
|
|
||||||
sudo mkdir /var/log/frr
|
sudo mkdir /var/log/frr
|
||||||
sudo chown frr:fee /var/log/frr
|
sudo chown frr:fee /var/log/frr
|
||||||
sudo mkdir /etc/frr
|
sudo mkdir /etc/frr
|
||||||
sudo touch /etc/frr/etc/zebra.conf
|
sudo touch /etc/frr/etc/zebra.conf
|
||||||
sudo touch /etc/frr/etc/bgpd.conf
|
sudo touch /etc/frr/etc/bgpd.conf
|
||||||
sudo touch /etc/frr/etc/ospfd.conf
|
sudo touch /etc/frr/etc/ospfd.conf
|
||||||
sudo touch /etc/frr/etc/ospf6d.conf
|
sudo touch /etc/frr/etc/ospf6d.conf
|
||||||
sudo touch /etc/frr/etc/isisd.conf
|
sudo touch /etc/frr/etc/isisd.conf
|
||||||
sudo touch /etc/frr/etc/ripd.conf
|
sudo touch /etc/frr/etc/ripd.conf
|
||||||
sudo touch /etc/frr/etc/ripngd.conf
|
sudo touch /etc/frr/etc/ripngd.conf
|
||||||
sudo touch /etc/frr/etc/pimd.conf
|
sudo touch /etc/frr/etc/pimd.conf
|
||||||
sudo chown frr:frr /etc/frr/
|
sudo chown frr:frr /etc/frr/
|
||||||
sudo touch /etc/frr/etc/vtysh.conf
|
sudo touch /etc/frr/etc/vtysh.conf
|
||||||
sudo chown frr:frrvty /etc/frr/etc/vtysh.conf
|
sudo chown frr:frrvty /etc/frr/etc/vtysh.conf
|
||||||
sudo chmod 640 /etc/frr/*.conf
|
sudo chmod 640 /etc/frr/*.conf
|
||||||
|
|
||||||
### Enable IP & IPv6 forwarding
|
### Enable IP & IPv6 forwarding
|
||||||
|
|
||||||
Edit `/etc/sysctl.conf` and uncomment the following values (ignore the other settings)
|
Edit `/etc/sysctl.conf` and uncomment the following values (ignore the
|
||||||
|
other settings)
|
||||||
|
|
||||||
# Uncomment the next line to enable packet forwarding for IPv4
|
# Uncomment the next line to enable packet forwarding for IPv4
|
||||||
net.ipv4.ip_forward=1
|
net.ipv4.ip_forward=1
|
||||||
|
|
||||||
# Uncomment the next line to enable packet forwarding for IPv6
|
# Uncomment the next line to enable packet forwarding for IPv6
|
||||||
# Enabling this option disables Stateless Address Autoconfiguration
|
# Enabling this option disables Stateless Address Autoconfiguration
|
||||||
# based on Router Advertisements for this host
|
# based on Router Advertisements for this host
|
||||||
net.ipv6.conf.all.forwarding=1
|
net.ipv6.conf.all.forwarding=1
|
||||||
|
|
||||||
**Reboot** or use `sysctl` to apply the same config to the running system
|
**Reboot** or use `sysctl` to apply the same config to the running system
|
||||||
|
@ -1,111 +1,116 @@
|
|||||||
Building FRR on Ubuntu 12.04LTS from Git Source
|
Building FRR on Ubuntu 16.04LTS from Git Source
|
||||||
===============================================
|
===============================================
|
||||||
|
|
||||||
- MPLS is not supported on `Ubuntu 12.04` with default kernel. MPLS requires
|
- MPLS is not supported on `Ubuntu 16.04` with default kernel. MPLS requires
|
||||||
Linux Kernel 4.5 or higher (LDP can be built, but may have limited use
|
Linux Kernel 4.5 or higher (LDP can be built, but may have limited use
|
||||||
without MPLS)
|
without MPLS)
|
||||||
For an updated Ubuntu Kernel, see http://kernel.ubuntu.com/~kernel-ppa/mainline/
|
For an updated Ubuntu Kernel, see
|
||||||
|
http://kernel.ubuntu.com/~kernel-ppa/mainline/
|
||||||
|
|
||||||
Install required packages
|
Install required packages
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
Add packages:
|
Add packages:
|
||||||
|
|
||||||
apt-get install git autoconf automake libtool make gawk libreadline-dev texinfo \
|
apt-get install git autoconf automake libtool make gawk libreadline-dev \
|
||||||
dejagnu pkg-config libpam0g-dev libjson-c-dev bison flex python-pytest
|
texinfo dejagnu pkg-config libpam0g-dev libjson-c-dev bison flex \
|
||||||
|
python-pytest
|
||||||
|
|
||||||
Get FRR, compile it and install it (from Git)
|
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**
|
**This assumes you want to build and install FRR from source and not using
|
||||||
|
any packages**
|
||||||
|
|
||||||
### Add frr groups and user
|
### Add frr groups and user
|
||||||
|
|
||||||
sudo groupadd -g 92 frr
|
sudo groupadd -g 92 frr
|
||||||
sudo groupadd -r -g 85 frrvty
|
sudo groupadd -r -g 85 frrvty
|
||||||
sudo adduser --system --ingroup frr --groups frrvty --home /var/run/frr/ \
|
sudo adduser --system --ingroup frr --groups frrvty --home /var/run/frr/ \
|
||||||
--gecos "FRR suite" --shell /sbin/nologin frr
|
--gecos "FRR suite" --shell /sbin/nologin frr
|
||||||
|
|
||||||
### Download Source, configure and compile it
|
### Download Source, configure and compile it
|
||||||
(You may prefer different options on configure statement. These are just an example.)
|
(You may prefer different options on configure statement. These are just
|
||||||
|
an example.)
|
||||||
|
|
||||||
git clone https://github.com/freerangerouting/frr.git frr
|
git clone https://github.com/freerangerouting/frr.git frr
|
||||||
cd frr
|
cd frr
|
||||||
git checkout stable/2.0
|
git checkout stable/2.0
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
./configure \
|
./configure \
|
||||||
--enable-exampledir=/usr/share/doc/frr/examples/ \
|
--enable-exampledir=/usr/share/doc/frr/examples/ \
|
||||||
--localstatedir=/var/run/frr \
|
--localstatedir=/var/run/frr \
|
||||||
--sbindir=/usr/lib/frr \
|
--sbindir=/usr/lib/frr \
|
||||||
--sysconfdir=/etc/frr \
|
--sysconfdir=/etc/frr \
|
||||||
--enable-pimd \
|
--enable-pimd \
|
||||||
--enable-watchfrr \
|
--enable-watchfrr \
|
||||||
--enable-ospfclient=yes \
|
--enable-ospfclient=yes \
|
||||||
--enable-ospfapi=yes \
|
--enable-ospfapi=yes \
|
||||||
--enable-multipath=64 \
|
--enable-multipath=64 \
|
||||||
--enable-user=frr \
|
--enable-user=frr \
|
||||||
--enable-group=frr \
|
--enable-group=frr \
|
||||||
--enable-vty-group=frrvty \
|
--enable-vty-group=frrvty \
|
||||||
--enable-configfile-mask=0640 \
|
--enable-configfile-mask=0640 \
|
||||||
--enable-logfile-mask=0640 \
|
--enable-logfile-mask=0640 \
|
||||||
--enable-rtadv \
|
--enable-rtadv \
|
||||||
--enable-tcp-zebra \
|
--enable-tcp-zebra \
|
||||||
--enable-fpm \
|
--enable-fpm \
|
||||||
--enable-ldpd \
|
--enable-ldpd \
|
||||||
--with-pkg-git-version \
|
--with-pkg-git-version \
|
||||||
--with-pkg-extra-version=-MyOwnFRRVersion
|
--with-pkg-extra-version=-MyOwnFRRVersion
|
||||||
make
|
make
|
||||||
make check
|
make check
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
### Create empty FRR configuration files
|
### Create empty FRR configuration files
|
||||||
|
|
||||||
sudo mkdir /var/log/frr
|
sudo mkdir /var/log/frr
|
||||||
sudo chown frr:fee /var/log/frr
|
sudo chown frr:fee /var/log/frr
|
||||||
sudo mkdir /etc/frr
|
sudo mkdir /etc/frr
|
||||||
sudo touch /etc/frr/etc/zebra.conf
|
sudo touch /etc/frr/etc/zebra.conf
|
||||||
sudo touch /etc/frr/etc/bgpd.conf
|
sudo touch /etc/frr/etc/bgpd.conf
|
||||||
sudo touch /etc/frr/etc/ospfd.conf
|
sudo touch /etc/frr/etc/ospfd.conf
|
||||||
sudo touch /etc/frr/etc/ospf6d.conf
|
sudo touch /etc/frr/etc/ospf6d.conf
|
||||||
sudo touch /etc/frr/etc/isisd.conf
|
sudo touch /etc/frr/etc/isisd.conf
|
||||||
sudo touch /etc/frr/etc/ripd.conf
|
sudo touch /etc/frr/etc/ripd.conf
|
||||||
sudo touch /etc/frr/etc/ripngd.conf
|
sudo touch /etc/frr/etc/ripngd.conf
|
||||||
sudo touch /etc/frr/etc/pimd.conf
|
sudo touch /etc/frr/etc/pimd.conf
|
||||||
sudo touch /etc/frr/etc/ldpd.conf
|
sudo touch /etc/frr/etc/ldpd.conf
|
||||||
sudo chown frr:frr /etc/frr/
|
sudo chown frr:frr /etc/frr/
|
||||||
sudo touch /etc/frr/etc/vtysh.conf
|
sudo touch /etc/frr/etc/vtysh.conf
|
||||||
sudo chown frr:frrvty /etc/frr/etc/vtysh.conf
|
sudo chown frr:frrvty /etc/frr/etc/vtysh.conf
|
||||||
sudo chmod 640 /etc/frr/*.conf
|
sudo chmod 640 /etc/frr/*.conf
|
||||||
|
|
||||||
### Enable IP & IPv6 forwarding
|
### Enable IP & IPv6 forwarding
|
||||||
|
|
||||||
Edit `/etc/sysctl.conf` and uncomment the following values (ignore the other settings)
|
Edit `/etc/sysctl.conf` and uncomment the following values (ignore the
|
||||||
|
other settings)
|
||||||
|
|
||||||
# Uncomment the next line to enable packet forwarding for IPv4
|
# Uncomment the next line to enable packet forwarding for IPv4
|
||||||
net.ipv4.ip_forward=1
|
net.ipv4.ip_forward=1
|
||||||
|
|
||||||
# Uncomment the next line to enable packet forwarding for IPv6
|
# Uncomment the next line to enable packet forwarding for IPv6
|
||||||
# Enabling this option disables Stateless Address Autoconfiguration
|
# Enabling this option disables Stateless Address Autoconfiguration
|
||||||
# based on Router Advertisements for this host
|
# based on Router Advertisements for this host
|
||||||
net.ipv6.conf.all.forwarding=1
|
net.ipv6.conf.all.forwarding=1
|
||||||
|
|
||||||
### Enable MPLS Forwarding (with Linux Kernel >= 4.5)
|
### Enable MPLS Forwarding (with Linux Kernel >= 4.5)
|
||||||
|
|
||||||
Edit `/etc/sysctl.conf` and the following lines. Make sure to add a line equal to
|
Edit `/etc/sysctl.conf` and the following lines. Make sure to add a line
|
||||||
`net.mpls.conf.eth0.input` or each interface used with MPLS
|
equal to `net.mpls.conf.eth0.input` or each interface used with MPLS
|
||||||
|
|
||||||
# Enable MPLS Label processing on all interfaces
|
# Enable MPLS Label processing on all interfaces
|
||||||
net.mpls.conf.eth0.input=1
|
net.mpls.conf.eth0.input=1
|
||||||
net.mpls.conf.eth1.input=1
|
net.mpls.conf.eth1.input=1
|
||||||
net.mpls.conf.eth2.input=1
|
net.mpls.conf.eth2.input=1
|
||||||
net.mpls.platform_labels=100000
|
net.mpls.platform_labels=100000
|
||||||
|
|
||||||
### Add MPLS kernel modules
|
### Add MPLS kernel modules
|
||||||
|
|
||||||
Add the following lines to `/etc/modules-load.d/modules.conf`:
|
Add the following lines to `/etc/modules-load.d/modules.conf`:
|
||||||
|
|
||||||
# Load MPLS Kernel Modules
|
# Load MPLS Kernel Modules
|
||||||
mpls-router
|
mpls-router
|
||||||
mpls-iptunnel
|
mpls-iptunnel
|
||||||
|
|
||||||
**Reboot** or use `sysctl` to apply the same config to the running system
|
**Reboot** or use `sysctl` to apply the same config to the running system
|
||||||
|
Loading…
Reference in New Issue
Block a user