blob: 79098280d639333ec416beffbe54763d4d08f967 [file] [log] [blame]
Vince Lehmanb722b102014-08-24 16:33:49 -05001Getting Started with NLSR
2=========================
3
4.. toctree::
5..
6
7Getting Source
8--------------
9
Davide Pesavento1e9faf12023-01-21 16:04:50 -050010- `GitHub NLSR repository <https://github.com/named-data/NLSR>`__
Vince Lehmanb722b102014-08-24 16:33:49 -050011
12Installation
13------------
14
15:doc:`INSTALL`
16
Nick Gordond5c1a372016-10-31 13:56:23 -050017Important Notes About Configuration
18-----------------------------------
19
20Since v0.4.0, NLSR no longer creates Faces for the neighbors that are
21specified in ``nlsr.conf``. Instead, it relies on the pre-existence of
22the Faces in NFD. NLSR will obtain this information from NFD, and
23configure its neighbors using this information.
24
Davide Pesavento1e9faf12023-01-21 16:04:50 -050025For users who were relying on NLSR to automagically configure their networks,
26this must now be done with ``nfdc``. See ``man nfdc`` for its documentation
27(`online version <https://docs.named-data.net/NFD/current/manpages/nfdc.html>`__).
Nick Gordond5c1a372016-10-31 13:56:23 -050028
Vince Lehmanb722b102014-08-24 16:33:49 -050029Configuration
30-------------
31
32After installing NLSR from source, you need to create a configuration file for
Alexander Afanasyev7decbbf2014-08-24 21:29:01 -070033NLSR. Please take a look at :doc:`manpages/nlsr.conf` for a sample configuration. For
34details on configuring a router, please refer to :doc:`ROUTER-CONFIG`. For details on
35security configuration, please refer to :doc:`SECURITY-CONFIG`.
Vince Lehmanb722b102014-08-24 16:33:49 -050036
37Running
38-------
39
40Run nlsr with the following command:
41
42::
43
44 nlsr
45
Alexander Afanasyev7decbbf2014-08-24 21:29:01 -070046NLSR will look for the default configuration file, ``nlsr.conf``, in the current directory.
Vince Lehmanb722b102014-08-24 16:33:49 -050047
Alexander Afanasyev7decbbf2014-08-24 21:29:01 -070048You can also run ``nlsr -f`` with the absolute path of the configuration file:
Vince Lehmanb722b102014-08-24 16:33:49 -050049
50::
51
Alexander Afanasyev7decbbf2014-08-24 21:29:01 -070052 nlsr -f /usr/local/etc/ndn/nlsr.conf
Vince Lehmanb722b102014-08-24 16:33:49 -050053
dmcoomescf8d0ed2017-02-21 11:39:01 -060054Logging
55-------
56
57NLSR uses the ndn-cxx logging facility. All levels listed below the selected log-level
58value are enabled.
Vince Lehmanb722b102014-08-24 16:33:49 -050059
60::
61
dmcoomescf8d0ed2017-02-21 11:39:01 -060062 Valid values:
63
64 TRACE trace messages (most verbose)
65 DEBUG debugging messages
66 INFO informational messages
67 WARN warning messages
68 ERROR error messages
69 FATAL fatal (will be logged unconditionally)
70
Davide Pesavento1e9faf12023-01-21 16:04:50 -050071To obtain logs for NLSR, set the ``NDN_LOG`` environment variable with the correct prefix
72and log-level settings. For example, running the following command will display all log
David Arjona2fa23ea2018-11-28 11:50:38 -060073messages in NLSR with a DEBUG level or below.
74
Davide Pesavento1e9faf12023-01-21 16:04:50 -050075.. code-block:: sh
David Arjona2fa23ea2018-11-28 11:50:38 -060076
77 NDN_LOG='nlsr.*=DEBUG' nlsr
78
Davide Pesavento1e9faf12023-01-21 16:04:50 -050079If the user is presented with an error message "User does not have read and write
80permission on the directory" it can be circumvented by running the application with sudo:
David Arjona2fa23ea2018-11-28 11:50:38 -060081
Davide Pesavento1e9faf12023-01-21 16:04:50 -050082.. code-block:: sh
David Arjona2fa23ea2018-11-28 11:50:38 -060083
84 sudo env NDN_LOG='nlsr.*=DEBUG' nlsr
85
Davide Pesavento1e9faf12023-01-21 16:04:50 -050086See ``man ndn-log`` for more details (`online version
87<https://docs.named-data.net/ndn-cxx/current/manpages/ndn-log.html>`__).