]>
Commit | Line | Data |
---|---|---|
717b4866 QY |
1 | .. _basic-setup: |
2 | ||
3 | Basic Setup | |
4 | ============ | |
5 | ||
6 | After installing FRR, some basic configuration must be completed before it is | |
7 | ready to use. | |
8 | ||
610b5328 DS |
9 | Daemons Configuration File |
10 | -------------------------- | |
717b4866 QY |
11 | After a fresh install, starting FRR will do nothing. This is because daemons |
12 | must be explicitly enabled by editing a file in your configuration directory. | |
13 | This file is usually located at :file:`/etc/frr/daemons` and determines which | |
14 | daemons are activated when issuing a service start / stop command via init or | |
15 | systemd. The file initially looks like this: | |
16 | ||
17 | :: | |
18 | ||
19 | zebra=no | |
20 | bgpd=no | |
21 | ospfd=no | |
22 | ospf6d=no | |
23 | ripd=no | |
24 | ripngd=no | |
25 | isisd=no | |
26 | pimd=no | |
27 | ldpd=no | |
28 | nhrpd=no | |
29 | eigrpd=no | |
30 | babeld=no | |
31 | sharpd=no | |
614aa5c1 | 32 | staticd=no |
717b4866 | 33 | pbrd=no |
c44032c1 | 34 | bfdd=no |
f3c7b99d | 35 | fabricd=no |
717b4866 | 36 | |
717b4866 QY |
37 | # |
38 | # If this option is set the /etc/init.d/frr script automatically loads | |
39 | # the config via "vtysh -b" when the servers are started. | |
40 | # Check /etc/pam.d/frr if you intend to use "vtysh"! | |
41 | # | |
42 | vtysh_enable=yes | |
da7e1a92 | 43 | zebra_options=" -s 90000000 --daemon -A 127.0.0.1" |
717b4866 QY |
44 | bgpd_options=" --daemon -A 127.0.0.1" |
45 | ospfd_options=" --daemon -A 127.0.0.1" | |
46 | ospf6d_options=" --daemon -A ::1" | |
47 | ripd_options=" --daemon -A 127.0.0.1" | |
48 | ripngd_options=" --daemon -A ::1" | |
49 | isisd_options=" --daemon -A 127.0.0.1" | |
50 | pimd_options=" --daemon -A 127.0.0.1" | |
51 | ldpd_options=" --daemon -A 127.0.0.1" | |
52 | nhrpd_options=" --daemon -A 127.0.0.1" | |
53 | eigrpd_options=" --daemon -A 127.0.0.1" | |
54 | babeld_options=" --daemon -A 127.0.0.1" | |
55 | sharpd_options=" --daemon -A 127.0.0.1" | |
614aa5c1 | 56 | staticd_options=" --daemon -A 127.0.0.1" |
717b4866 | 57 | pbrd_options=" --daemon -A 127.0.0.1" |
c44032c1 | 58 | bfdd_options=" --daemon -A 127.0.0.1" |
f3c7b99d | 59 | fabricd_options=" --daemon -A 127.0.0.1" |
717b4866 | 60 | |
610b5328 | 61 | #MAX_FDS=1024 |
717b4866 | 62 | # The list of daemons to watch is automatically generated by the init script. |
bd2893d5 | 63 | #watchfrr_options="" |
717b4866 | 64 | |
bd2893d5 DL |
65 | # for debugging purposes, you can specify a "wrap" command to start instead |
66 | # of starting the daemon directly, e.g. to use valgrind on ospfd: | |
67 | # ospfd_wrap="/usr/bin/valgrind" | |
68 | # or you can use "all_wrap" for all daemons, e.g. to use perf record: | |
69 | # all_wrap="/usr/bin/perf record --call-graph -" | |
70 | # the normal daemon command is added to this at the end. | |
717b4866 QY |
71 | |
72 | Breaking this file down: | |
73 | ||
610b5328 DS |
74 | :: |
75 | ||
76 | bgpd=yes | |
77 | ||
78 | To enable a particular daemon, simply change the corresponding 'no' to 'yes'. | |
79 | Subsequent service restarts should start the daemon. | |
80 | ||
717b4866 QY |
81 | :: |
82 | ||
83 | vtysh_enable=yes | |
84 | ||
85 | As the comment says, this causes :ref:`VTYSH <vty-shell>` to apply | |
86 | configuration when starting the daemons. This is useful for a variety of | |
87 | reasons touched on in the VTYSH documentation and should generally be enabled. | |
88 | ||
610b5328 DS |
89 | :: |
90 | ||
91 | MAX_FDS=1024 | |
92 | ||
93 | This allows the operator to control the number of open file descriptors | |
94 | each daemon is allowed to start with. The current assumed value on | |
95 | most operating systems is 1024. If the operator plans to run bgp with | |
96 | several thousands of peers than this is where we would modify FRR to | |
97 | allow this to happen. | |
98 | ||
717b4866 QY |
99 | :: |
100 | ||
da7e1a92 | 101 | zebra_options=" -s 90000000 --daemon -A 127.0.0.1" |
717b4866 QY |
102 | bgpd_options=" --daemon -A 127.0.0.1" |
103 | ... | |
104 | ||
105 | The next set of lines controls what options are passed to daemons when started | |
106 | from the service script. Usually daemons will have ``--daemon`` and ``-A | |
107 | <address>`` specified in order to daemonize and listen for VTY commands on a | |
108 | particular address. | |
109 | ||
bd2893d5 DL |
110 | The remaining file content regarding `watchfrr_options` and `*_wrap` settings |
111 | should not normally be needed; refer to the comments in case they are. | |
717b4866 QY |
112 | |
113 | Services | |
114 | -------- | |
115 | FRR daemons have their own terminal interface or VTY. After installation, it's | |
116 | a good idea to setup each daemon's port number to connect to them. To do this | |
117 | add the following entries to :file:`/etc/services`. | |
118 | ||
119 | :: | |
120 | ||
121 | zebrasrv 2600/tcp # zebra service | |
122 | zebra 2601/tcp # zebra vty | |
123 | ripd 2602/tcp # RIPd vty | |
124 | ripngd 2603/tcp # RIPngd vty | |
125 | ospfd 2604/tcp # OSPFd vty | |
126 | bgpd 2605/tcp # BGPd vty | |
127 | ospf6d 2606/tcp # OSPF6d vty | |
128 | ospfapi 2607/tcp # ospfapi | |
129 | isisd 2608/tcp # ISISd vty | |
130 | babeld 2609/tcp # BABELd vty | |
131 | nhrpd 2610/tcp # nhrpd vty | |
132 | pimd 2611/tcp # PIMd vty | |
133 | ldpd 2612/tcp # LDPd vty | |
134 | eigprd 2613/tcp # EIGRPd vty | |
c44032c1 | 135 | bfdd 2617/tcp # bfdd vty |
f3c7b99d | 136 | fabricd 2618/tcp # fabricd vty |
717b4866 QY |
137 | |
138 | ||
139 | If you use a FreeBSD newer than 2.2.8, the above entries are already added to | |
140 | :file:`/etc/services` so there is no need to add it. If you specify a port | |
141 | number when starting the daemon, these entries may not be needed. | |
142 | ||
143 | You may need to make changes to the config files in |INSTALL_PREFIX_ETC|. | |
144 | ||
145 | systemd | |
146 | ------- | |
147 | Although not installed when installing from source, FRR provides a service file | |
148 | for use with ``systemd``. It is located in :file:`tools/frr.service` in the Git | |
149 | repository. If ``systemctl status frr.service`` indicates that the FRR service | |
150 | is not found, copy the service file from the Git repository into your preferred | |
151 | location. A good place is usually ``/etc/systemd/system/``. | |
152 | ||
153 | After issuing a ``systemctl daemon-reload``, you should be able to start the | |
154 | FRR service via ``systemctl start frr``. If this fails, or no daemons are | |
155 | started. check the ``journalctl`` logs for an indication of what went wrong. |