Vince Lehman | b722b10 | 2014-08-24 16:33:49 -0500 | [diff] [blame] | 1 | Getting Started with NLSR |
| 2 | ========================= |
| 3 | |
| 4 | .. toctree:: |
| 5 | .. |
| 6 | |
| 7 | Getting Source |
| 8 | -------------- |
| 9 | |
Davide Pesavento | 1e9faf1 | 2023-01-21 16:04:50 -0500 | [diff] [blame^] | 10 | - `GitHub NLSR repository <https://github.com/named-data/NLSR>`__ |
Vince Lehman | b722b10 | 2014-08-24 16:33:49 -0500 | [diff] [blame] | 11 | |
| 12 | Installation |
| 13 | ------------ |
| 14 | |
| 15 | :doc:`INSTALL` |
| 16 | |
Nick Gordon | d5c1a37 | 2016-10-31 13:56:23 -0500 | [diff] [blame] | 17 | Important Notes About Configuration |
| 18 | ----------------------------------- |
| 19 | |
| 20 | Since v0.4.0, NLSR no longer creates Faces for the neighbors that are |
| 21 | specified in ``nlsr.conf``. Instead, it relies on the pre-existence of |
| 22 | the Faces in NFD. NLSR will obtain this information from NFD, and |
| 23 | configure its neighbors using this information. |
| 24 | |
Davide Pesavento | 1e9faf1 | 2023-01-21 16:04:50 -0500 | [diff] [blame^] | 25 | For users who were relying on NLSR to automagically configure their networks, |
| 26 | this 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 Gordon | d5c1a37 | 2016-10-31 13:56:23 -0500 | [diff] [blame] | 28 | |
Vince Lehman | b722b10 | 2014-08-24 16:33:49 -0500 | [diff] [blame] | 29 | Configuration |
| 30 | ------------- |
| 31 | |
| 32 | After installing NLSR from source, you need to create a configuration file for |
Alexander Afanasyev | 7decbbf | 2014-08-24 21:29:01 -0700 | [diff] [blame] | 33 | NLSR. Please take a look at :doc:`manpages/nlsr.conf` for a sample configuration. For |
| 34 | details on configuring a router, please refer to :doc:`ROUTER-CONFIG`. For details on |
| 35 | security configuration, please refer to :doc:`SECURITY-CONFIG`. |
Vince Lehman | b722b10 | 2014-08-24 16:33:49 -0500 | [diff] [blame] | 36 | |
| 37 | Running |
| 38 | ------- |
| 39 | |
| 40 | Run nlsr with the following command: |
| 41 | |
| 42 | :: |
| 43 | |
| 44 | nlsr |
| 45 | |
Alexander Afanasyev | 7decbbf | 2014-08-24 21:29:01 -0700 | [diff] [blame] | 46 | NLSR will look for the default configuration file, ``nlsr.conf``, in the current directory. |
Vince Lehman | b722b10 | 2014-08-24 16:33:49 -0500 | [diff] [blame] | 47 | |
Alexander Afanasyev | 7decbbf | 2014-08-24 21:29:01 -0700 | [diff] [blame] | 48 | You can also run ``nlsr -f`` with the absolute path of the configuration file: |
Vince Lehman | b722b10 | 2014-08-24 16:33:49 -0500 | [diff] [blame] | 49 | |
| 50 | :: |
| 51 | |
Alexander Afanasyev | 7decbbf | 2014-08-24 21:29:01 -0700 | [diff] [blame] | 52 | nlsr -f /usr/local/etc/ndn/nlsr.conf |
Vince Lehman | b722b10 | 2014-08-24 16:33:49 -0500 | [diff] [blame] | 53 | |
dmcoomes | cf8d0ed | 2017-02-21 11:39:01 -0600 | [diff] [blame] | 54 | Logging |
| 55 | ------- |
| 56 | |
| 57 | NLSR uses the ndn-cxx logging facility. All levels listed below the selected log-level |
| 58 | value are enabled. |
Vince Lehman | b722b10 | 2014-08-24 16:33:49 -0500 | [diff] [blame] | 59 | |
| 60 | :: |
| 61 | |
dmcoomes | cf8d0ed | 2017-02-21 11:39:01 -0600 | [diff] [blame] | 62 | 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 Pesavento | 1e9faf1 | 2023-01-21 16:04:50 -0500 | [diff] [blame^] | 71 | To obtain logs for NLSR, set the ``NDN_LOG`` environment variable with the correct prefix |
| 72 | and log-level settings. For example, running the following command will display all log |
David Arjona | 2fa23ea | 2018-11-28 11:50:38 -0600 | [diff] [blame] | 73 | messages in NLSR with a DEBUG level or below. |
| 74 | |
Davide Pesavento | 1e9faf1 | 2023-01-21 16:04:50 -0500 | [diff] [blame^] | 75 | .. code-block:: sh |
David Arjona | 2fa23ea | 2018-11-28 11:50:38 -0600 | [diff] [blame] | 76 | |
| 77 | NDN_LOG='nlsr.*=DEBUG' nlsr |
| 78 | |
Davide Pesavento | 1e9faf1 | 2023-01-21 16:04:50 -0500 | [diff] [blame^] | 79 | If the user is presented with an error message "User does not have read and write |
| 80 | permission on the directory" it can be circumvented by running the application with sudo: |
David Arjona | 2fa23ea | 2018-11-28 11:50:38 -0600 | [diff] [blame] | 81 | |
Davide Pesavento | 1e9faf1 | 2023-01-21 16:04:50 -0500 | [diff] [blame^] | 82 | .. code-block:: sh |
David Arjona | 2fa23ea | 2018-11-28 11:50:38 -0600 | [diff] [blame] | 83 | |
| 84 | sudo env NDN_LOG='nlsr.*=DEBUG' nlsr |
| 85 | |
Davide Pesavento | 1e9faf1 | 2023-01-21 16:04:50 -0500 | [diff] [blame^] | 86 | See ``man ndn-log`` for more details (`online version |
| 87 | <https://docs.named-data.net/ndn-cxx/current/manpages/ndn-log.html>`__). |