]>
Commit | Line | Data |
---|---|---|
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 perl-XML-LibXML pytest bison flex \ | |
16 | c-ares-devel python3-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 | ./bootstrap.sh | |
38 | ./configure \ | |
39 | --bindir=/usr/bin \ | |
40 | --sbindir=/usr/lib/frr \ | |
41 | --sysconfdir=/etc/frr \ | |
42 | --libdir=/usr/lib/frr \ | |
43 | --libexecdir=/usr/lib/frr \ | |
44 | --localstatedir=/var/run/frr \ | |
45 | --with-moduledir=/usr/lib/frr/modules \ | |
46 | --enable-pimd \ | |
47 | --enable-snmp=agentx \ | |
48 | --enable-multipath=64 \ | |
49 | --enable-ospfclient=yes \ | |
50 | --enable-ospfapi=yes \ | |
51 | --enable-user=frr \ | |
52 | --enable-group=frr \ | |
53 | --enable-vty-group=frrvt \ | |
54 | --enable-rtadv \ | |
55 | --disable-exampledir \ | |
56 | --enable-watchfrr \ | |
57 | --enable-ldpd \ | |
58 | --enable-fpm \ | |
59 | --enable-nhrpd \ | |
60 | --enable-eigrpd \ | |
61 | --enable-babeld \ | |
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 touch /etc/frr/eigrpd.conf | |
82 | sudo touch /etc/frr/babeld.conf | |
83 | sudo chown -R frr:frr /etc/frr/ | |
84 | sudo touch /etc/frr/vtysh.conf | |
85 | sudo chown frr:frrvt /etc/frr/vtysh.conf | |
86 | sudo chmod 640 /etc/frr/*.conf | |
87 | ||
88 | ### Install daemon config file | |
89 | sudo install -p -m 644 redhat/daemons /etc/frr/ | |
90 | sudo chown frr:frr /etc/frr/daemons | |
91 | ||
92 | ### Edit /etc/frr/daemons as needed to select the required daemons | |
93 | ||
94 | Look for the section with `watchfrr_enable=...` and `zebra=...` etc. | |
95 | Enable the daemons as required by changing the value to `yes` | |
96 | ||
97 | ### Enable IP & IPv6 forwarding (and MPLS) | |
98 | ||
99 | Create a new file `/etc/sysctl.d/90-routing-sysctl.conf` with the | |
100 | following content: | |
101 | (Please make sure to list all interfaces with required MPLS similar | |
102 | to `net.mpls.conf.eth0.input=1`) | |
103 | ||
104 | # Sysctl for routing | |
105 | # | |
106 | # Routing: We need to forward packets | |
107 | net.ipv4.conf.all.forwarding=1 | |
108 | net.ipv6.conf.all.forwarding=1 | |
109 | # | |
110 | # Enable MPLS Label processing on all interfaces | |
111 | net.mpls.conf.eth0.input=1 | |
112 | net.mpls.conf.eth1.input=1 | |
113 | net.mpls.conf.eth2.input=1 | |
114 | net.mpls.platform_labels=100000 | |
115 | ||
116 | Load the modifed sysctl's on the system: | |
117 | ||
118 | sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf | |
119 | ||
120 | Create a new file `/etc/modules-load.d/mpls.conf` with the following content: | |
121 | ||
122 | # Load MPLS Kernel Modules | |
123 | mpls-router | |
124 | mpls-iptunnel | |
125 | ||
126 | And load the kernel modules on the running system: | |
127 | ||
128 | sudo modprobe mpls-router mpls-iptunnel | |
129 | ||
130 | ### Install frr Service and redhat init files | |
131 | sudo install -p -m 644 redhat/frr.service /usr/lib/systemd/system/frr.service | |
132 | sudo install -p -m 755 redhat/frr.init /usr/lib/frr/frr | |
133 | ||
134 | ### Enable required frr at startup | |
135 | sudo systemctl enable frr | |
136 | ||
137 | ### Reboot or start FRR manually | |
138 | sudo systemctl start frr |