Philipp Moll | a103334 | 2021-06-14 09:34:21 +0200 | [diff] [blame] | 1 | ; The general section contains global settings for the nfd process. |
Steve DiBenedetto | 24b9a64 | 2014-04-07 15:45:39 -0600 | [diff] [blame] | 2 | general |
| 3 | { |
| 4 | ; Specify a user and/or group for NFD to drop privileges to |
| 5 | ; when not performing privileged tasks. NFD does not drop |
| 6 | ; privileges by default. |
| 7 | |
| 8 | ; user ndn-user |
| 9 | ; group ndn-user |
| 10 | } |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 11 | |
Steve DiBenedetto | bf6a93d | 2014-03-21 14:03:02 -0600 | [diff] [blame] | 12 | log |
| 13 | { |
| 14 | ; default_level specifies the logging level for modules |
| 15 | ; that are not explicitly named. All debugging levels |
| 16 | ; listed above the selected value are enabled. |
| 17 | ; |
| 18 | ; Valid values: |
| 19 | ; |
| 20 | ; NONE ; no messages |
| 21 | ; ERROR ; error messages |
| 22 | ; WARN ; warning messages |
| 23 | ; INFO ; informational messages (default) |
| 24 | ; DEBUG ; debugging messages |
| 25 | ; TRACE ; trace messages (most verbose) |
| 26 | ; ALL ; all messages |
| 27 | |
Alexander Afanasyev | 885a85b | 2014-04-12 21:01:13 -0700 | [diff] [blame] | 28 | default_level INFO |
Steve DiBenedetto | bf6a93d | 2014-03-21 14:03:02 -0600 | [diff] [blame] | 29 | |
| 30 | ; You may override default_level by assigning a logging level |
| 31 | ; to the desired module name. Module names can be found in two ways: |
| 32 | ; |
| 33 | ; Run: |
| 34 | ; nfd --modules |
| 35 | ; |
Davide Pesavento | a314808 | 2018-04-12 18:21:54 -0400 | [diff] [blame] | 36 | ; Or look for NFD_LOG_INIT(<module name>) statements in source files. |
| 37 | ; Note that the "nfd." prefix can be omitted. |
Steve DiBenedetto | bf6a93d | 2014-03-21 14:03:02 -0600 | [diff] [blame] | 38 | ; |
| 39 | ; Example module-level settings: |
| 40 | ; |
| 41 | ; FibManager DEBUG |
| 42 | ; Forwarder INFO |
| 43 | } |
| 44 | |
Philipp Moll | a103334 | 2021-06-14 09:34:21 +0200 | [diff] [blame] | 45 | ; The forwarder section contains settings that affect the core forwarding behavior of nfd. |
| 46 | forwarder |
| 47 | { |
| 48 | ; Specify the HopLimit that is added to incoming Interests without a HopLimit element. |
| 49 | ; A value of 0 disables adding the HopLimit. |
| 50 | ; Must be between 0 and 255. The default is 0. |
| 51 | default_hop_limit 0 |
| 52 | } |
| 53 | |
Steve DiBenedetto | 3a4f83d | 2014-06-02 14:58:54 -0600 | [diff] [blame] | 54 | ; The tables section configures the CS, PIT, FIB, Strategy Choice, and Measurements |
| 55 | tables |
| 56 | { |
Philipp Moll | a103334 | 2021-06-14 09:34:21 +0200 | [diff] [blame] | 57 | ; Content Store capacity limit in number of packets. |
| 58 | ; The default is 65536, equivalent to about 500MB with 8KB packet size. |
Steve DiBenedetto | 3a4f83d | 2014-06-02 14:58:54 -0600 | [diff] [blame] | 59 | cs_max_packets 65536 |
Steve DiBenedetto | c0640f5 | 2014-11-03 15:55:43 -0700 | [diff] [blame] | 60 | |
Philipp Moll | a103334 | 2021-06-14 09:34:21 +0200 | [diff] [blame] | 61 | ; Content Store replacement policy. |
Junxiao Shi | b4a5acd | 2016-12-07 19:59:18 +0000 | [diff] [blame] | 62 | ; Available policies are: priority_fifo, lru |
Chavoosh Ghasemi | 32e7609 | 2018-09-10 14:51:33 -0700 | [diff] [blame] | 63 | cs_policy lru |
Junxiao Shi | b4a5acd | 2016-12-07 19:59:18 +0000 | [diff] [blame] | 64 | |
Junxiao Shi | 9685cc5 | 2016-08-29 12:47:05 +0000 | [diff] [blame] | 65 | ; Set a policy to decide whether to cache or drop unsolicited Data. |
| 66 | ; Available policies are: drop-all, admit-local, admit-network, admit-all |
Junxiao Shi | 88f5f73 | 2016-09-03 07:11:37 +0000 | [diff] [blame] | 67 | cs_unsolicited_policy drop-all |
Junxiao Shi | 9685cc5 | 2016-08-29 12:47:05 +0000 | [diff] [blame] | 68 | |
Steve DiBenedetto | c0640f5 | 2014-11-03 15:55:43 -0700 | [diff] [blame] | 69 | ; Set the forwarding strategy for the specified prefixes: |
| 70 | ; <prefix> <strategy> |
| 71 | strategy_choice |
| 72 | { |
| 73 | / /localhost/nfd/strategy/best-route |
Junxiao Shi | 67ba8d2 | 2015-08-21 21:21:28 -0700 | [diff] [blame] | 74 | /localhost /localhost/nfd/strategy/multicast |
Steve DiBenedetto | c0640f5 | 2014-11-03 15:55:43 -0700 | [diff] [blame] | 75 | /localhost/nfd /localhost/nfd/strategy/best-route |
Junxiao Shi | 67ba8d2 | 2015-08-21 21:21:28 -0700 | [diff] [blame] | 76 | /ndn/broadcast /localhost/nfd/strategy/multicast |
Steve DiBenedetto | c0640f5 | 2014-11-03 15:55:43 -0700 | [diff] [blame] | 77 | } |
Vince Lehman | 63ab1bb | 2015-09-04 17:06:58 -0500 | [diff] [blame] | 78 | |
| 79 | ; Declare network region names |
| 80 | ; These are used for mobility support. An Interest carrying a Link object is |
| 81 | ; assumed to have reached the producer region if any delegation name in the |
| 82 | ; Link object is a prefix of any region name. |
| 83 | network_region |
| 84 | { |
| 85 | ; /example/region1 |
| 86 | ; /example/region2 |
| 87 | } |
Steve DiBenedetto | 3a4f83d | 2014-06-02 14:58:54 -0600 | [diff] [blame] | 88 | } |
| 89 | |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 90 | ; The face_system section defines what faces and channels are created. |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 91 | face_system |
| 92 | { |
Eric Newberry | 0c84164 | 2018-01-17 15:01:00 -0700 | [diff] [blame] | 93 | ; This section contains options that apply to multiple face protocols. |
| 94 | general |
| 95 | { |
Eric Newberry | 17d1849 | 2018-02-10 22:50:06 -0700 | [diff] [blame] | 96 | enable_congestion_marking yes ; set to 'no' to disable congestion marking on supported faces, default 'yes' |
Eric Newberry | 0c84164 | 2018-01-17 15:01:00 -0700 | [diff] [blame] | 97 | } |
| 98 | |
Davide Pesavento | 494a955 | 2018-02-04 22:16:05 -0500 | [diff] [blame] | 99 | ; The unix section contains settings for Unix stream faces and channels. |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 100 | ; A Unix channel is always listening; delete the unix section to disable |
Steve DiBenedetto | dbcb1a1 | 2014-11-17 11:04:21 -0700 | [diff] [blame] | 101 | ; Unix stream faces and channels. |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 102 | unix |
| 103 | { |
Eric Newberry | 2297490 | 2020-04-06 23:41:00 -0700 | [diff] [blame] | 104 | ; The default transport is unix:///run/nfd.sock (on Linux) or unix:///var/run/nfd.sock (on |
| 105 | ; other platforms). This should match the "transport" field in client.conf for ndn-cxx. If you |
| 106 | ; wish to use TCP instead of Unix sockets with ndn-cxx, change "transport" to an appropriate |
| 107 | ; TCP FaceUri. |
| 108 | path @UNIX_SOCKET_PATH@ ; Unix stream listener path |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 109 | } |
| 110 | |
Davide Pesavento | 494a955 | 2018-02-04 22:16:05 -0500 | [diff] [blame] | 111 | ; The tcp section contains settings for TCP faces and channels. |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 112 | tcp |
| 113 | { |
| 114 | listen yes ; set to 'no' to disable TCP listener, default 'yes' |
| 115 | port 6363 ; TCP listener port number |
Steve DiBenedetto | 9515287 | 2014-04-11 12:40:59 -0600 | [diff] [blame] | 116 | enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes' |
| 117 | enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes' |
Alexander Afanasyev | ded1742 | 2018-04-03 19:00:23 -0400 | [diff] [blame] | 118 | |
| 119 | ; A TCP face has local scope if the local and remote IP addresses match the whitelist but not the blacklist |
| 120 | local |
| 121 | { |
| 122 | whitelist |
| 123 | { |
| 124 | subnet 127.0.0.0/8 |
| 125 | subnet ::1/128 |
| 126 | } |
| 127 | blacklist |
| 128 | { |
| 129 | } |
| 130 | } |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 131 | } |
| 132 | |
Davide Pesavento | 494a955 | 2018-02-04 22:16:05 -0500 | [diff] [blame] | 133 | ; The udp section contains settings for UDP faces and channels. |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 134 | udp |
| 135 | { |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 136 | ; UDP unicast settings. |
Davide Pesavento | 494a955 | 2018-02-04 22:16:05 -0500 | [diff] [blame] | 137 | listen yes ; set to 'no' to disable UDP listener, default 'yes' |
| 138 | port 6363 ; UDP listener port number |
Steve DiBenedetto | 9515287 | 2014-04-11 12:40:59 -0600 | [diff] [blame] | 139 | enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes' |
| 140 | enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes' |
Chengyu Fan | addecff | 2015-02-10 14:09:01 -0700 | [diff] [blame] | 141 | |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 142 | ; Time (in seconds) before closing an idle UDP unicast face. |
| 143 | ; The actual timeout will occur anytime between idle_timeout and 2*idle_timeout. |
| 144 | ; The default is 600 (10 minutes). |
Chengyu Fan | addecff | 2015-02-10 14:09:01 -0700 | [diff] [blame] | 145 | idle_timeout 600 |
| 146 | |
Junxiao Shi | a6286a9 | 2021-02-23 06:43:52 -0700 | [diff] [blame] | 147 | ; Maximum payload size for outgoing packets on unicast faces, used in NDNLPv2 fragmentation. |
| 148 | ; This must be between 64 and 8800. The default is 8800. |
| 149 | ; This value excludes IPv4/IPv6/UDP headers. On an Ethernet link of MTU=1500, setting this |
| 150 | ; to 1452 would leave enough room for IP+UDP headers and prevent IP fragmentation. |
| 151 | ; This option is not changable during runtime configuration reload, but the MTU of an |
| 152 | ; individual face can be updated via NFD Management Protocol or the 'nfdc' tool. |
| 153 | unicast_mtu 8800 |
| 154 | |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 155 | ; UDP multicast settings. |
| 156 | ; By default, NFD creates one UDP multicast face per NIC. |
Giulio Grassi | 6d7176d | 2014-04-16 16:08:48 +0200 | [diff] [blame] | 157 | ; |
| 158 | ; In multi-homed Linux machines these settings will NOT work without |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 159 | ; root or setting the appropriate permissions: |
Giulio Grassi | 6d7176d | 2014-04-16 16:08:48 +0200 | [diff] [blame] | 160 | ; |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 161 | ; sudo setcap cap_net_raw=eip /path/to/nfd |
Giulio Grassi | 6d7176d | 2014-04-16 16:08:48 +0200 | [diff] [blame] | 162 | ; |
Alexander Afanasyev | 885a85b | 2014-04-12 21:01:13 -0700 | [diff] [blame] | 163 | mcast yes ; set to 'no' to disable UDP multicast, default 'yes' |
Md Ashiqur Rahman | 8ce0903 | 2018-01-14 22:43:13 -0500 | [diff] [blame] | 164 | mcast_group 224.0.23.170 ; UDP multicast group (IPv4) |
| 165 | mcast_port 56363 ; UDP multicast port number (IPv4) |
| 166 | mcast_group_v6 ff02::1234 ; UDP multicast group (IPv6) |
| 167 | mcast_port_v6 56363 ; UDP multicast port number (IPv6) |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 168 | mcast_ad_hoc no ; set to 'yes' to make all UDP multicast faces "ad hoc", default 'no' |
Junxiao Shi | c31080d | 2017-01-24 15:10:12 +0000 | [diff] [blame] | 169 | |
| 170 | ; Whitelist and blacklist can contain, in no particular order: |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 171 | ; - interface names, including wildcard patterns (e.g., 'ifname eth0', 'ifname en*', 'ifname wlp?s0') |
Alexander Afanasyev | 3bdc1de | 2018-04-03 17:33:31 -0400 | [diff] [blame] | 172 | ; - MAC addresses (e.g., 'ether 85:3b:4d:d3:5f:c2') |
| 173 | ; - IPv4 subnets (e.g., 'subnet 192.0.2.0/24') |
| 174 | ; - IPv6 subnets (e.g., 'subnet 2001:db8::/32') |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 175 | ; - a single asterisk ('*') that matches all interfaces |
| 176 | ; By default, all interfaces are whitelisted. |
Junxiao Shi | c31080d | 2017-01-24 15:10:12 +0000 | [diff] [blame] | 177 | whitelist |
| 178 | { |
| 179 | * |
| 180 | } |
| 181 | blacklist |
| 182 | { |
| 183 | } |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 184 | } |
| 185 | |
Davide Pesavento | 494a955 | 2018-02-04 22:16:05 -0500 | [diff] [blame] | 186 | ; The ether section contains settings for Ethernet faces and channels. |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 187 | ; These settings will NOT work without root or setting the appropriate |
| 188 | ; permissions: |
| 189 | ; |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 190 | ; sudo setcap cap_net_raw,cap_net_admin=eip /path/to/nfd |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 191 | ; |
| 192 | ; You may need to install a package to use setcap: |
| 193 | ; |
| 194 | ; **Ubuntu:** |
| 195 | ; |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 196 | ; sudo apt install libcap2-bin |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 197 | ; |
| 198 | ; **Mac OS X:** |
| 199 | ; |
| 200 | ; curl https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -o ChmodBPF.tar.gz |
| 201 | ; tar zxvf ChmodBPF.tar.gz |
| 202 | ; open ChmodBPF/Install\ ChmodBPF.app |
| 203 | ; |
| 204 | ; or manually: |
| 205 | ; |
| 206 | ; sudo chgrp admin /dev/bpf* |
| 207 | ; sudo chmod g+rw /dev/bpf* |
susmit | 91e1d7c | 2016-10-03 16:16:57 -0600 | [diff] [blame] | 208 | ; |
Alexander Afanasyev | 885a85b | 2014-04-12 21:01:13 -0700 | [diff] [blame] | 209 | @IF_HAVE_LIBPCAP@ether |
| 210 | @IF_HAVE_LIBPCAP@{ |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 211 | @IF_HAVE_LIBPCAP@ ; Ethernet unicast settings. |
| 212 | @IF_HAVE_LIBPCAP@ listen yes ; set to 'no' to disable Ethernet listener, default 'yes' |
Alexander Afanasyev | 885a85b | 2014-04-12 21:01:13 -0700 | [diff] [blame] | 213 | @IF_HAVE_LIBPCAP@ |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 214 | @IF_HAVE_LIBPCAP@ ; Time (in seconds) before closing an idle Ethernet unicast face. |
| 215 | @IF_HAVE_LIBPCAP@ ; The actual timeout will occur anytime between idle_timeout and 2*idle_timeout. |
| 216 | @IF_HAVE_LIBPCAP@ ; The default is 600 (10 minutes). |
| 217 | @IF_HAVE_LIBPCAP@ idle_timeout 600 |
| 218 | @IF_HAVE_LIBPCAP@ |
| 219 | @IF_HAVE_LIBPCAP@ ; Ethernet multicast settings. |
| 220 | @IF_HAVE_LIBPCAP@ ; By default, NFD creates one Ethernet multicast face per NIC. |
Alexander Afanasyev | 885a85b | 2014-04-12 21:01:13 -0700 | [diff] [blame] | 221 | @IF_HAVE_LIBPCAP@ mcast yes ; set to 'no' to disable Ethernet multicast, default 'yes' |
| 222 | @IF_HAVE_LIBPCAP@ mcast_group 01:00:5E:00:17:AA ; Ethernet multicast group |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 223 | @IF_HAVE_LIBPCAP@ mcast_ad_hoc no ; set to 'yes' to make all Ethernet multicast faces "ad hoc", default 'no' |
susmit | 91e1d7c | 2016-10-03 16:16:57 -0600 | [diff] [blame] | 224 | @IF_HAVE_LIBPCAP@ |
Junxiao Shi | c31080d | 2017-01-24 15:10:12 +0000 | [diff] [blame] | 225 | @IF_HAVE_LIBPCAP@ ; Whitelist and blacklist can contain, in no particular order: |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 226 | @IF_HAVE_LIBPCAP@ ; - interface names, including wildcard patterns (e.g., 'ifname eth0', 'ifname en*', 'ifname wlp?s0') |
Alexander Afanasyev | 3bdc1de | 2018-04-03 17:33:31 -0400 | [diff] [blame] | 227 | @IF_HAVE_LIBPCAP@ ; - MAC addresses (e.g., 'ether 85:3b:4d:d3:5f:c2') |
| 228 | @IF_HAVE_LIBPCAP@ ; - IPv4 subnets (e.g., 'subnet 192.0.2.0/24') |
| 229 | @IF_HAVE_LIBPCAP@ ; - IPv6 subnets (e.g., 'subnet 2001:db8::/32') |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 230 | @IF_HAVE_LIBPCAP@ ; - a single asterisk ('*') that matches all interfaces |
| 231 | @IF_HAVE_LIBPCAP@ ; By default, all interfaces are whitelisted. |
susmit | 91e1d7c | 2016-10-03 16:16:57 -0600 | [diff] [blame] | 232 | @IF_HAVE_LIBPCAP@ whitelist |
| 233 | @IF_HAVE_LIBPCAP@ { |
| 234 | @IF_HAVE_LIBPCAP@ * |
| 235 | @IF_HAVE_LIBPCAP@ } |
| 236 | @IF_HAVE_LIBPCAP@ blacklist |
| 237 | @IF_HAVE_LIBPCAP@ { |
| 238 | @IF_HAVE_LIBPCAP@ } |
Alexander Afanasyev | 885a85b | 2014-04-12 21:01:13 -0700 | [diff] [blame] | 239 | @IF_HAVE_LIBPCAP@} |
Wentao Shang | 53df163 | 2014-04-21 12:01:32 -0700 | [diff] [blame] | 240 | |
Davide Pesavento | 494a955 | 2018-02-04 22:16:05 -0500 | [diff] [blame] | 241 | ; The websocket section contains settings for WebSocket faces and channels. |
Wentao Shang | 53df163 | 2014-04-21 12:01:32 -0700 | [diff] [blame] | 242 | @IF_HAVE_WEBSOCKET@websocket |
| 243 | @IF_HAVE_WEBSOCKET@{ |
| 244 | @IF_HAVE_WEBSOCKET@ listen yes ; set to 'no' to disable WebSocket listener, default 'yes' |
| 245 | @IF_HAVE_WEBSOCKET@ port 9696 ; WebSocket listener port number |
| 246 | @IF_HAVE_WEBSOCKET@ enable_v4 yes ; set to 'no' to disable listening on IPv4 socket, default 'yes' |
| 247 | @IF_HAVE_WEBSOCKET@ enable_v6 yes ; set to 'no' to disable listening on IPv6 socket, default 'yes' |
| 248 | @IF_HAVE_WEBSOCKET@} |
Junxiao Shi | eef49a9 | 2018-11-10 12:19:36 +0000 | [diff] [blame] | 249 | |
| 250 | ; The netdev_bound section defines faces bound to netdevices. |
| 251 | netdev_bound |
| 252 | { |
| 253 | ; A rule consists of a whitelist, a blacklist, and a set of remote FaceUris, and will cause the |
| 254 | ; creation of zero or more faces bound to netdevices. One face will be created per accepted |
| 255 | ; netdev per remote. There can be any number of rules in the netdev_bound section. |
| 256 | |
| 257 | ; rule |
| 258 | ; { |
| 259 | ; ; Remote FaceUri to which the netdev-bound faces will connect. |
| 260 | ; ; Rule can contain multiple remotes. One face will be created for each remote. |
| 261 | ; ; All FaceUris must be in canonical form. Currently only udp4 and udp6 are supported. |
| 262 | ; remote udp4://192.0.2.1:6363 |
| 263 | ; |
| 264 | ; ; Whitelist and blacklist can contain, in no particular order: |
| 265 | ; ; - interface names, including wildcard patterns (e.g., 'ifname eth0', 'ifname en*', 'ifname wlp?s0') |
| 266 | ; ; - MAC addresses (e.g., 'ether 85:3b:4d:d3:5f:c2') |
| 267 | ; ; - IPv4 subnets (e.g., 'subnet 192.0.2.0/24') |
| 268 | ; ; - IPv6 subnets (e.g., 'subnet 2001:db8::/32') |
| 269 | ; ; - a single asterisk ('*') that matches all interfaces |
| 270 | ; ; By default, all interfaces are whitelisted. |
| 271 | ; whitelist |
| 272 | ; { |
| 273 | ; * |
| 274 | ; } |
| 275 | ; blacklist |
| 276 | ; { |
| 277 | ; } |
| 278 | ; } |
| 279 | } |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 280 | } |
| 281 | |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 282 | ; The authorizations section grants privileges to authorized keys. |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 283 | authorizations |
| 284 | { |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 285 | ; An authorize section grants privileges to a NDN certificate. |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 286 | authorize |
| 287 | { |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 288 | ; If you do not already have NDN certificate, you can generate |
| 289 | ; one with the following commands. |
| 290 | ; |
| 291 | ; 1. Generate and install a self-signed identity certificate: |
| 292 | ; |
Davide Pesavento | d69070e | 2021-06-04 18:50:52 -0400 | [diff] [blame] | 293 | ; ndnsec key-gen /$(whoami) | ndnsec cert-install - |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 294 | ; |
Davide Pesavento | d69070e | 2021-06-04 18:50:52 -0400 | [diff] [blame] | 295 | ; Note that the argument to 'ndnsec key-gen' will be the identity name of |
| 296 | ; the new key (in this case, /your-username). Identities are hierarchical |
| 297 | ; NDN names and may have multiple components (e.g., /ndn/ucla/edu/alice). |
| 298 | ; You may create additional keys and identities as needed. |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 299 | ; |
Davide Pesavento | d69070e | 2021-06-04 18:50:52 -0400 | [diff] [blame] | 300 | ; 2. Export the certificate to a file: |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 301 | ; |
Davide Pesavento | d69070e | 2021-06-04 18:50:52 -0400 | [diff] [blame] | 302 | ; ndnsec cert-dump -i /$(whoami) > default.ndncert |
| 303 | ; sudo mkdir -p @SYSCONFDIR@/ndn/keys |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 304 | ; sudo mv default.ndncert @SYSCONFDIR@/ndn/keys/default.ndncert |
| 305 | ; |
| 306 | ; The "certfile" field below specifies the default key directory for |
| 307 | ; your machine. You may move your newly created key to the location it |
| 308 | ; specifies or path. |
| 309 | |
Yingdi Yu | c8f214c | 2014-04-29 20:39:37 -0700 | [diff] [blame] | 310 | ; certfile keys/default.ndncert ; NDN identity certificate file |
| 311 | certfile any ; "any" authorizes command interests signed under any certificate, |
| 312 | ; i.e., no actual validation. |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 313 | privileges ; set of privileges granted to this identity |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 314 | { |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 315 | faces |
| 316 | fib |
Junxiao Shi | c9b5e01 | 2018-02-07 15:04:18 +0000 | [diff] [blame] | 317 | cs |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 318 | strategy-choice |
| 319 | } |
| 320 | } |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 321 | |
| 322 | ; You may have multiple authorize sections that specify additional |
| 323 | ; certificates and their privileges. |
| 324 | |
Alexander Afanasyev | 885a85b | 2014-04-12 21:01:13 -0700 | [diff] [blame] | 325 | ; authorize |
| 326 | ; { |
| 327 | ; certfile keys/this_cert_does_not_exist.ndncert |
| 328 | ; authorize |
| 329 | ; privileges |
| 330 | ; { |
| 331 | ; faces |
| 332 | ; } |
| 333 | ; } |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 334 | } |
Alexander Afanasyev | 89cf5e0 | 2014-04-17 12:08:57 -0700 | [diff] [blame] | 335 | |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 336 | rib |
Alexander Afanasyev | 89cf5e0 | 2014-04-17 12:08:57 -0700 | [diff] [blame] | 337 | { |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 338 | ; The following localhost_security allows anyone to register routing entries in local RIB |
| 339 | localhost_security |
| 340 | { |
| 341 | trust-anchor |
| 342 | { |
| 343 | type any |
| 344 | } |
| 345 | } |
Alexander Afanasyev | 89cf5e0 | 2014-04-17 12:08:57 -0700 | [diff] [blame] | 346 | |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 347 | ; localhop_security should be enabled when NFD runs on a hub. |
| 348 | ; "/localhop/nfd/fib" command prefix will be disabled when localhop_security section is missing. |
| 349 | ; localhop_security |
Alexander Afanasyev | 89cf5e0 | 2014-04-17 12:08:57 -0700 | [diff] [blame] | 350 | ; { |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 351 | ; ; This section defines the trust model for NFD RIB Management. It consists of rules and |
| 352 | ; ; trust-anchors, which are briefly defined in this file. For more information refer to |
Chavoosh Ghasemi | 60b7d51 | 2017-08-10 17:17:46 -0700 | [diff] [blame] | 353 | ; ; validator configuration file format documentation: |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 354 | ; ; |
Davide Pesavento | bf4c131 | 2023-02-23 20:32:01 -0500 | [diff] [blame] | 355 | ; ; https://docs.named-data.net/ndn-cxx/current/tutorials/security-validator-config.html |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 356 | ; ; |
| 357 | ; ; A trust-anchor is a pre-trusted certificate. This can be any certificate that is the |
| 358 | ; ; root of certification chain (e.g., NDN testbed root certificate) or an existing |
| 359 | ; ; default system certificate `default.ndncert`. |
| 360 | ; ; |
| 361 | ; ; A rule defines conditions a valid packet MUST have. A packet must satisfy one of the |
| 362 | ; ; rules defined here. A rule can be broken into two parts: matching & checking. A packet |
| 363 | ; ; will be matched against rules from the first to the last until a matched rule is |
| 364 | ; ; encountered. The matched rule will be used to check the packet. If a packet does not |
| 365 | ; ; match any rule, it will be treated as invalid. The matching part of a rule consists |
| 366 | ; ; of `for` and `filter` sections. They collectively define which packets can be checked |
| 367 | ; ; with this rule. `for` defines packet type (data or interest) and `filter` defines |
| 368 | ; ; conditions on other properties of a packet. Right now, you can only define conditions |
| 369 | ; ; on packet name, and you can only specify ONLY ONE filter for packet name. The |
| 370 | ; ; checking part of a rule consists of `checker`, which defines the conditions that a |
| 371 | ; ; VALID packet MUST have. See comments in checker section for more details. |
| 372 | ; |
| 373 | ; rule |
| 374 | ; { |
Junxiao Shi | 6aecc50 | 2021-02-07 13:11:56 -0700 | [diff] [blame] | 375 | ; id "RIB Command Interest" |
| 376 | ; for interest |
Alexander Afanasyev | 5e02c04 | 2021-12-21 14:47:32 -0500 | [diff] [blame] | 377 | ; ; match Commmand Interest name (either in v0.3 or v0.2 format) |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 378 | ; filter |
| 379 | ; { |
Junxiao Shi | 6aecc50 | 2021-02-07 13:11:56 -0700 | [diff] [blame] | 380 | ; type name |
Alexander Afanasyev | 5e02c04 | 2021-12-21 14:47:32 -0500 | [diff] [blame] | 381 | ; regex ^<localhop><nfd><rib>[<register><unregister>]<>{1,3}$ |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 382 | ; } |
| 383 | ; checker |
| 384 | ; { |
| 385 | ; type customized |
Junxiao Shi | 6aecc50 | 2021-02-07 13:11:56 -0700 | [diff] [blame] | 386 | ; sig-type ecdsa-sha256 |
| 387 | ; ; KeyLocator must be either a key name or a certificate name |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 388 | ; key-locator |
| 389 | ; { |
Junxiao Shi | 6aecc50 | 2021-02-07 13:11:56 -0700 | [diff] [blame] | 390 | ; type name |
| 391 | ; regex ^<>*<KEY><>{1,3}$ |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 392 | ; } |
| 393 | ; } |
| 394 | ; } |
| 395 | ; rule |
| 396 | ; { |
Junxiao Shi | 6aecc50 | 2021-02-07 13:11:56 -0700 | [diff] [blame] | 397 | ; id "NDN Testbed Certificate Hierarchy" |
| 398 | ; for data |
| 399 | ; ; match certificate name only |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 400 | ; filter |
| 401 | ; { |
Junxiao Shi | 6aecc50 | 2021-02-07 13:11:56 -0700 | [diff] [blame] | 402 | ; type name |
| 403 | ; regex ^<>*<KEY><>{3}$ |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 404 | ; } |
| 405 | ; checker |
| 406 | ; { |
Junxiao Shi | 6aecc50 | 2021-02-07 13:11:56 -0700 | [diff] [blame] | 407 | ; type customized |
| 408 | ; sig-type ecdsa-sha256 |
| 409 | ; key-locator |
| 410 | ; { |
| 411 | ; type name |
| 412 | ; ; issuer subject name must be a prefix of issued certificate name |
| 413 | ; hyper-relation |
| 414 | ; { |
| 415 | ; k-regex ^(<>*)<KEY><>{1,3}$ |
| 416 | ; k-expand \\1 |
| 417 | ; h-relation is-prefix-of |
| 418 | ; p-regex ^(<>*)$ |
| 419 | ; p-expand \\1 |
| 420 | ; } |
| 421 | ; } |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 422 | ; } |
| 423 | ; } |
| 424 | ; trust-anchor |
| 425 | ; { |
| 426 | ; type file |
Junxiao Shi | 6aecc50 | 2021-02-07 13:11:56 -0700 | [diff] [blame] | 427 | ; ; certificate path, relative to this config file |
| 428 | ; file-name keys/default.ndncert |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 429 | ; } |
Junxiao Shi | 6aecc50 | 2021-02-07 13:11:56 -0700 | [diff] [blame] | 430 | ; ; trust-anchor entry may be repeated to specify multiple trust anchors |
Alexander Afanasyev | 89cf5e0 | 2014-04-17 12:08:57 -0700 | [diff] [blame] | 431 | ; } |
Yanbiao Li | c17de83 | 2014-11-21 17:51:45 -0800 | [diff] [blame] | 432 | |
Yanbiao Li | b9d439d | 2014-12-11 16:12:32 -0800 | [diff] [blame] | 433 | ; The following localhop_security should be enabled when NFD runs on a hub, |
| 434 | ; which accepts all remote registrations and is a short-term solution. |
| 435 | ; localhop_security |
| 436 | ; { |
| 437 | ; trust-anchor |
| 438 | ; { |
| 439 | ; type any |
| 440 | ; } |
| 441 | ; } |
| 442 | |
Teng Liang | 18c2b29 | 2019-10-18 14:31:04 -0700 | [diff] [blame] | 443 | ; The following prefix_announcement_validation accepts any prefix announcement |
| 444 | prefix_announcement_validation |
| 445 | { |
| 446 | trust-anchor |
| 447 | { |
| 448 | type any |
| 449 | } |
| 450 | } |
| 451 | |
Yanbiao Li | d7c9636 | 2015-01-30 23:58:24 -0800 | [diff] [blame] | 452 | auto_prefix_propagate |
Yanbiao Li | c17de83 | 2014-11-21 17:51:45 -0800 | [diff] [blame] | 453 | { |
| 454 | cost 15 ; forwarding cost of prefix registered on remote router |
Yanbiao Li | d7c9636 | 2015-01-30 23:58:24 -0800 | [diff] [blame] | 455 | timeout 10000 ; timeout (in milliseconds) of prefix registration command for propagation |
Yanbiao Li | c17de83 | 2014-11-21 17:51:45 -0800 | [diff] [blame] | 456 | |
Yanbiao Li | d7c9636 | 2015-01-30 23:58:24 -0800 | [diff] [blame] | 457 | refresh_interval 300 ; interval (in seconds) before refreshing the propagation |
Yanbiao Li | c17de83 | 2014-11-21 17:51:45 -0800 | [diff] [blame] | 458 | ; This setting should be less than face_system.udp.idle_time, |
| 459 | ; so that the face is kept alive on the remote router. |
Yanbiao Li | d7c9636 | 2015-01-30 23:58:24 -0800 | [diff] [blame] | 460 | |
| 461 | base_retry_wait 50 ; base wait time (in seconds) before retrying propagation |
| 462 | max_retry_wait 3600 ; maximum wait time (in seconds) before retrying propagation |
| 463 | ; for consequent retries, the wait time before each retry is calculated based on the back-off |
| 464 | ; policy. Initially, the wait time is set to base_retry_wait, then it will be doubled for every |
| 465 | ; retry unless beyond the max_retry_wait, in which case max_retry_wait is set as the wait time. |
Yanbiao Li | c17de83 | 2014-11-21 17:51:45 -0800 | [diff] [blame] | 466 | } |
Nick Gordon | 9fcf123 | 2017-03-10 22:30:20 +0000 | [diff] [blame] | 467 | |
| 468 | ; If enabled, routes registered with origin=client (typically from auto_prefix_propagate) |
| 469 | ; will be readvertised into local NLSR daemon. |
| 470 | readvertise_nlsr no |
Alexander Afanasyev | 89cf5e0 | 2014-04-17 12:08:57 -0700 | [diff] [blame] | 471 | } |