]> git.proxmox.com Git - mirror_frr.git/blob - doc/Building_FRR_on_Fedora24.md
release: FRR 3.0-rc1
[mirror_frr.git] / doc / Building_FRR_on_Fedora24.md
1 Building FRR on Fedora 24 from Git Source
2 =========================================
3
4 (As an alternative to this installation, you may prefer to create a FRR
5 rpm package yourself and install that package instead. See instructions
6 in redhat/README.rpm_build.md on how to build a rpm package)
7
8 Install required packages
9 -------------------------
10
11 Add packages:
12
13 sudo dnf install git autoconf automake libtool make gawk \
14 readline-devel texinfo net-snmp-devel groff pkgconfig \
15 json-c-devel pam-devel bison flex pytest perl-XML-LibXML \
16 c-ares-devel
17
18 Get FRR, compile it and install it (from Git)
19 ---------------------------------------------
20
21 **This assumes you want to build and install FRR from source and not
22 using any packages**
23
24 ### Add frr groups and user
25
26 sudo groupadd -g 92 frr
27 sudo groupadd -r -g 85 frrvt
28 sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \
29 -c "FRR FRRouting suite" -d /var/run/frr frr
30
31 ### Download Source, configure and compile it
32 (You may prefer different options on configure statement. These are just
33 an example.)
34
35 git clone https://github.com/frrouting/frr.git frr
36 cd frr
37 git checkout stable/3.0
38 ./bootstrap.sh
39 ./configure \
40 --bindir=/usr/bin \
41 --sbindir=/usr/lib/frr \
42 --sysconfdir=/etc/frr \
43 --libdir=/usr/lib/frr \
44 --libexecdir=/usr/lib/frr \
45 --localstatedir=/var/run/frr \
46 --with-moduledir=/usr/lib/frr/modules \
47 --enable-pimd \
48 --enable-snmp=agentx \
49 --enable-multipath=64 \
50 --enable-ospfclient=yes \
51 --enable-ospfapi=yes \
52 --enable-user=frr \
53 --enable-group=frr \
54 --enable-vty-group=frrvt \
55 --enable-rtadv \
56 --disable-exampledir \
57 --enable-watchfrr \
58 --enable-tcp-zebra \
59 --enable-ldpd \
60 --enable-fpm \
61 --enable-nhrpd \
62 --with-pkg-git-version \
63 --with-pkg-extra-version=-MyOwnFRRVersion
64 make
65 make check
66 sudo make install
67
68 ### Create empty FRR configuration files
69 sudo mkdir /var/log/frr
70 sudo mkdir /etc/frr
71 sudo touch /etc/frr/zebra.conf
72 sudo touch /etc/frr/bgpd.conf
73 sudo touch /etc/frr/ospfd.conf
74 sudo touch /etc/frr/ospf6d.conf
75 sudo touch /etc/frr/isisd.conf
76 sudo touch /etc/frr/ripd.conf
77 sudo touch /etc/frr/ripngd.conf
78 sudo touch /etc/frr/pimd.conf
79 sudo touch /etc/frr/ldpd.conf
80 sudo touch /etc/frr/nhrpd.conf
81 sudo chown -R frr:frr /etc/frr/
82 sudo touch /etc/frr/vtysh.conf
83 sudo chown frr:frrvt /etc/frr/vtysh.conf
84 sudo chmod 640 /etc/frr/*.conf
85
86 ### Install daemon config file
87 sudo install -p -m 644 redhat/daemons /etc/frr/
88 sudo chown frr:frr /etc/frr/daemons
89
90 ### Edit /etc/frr/daemons as needed to select the required daemons
91
92 Look for the section with `watchfrr_enable=...` and `zebra=...` etc.
93 Enable the daemons as required by changing the value to `yes`
94
95 ### Enable IP & IPv6 forwarding (and MPLS)
96
97 Create a new file `/etc/sysctl.d/90-routing-sysctl.conf` with the
98 following content:
99 (Please make sure to list all interfaces with required MPLS similar
100 to `net.mpls.conf.eth0.input=1`)
101
102 # Sysctl for routing
103 #
104 # Routing: We need to forward packets
105 net.ipv4.conf.all.forwarding=1
106 net.ipv6.conf.all.forwarding=1
107 #
108 # Enable MPLS Label processing on all interfaces
109 net.mpls.conf.eth0.input=1
110 net.mpls.conf.eth1.input=1
111 net.mpls.conf.eth2.input=1
112 net.mpls.platform_labels=100000
113
114 Load the modifed sysctl's on the system:
115
116 sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
117
118 Create a new file `/etc/modules-load.d/mpls.conf` with the following content:
119
120 # Load MPLS Kernel Modules
121 mpls-router
122 mpls-iptunnel
123
124 And load the kernel modules on the running system:
125
126 sudo modprobe mpls-router mpls-iptunnel
127
128 ### Install frr Service and redhat init files
129 sudo install -p -m 644 redhat/frr.service /usr/lib/systemd/system/frr.service
130 sudo install -p -m 755 redhat/frr.init /usr/lib/frr/frr
131
132 ### Enable required frr at startup
133 sudo systemctl enable frr
134
135 ### Reboot or start FRR manually
136 sudo systemctl start frr