]> git.proxmox.com Git - mirror_frr.git/blame - doc/install.texi
ospf6d: Intra-prefix LSA update after frr restart
[mirror_frr.git] / doc / install.texi
CommitLineData
76b89b4a 1@node Installation
718e3744 2@chapter Installation
3
438f5286 4@cindex How to install Frr
718e3744 5@cindex Installation
438f5286 6@cindex Installing Frr
718e3744 7@cindex Building the system
438f5286 8@cindex Making Frr
718e3744 9
76b89b4a 10There are three steps for installing the software: configuration,
718e3744 11compilation, and installation.
12
13@menu
76b89b4a 14* Configure the Software::
15* Build the Software::
16* Install the Software::
718e3744 17@end menu
18
438f5286 19The easiest way to get Frr running is to issue the following
718e3744 20commands:
21
22@example
23% configure
24% make
25% make install
26@end example
27
76b89b4a 28@node Configure the Software
718e3744 29@section Configure the Software
30
76b89b4a 31@menu
32* The Configure script and its options::
33* Least-Privilege support::
34* Linux notes::
35@end menu
36
37@node The Configure script and its options
38@subsection The Configure script and its options
39
718e3744 40@cindex Configuration options
41@cindex Options for configuring
42@cindex Build options
43@cindex Distribution configuration
44@cindex Options to @code{./configure}
45
438f5286 46Frr has an excellent configure script which automatically detects most
9b7f18cf
DL
47host configurations. There are several additional configure options to
48customize the build to include or exclude specific features and dependencies.
718e3744 49
50@table @option
718e3744 51@item --disable-zebra
52Do not build zebra daemon.
53@item --disable-ripd
54Do not build ripd.
55@item --disable-ripngd
56Do not build ripngd.
57@item --disable-ospfd
58Do not build ospfd.
59@item --disable-ospf6d
60Do not build ospf6d.
61@item --disable-bgpd
62Do not build bgpd.
63@item --disable-bgp-announce
64Make @command{bgpd} which does not make bgp announcements at all. This
65feature is good for using @command{bgpd} as a BGP announcement listener.
10bfc1ef
DS
66@item --enable-datacenter
67Enable system defaults to work as if in a Data Center. See defaults.h
781242bb 68for what is changed by this configure option.
718e3744 69@item --enable-snmp
70Enable SNMP support. By default, SNMP support is disabled.
971a4497 71@item --disable-ospfapi
72Disable support for OSPF-API, an API to interface directly with ospfd.
73OSPF-API is enabled if --enable-opaque-lsa is set.
74@item --disable-ospfclient
75Disable building of the example OSPF-API client.
4b547606
OD
76@item --disable-ospf-ri
77Disable support for OSPF Router Information (RFC4970 & RFC5088) this
78requires support for Opaque LSAs and Traffic Engineering.
9b7f18cf
DL
79@item --disable-isisd
80Do not build isisd.
4b547606
OD
81@item --enable-isis-topology
82Enable IS-IS topology generator.
83@item --enable-isis-te
84Enable Traffic Engineering Extension for ISIS (RFC5305)
971a4497 85@item --enable-multipath=@var{ARG}
86Enable support for Equal Cost Multipath. @var{ARG} is the maximum number
87of ECMP paths to allow, set to 0 to allow unlimited number of paths.
6347ca16
DS
88@item --enable-realms
89Enable the support of linux Realms. Convert tag values from 1-255
90into a realm value when inserting into the linux kernel. Then
91routing policy can be assigned to the realm. See the tc man page.
7d50ad44
DL
92@item --disable-rtadv
93Disable support IPV6 router advertisement in zebra.
8c99b4c1
DL
94@item --enable-gcc-rdynamic
95Pass the @command{-rdynamic} option to the linker driver. This is in most
96cases neccessary for getting usable backtraces. This option defaults to on
97if the compiler is detected as gcc, but giving an explicit enable/disable is
98suggested.
9b7f18cf 99@item --disable-backtrace
8c99b4c1
DL
100Controls backtrace support for the crash handlers. This is autodetected by
101default. Using the switch will enforce the requested behaviour, failing with
102an error if support is requested but not available. On BSD systems, this
103needs libexecinfo, while on glibc support for this is part of libc itself.
09329dbc
DS
104@item --enable-dev-build
105Turn on some options for compiling FRR within a development environment in
106mind. Specifically turn on -g3 -O0 for compiling options and add inclusion
107of grammar sandbox.
411314ed
DS
108@item --enable-fuzzing
109Turn on some compile options to allow you to run fuzzing tools
110against the system. This tools is intended as a developer
111only tool and should not be used for normal operations
718e3744 112@end table
113
114You may specify any combination of the above options to the configure
115script. By default, the executables are placed in @file{/usr/local/sbin}
116and the configuration files in @file{/usr/local/etc}. The @file{/usr/local/}
117installation prefix and other directories may be changed using the following
118options to the configuration script.
119
120@table @option
121@item --prefix=@var{prefix}
122Install architecture-independent files in @var{prefix} [/usr/local].
123@item --sysconfdir=@var{dir}
971a4497 124Look for configuration files in @var{dir} [@var{prefix}/etc]. Note
125that sample configuration files will be installed here.
126@item --localstatedir=@var{dir}
127Configure zebra to use @var{dir} for local state files, such
128as pid files and unix sockets.
718e3744 129@end table
130
76b89b4a 131@example
9b7f18cf 132% ./configure --disable-snmp
76b89b4a 133@end example
134
135This command will configure zebra and the routing daemons.
136
137@node Least-Privilege support
138@subsection Least-Privilege support
139
438f5286
DS
140@cindex Frr Least-Privileges
141@cindex Frr Privileges
76b89b4a 142
143Additionally, you may configure zebra to drop its elevated privileges
144shortly after startup and switch to another user. The configure script will
145automatically try to configure this support. There are three configure
438f5286 146options to control the behaviour of Frr daemons.
971a4497 147
148@table @option
149@item --enable-user=@var{user}
150Switch to user @var{ARG} shortly after startup, and run as user @var{ARG}
151in normal operation.
152@item --enable-group=@var{group}
153Switch real and effective group to @var{group} shortly after
154startup.
155@item --enable-vty-group=@var{group}
156Create Unix Vty sockets (for use with vtysh) with group owndership set to
157@var{group}. This allows one to create a seperate group which is
158restricted to accessing only the Vty sockets, hence allowing one to
159delegate this group to individual users, or to run vtysh setgid to
160this group.
161@end table
162
438f5286 163The default user and group which will be configured is 'frr' if no user
76b89b4a 164or group is specified. Note that this user or group requires write access to
165the local state directory (see --localstatedir) and requires at least read
166access, and write access if you wish to allow daemons to write out their
167configuration, to the configuration directory (see --sysconfdir).
971a4497 168
169On systems which have the 'libcap' capabilities manipulation library
438f5286 170(currently only linux), the frr system will retain only minimal
76b89b4a 171capabilities required, further it will only raise these capabilities for
438f5286 172brief periods. On systems without libcap, frr will run as the user
76b89b4a 173specified and only raise its uid back to uid 0 for brief periods.
971a4497 174
76b89b4a 175@node Linux notes
176@subsection Linux Notes
718e3744 177
438f5286 178@cindex Configuring Frr
718e3744 179@cindex Building on Linux boxes
180@cindex Linux configurations
181
182There are several options available only to @sc{gnu}/Linux systems:
76b89b4a 183@footnote{@sc{gnu}/Linux has very flexible kernel configuration features}. If
184you use @sc{gnu}/Linux, make sure that the current kernel configuration is
438f5286 185what you want. Frr will run with any kernel configuration but some
718e3744 186recommendations do exist.
187
188@table @var
189
190@item CONFIG_NETLINK
76b89b4a 191Kernel/User netlink socket. This is a brand new feature which enables an
192advanced interface between the Linux kernel and zebra (@pxref{Kernel Interface}).
718e3744 193
194@item CONFIG_RTNETLINK
195Routing messages.
196This makes it possible to receive netlink routing messages. If you
197specify this option, @command{zebra} can detect routing information
198updates directly from the kernel (@pxref{Kernel Interface}).
199
200@item CONFIG_IP_MULTICAST
201IP: multicasting.
76b89b4a 202This option should be specified when you use @command{ripd} (@pxref{RIP}) or
203@command{ospfd} (@pxref{OSPFv2}) because these protocols use multicast.
718e3744 204
205@end table
206
207IPv6 support has been added in @sc{gnu}/Linux kernel version 2.2. If you
438f5286 208try to use the Frr IPv6 feature on a @sc{gnu}/Linux kernel, please
718e3744 209make sure the following libraries have been installed. Please note that
210these libraries will not be needed when you uses @sc{gnu} C library 2.1
211or upper.
212
213@table @code
214
215@item inet6-apps
216The @code{inet6-apps} package includes basic IPv6 related libraries such
217as @code{inet_ntop} and @code{inet_pton}. Some basic IPv6 programs such
218as @command{ping}, @command{ftp}, and @command{inetd} are also
219included. The @code{inet-apps} can be found at
76b89b4a 220@uref{ftp://ftp.inner.net/pub/ipv6/}.
718e3744 221
222@item net-tools
223The @code{net-tools} package provides an IPv6 enabled interface and
224routing utility. It contains @command{ifconfig}, @command{route},
225@command{netstat}, and other tools. @code{net-tools} may be found at
76b89b4a 226@uref{http://www.tazenda.demon.co.uk/phil/net-tools/}.
718e3744 227
228@end table
229@c A - end of footnote
718e3744 230
76b89b4a 231@node Build the Software
718e3744 232@section Build the Software
233
234After configuring the software, you will need to compile it for your
235system. Simply issue the command @command{make} in the root of the source
fab7c726
DS
236directory and the software will be compiled. Cliff Note versions of
237different compilation examples can be found in the doc/Building_FRR_on_XXX.md
238files. If you have *any* problems at this stage, be certain to send a
239bug report @xref{Bug Reports}.
718e3744 240
241@example
fab7c726
DS
242% ./bootstrap.sh
243% ./configure <appropriate to your system>
718e3744 244% make
245@end example
246@c A - End of node, Building the Software
247
248
76b89b4a 249@node Install the Software
718e3744 250@comment node-name, next, previous, up
251@section Install the Software
252
253Installing the software to your system consists of copying the compiled
254programs and supporting files to a standard location. After the
255installation process has completed, these files have been copied
256from your work directory to @file{/usr/local/bin}, and @file{/usr/local/etc}.
257
438f5286 258To install the Frr suite, issue the following command at your shell
718e3744 259prompt: @command{make install}.
260
261@example
262%
263% make install
264%
265@end example
266
438f5286 267Frr daemons have their own terminal interface or VTY. After
718e3744 268installation, you have to setup each beast's port number to connect to
269them. Please add the following entries to @file{/etc/services}.
270
271@example
272zebrasrv 2600/tcp # zebra service
273zebra 2601/tcp # zebra vty
274ripd 2602/tcp # RIPd vty
275ripngd 2603/tcp # RIPngd vty
276ospfd 2604/tcp # OSPFd vty
277bgpd 2605/tcp # BGPd vty
278ospf6d 2606/tcp # OSPF6d vty
5a514b14 279ospfapi 2607/tcp # ospfapi
280isisd 2608/tcp # ISISd vty
caba6093 281nhrpd 2610/tcp # nhrpd vty
12e41d03 282pimd 2611/tcp # PIMd vty
718e3744 283@end example
284
285If you use a FreeBSD newer than 2.2.8, the above entries are already
286added to @file{/etc/services} so there is no need to add it. If you
287specify a port number when starting the daemon, these entries may not be
288needed.
289
290You may need to make changes to the config files in
291@file{@value{INSTALL_PREFIX_ETC}/*.conf}. @xref{Config Commands}.