blob: d309796261ccebe56753e53268d5df526a6415f9 [file] [log] [blame]
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -07001; The general section contains settings of nfd process.
Alexander Afanasyev34412062014-08-25 12:35:54 -07002general
3{
Davide Pesavento59a01812019-02-09 19:14:02 -05004 ; 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.
Alexander Afanasyevcc5661e2015-01-28 11:52:10 -08007 user ndn
8 group ndn
Alexander Afanasyev34412062014-08-25 12:35:54 -07009}
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -070010
11log
12{
13 ; default_level specifies the logging level for modules
14 ; that are not explicitly named. All debugging levels
15 ; listed above the selected value are enabled.
16 ;
17 ; Valid values:
18 ;
19 ; NONE ; no messages
20 ; ERROR ; error messages
21 ; WARN ; warning messages
22 ; INFO ; informational messages (default)
23 ; DEBUG ; debugging messages
24 ; TRACE ; trace messages (most verbose)
25 ; ALL ; all messages
26
27 default_level INFO
28
29 ; You may override default_level by assigning a logging level
30 ; to the desired module name. Module names can be found in two ways:
31 ;
32 ; Run:
33 ; nfd --modules
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -070034 ;
Davide Pesavento59a01812019-02-09 19:14:02 -050035 ; Or look for NFD_LOG_INIT(<module name>) statements in source files.
36 ; Note that the "nfd." prefix can be omitted.
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -070037 ;
38 ; Example module-level settings:
39 ;
40 ; FibManager DEBUG
41 ; Forwarder INFO
42}
43
Alexander Afanasyev34412062014-08-25 12:35:54 -070044; The tables section configures the CS, PIT, FIB, Strategy Choice, and Measurements
45tables
46{
Alexander Afanasyev34412062014-08-25 12:35:54 -070047 ; ContentStore size limit in number of packets
48 ; default is 65536, about 500MB with 8KB packet size
49 cs_max_packets 65536
Alexander Afanasyev3a902892015-12-30 22:42:20 +000050
Davide Pesavento59a01812019-02-09 19:14:02 -050051 ; Set the CS replacement policy.
52 ; Available policies are: priority_fifo, lru
53 cs_policy lru
54
55 ; Set a policy to decide whether to cache or drop unsolicited Data.
56 ; Available policies are: drop-all, admit-local, admit-network, admit-all
57 cs_unsolicited_policy drop-all
58
Alexander Afanasyev3a902892015-12-30 22:42:20 +000059 ; Set the forwarding strategy for the specified prefixes:
60 ; <prefix> <strategy>
61 strategy_choice
62 {
63 / /localhost/nfd/strategy/best-route
64 /localhost /localhost/nfd/strategy/multicast
65 /localhost/nfd /localhost/nfd/strategy/best-route
66 /ndn/broadcast /localhost/nfd/strategy/multicast
67 }
68
69 ; Declare network region names
70 ; These are used for mobility support. An Interest carrying a Link object is
71 ; assumed to have reached the producer region if any delegation name in the
72 ; Link object is a prefix of any region name.
73 network_region
74 {
75 ; /example/region1
76 ; /example/region2
77 }
Alexander Afanasyev34412062014-08-25 12:35:54 -070078}
79
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -070080; The face_system section defines what faces and channels are created.
81face_system
82{
Davide Pesavento59a01812019-02-09 19:14:02 -050083 ; This section contains options that apply to multiple face protocols.
84 general
85 {
86 ; Set to 'no' to disable congestion marking on supported faces, default 'yes'
87 enable_congestion_marking yes
88 }
89
90 ; The unix section contains settings for Unix stream faces and channels.
91 ; A Unix channel is always listening; delete the unix section to disable
Alexander Afanasyev3a902892015-12-30 22:42:20 +000092 ; Unix stream faces and channels.
93 ;
Davide Pesavento59a01812019-02-09 19:14:02 -050094 ; The ndn-cxx library expects unix:///var/run/nfd.sock to be used as
95 ; the default transport option. Please change the "transport" field
96 ; in client.conf to an appropriate tcp4 FaceUri if you want to
97 ; disable Unix sockets and use TCP instead.
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -070098 unix
99 {
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000100 path /var/run/nfd.sock ; Unix stream listener path
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700101 }
102
Davide Pesavento59a01812019-02-09 19:14:02 -0500103 ; The tcp section contains settings for TCP faces and channels.
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700104 tcp
105 {
106 listen yes ; set to 'no' to disable TCP listener, default 'yes'
107 port 6363 ; TCP listener port number
108 enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes'
109 enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes'
Davide Pesavento59a01812019-02-09 19:14:02 -0500110
111 ; A TCP face has local scope if the local and remote IP addresses match the whitelist but not the blacklist
112 local
113 {
114 whitelist
115 {
116 subnet 127.0.0.0/8
117 subnet ::1/128
118 }
119 blacklist
120 {
121 }
122 }
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700123 }
124
Davide Pesavento59a01812019-02-09 19:14:02 -0500125 ; The udp section contains settings for UDP faces and channels.
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700126 udp
127 {
Davide Pesavento59a01812019-02-09 19:14:02 -0500128 ; UDP unicast settings.
129 listen yes ; set to 'no' to disable UDP listener, default 'yes'
130 port 6363 ; UDP listener port number
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700131 enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes'
132 enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes'
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000133
Davide Pesavento59a01812019-02-09 19:14:02 -0500134 ; Time (in seconds) before closing an idle UDP unicast face.
135 ; The actual timeout will occur anytime between idle_timeout and 2*idle_timeout.
136 ; The default is 600 (10 minutes).
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000137 idle_timeout 600
138
Davide Pesavento59a01812019-02-09 19:14:02 -0500139 ; UDP multicast settings.
140 ; By default, NFD creates one UDP multicast face per NIC.
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700141 mcast yes ; set to 'no' to disable UDP multicast, default 'yes'
Davide Pesavento59a01812019-02-09 19:14:02 -0500142 mcast_group 224.0.23.170 ; UDP multicast group (IPv4)
143 mcast_port 56363 ; UDP multicast port number (IPv4)
144 mcast_group_v6 ff02::1234 ; UDP multicast group (IPv6)
145 mcast_port_v6 56363 ; UDP multicast port number (IPv6)
146 mcast_ad_hoc no ; set to 'yes' to make all UDP multicast faces "ad hoc", default 'no'
147
148 ; Whitelist and blacklist can contain, in no particular order:
149 ; - interface names, including wildcard patterns (e.g., 'ifname eth0', 'ifname en*', 'ifname wlp?s0')
150 ; - MAC addresses (e.g., 'ether 85:3b:4d:d3:5f:c2')
151 ; - IPv4 subnets (e.g., 'subnet 192.0.2.0/24')
152 ; - IPv6 subnets (e.g., 'subnet 2001:db8::/32')
153 ; - a single asterisk ('*') that matches all interfaces
154 ; By default, all interfaces are whitelisted.
155 whitelist
156 {
157 *
158 }
159 blacklist
160 {
161 }
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700162 }
163
Davide Pesavento59a01812019-02-09 19:14:02 -0500164 ; The ether section contains settings for Ethernet faces and channels.
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700165 ether
166 {
Davide Pesavento59a01812019-02-09 19:14:02 -0500167 ; Ethernet unicast settings.
168 listen yes ; set to 'no' to disable Ethernet listener, default 'yes'
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000169
Davide Pesavento59a01812019-02-09 19:14:02 -0500170 ; Time (in seconds) before closing an idle Ethernet unicast face.
171 ; The actual timeout will occur anytime between idle_timeout and 2*idle_timeout.
172 ; The default is 600 (10 minutes).
173 idle_timeout 600
174
175 ; Ethernet multicast settings.
176 ; By default, NFD creates one Ethernet multicast face per NIC.
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700177 mcast yes ; set to 'no' to disable Ethernet multicast, default 'yes'
178 mcast_group 01:00:5E:00:17:AA ; Ethernet multicast group
Davide Pesavento59a01812019-02-09 19:14:02 -0500179 mcast_ad_hoc no ; set to 'yes' to make all Ethernet multicast faces "ad hoc", default 'no'
180
181 ; Whitelist and blacklist can contain, in no particular order:
182 ; - interface names, including wildcard patterns (e.g., 'ifname eth0', 'ifname en*', 'ifname wlp?s0')
183 ; - MAC addresses (e.g., 'ether 85:3b:4d:d3:5f:c2')
184 ; - IPv4 subnets (e.g., 'subnet 192.0.2.0/24')
185 ; - IPv6 subnets (e.g., 'subnet 2001:db8::/32')
186 ; - a single asterisk ('*') that matches all interfaces
187 ; By default, all interfaces are whitelisted.
188 whitelist
189 {
190 *
191 }
192 blacklist
193 {
194 }
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700195 }
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000196
Davide Pesavento59a01812019-02-09 19:14:02 -0500197 ; The websocket section contains settings for WebSocket faces and channels.
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000198 websocket
199 {
200 listen yes ; set to 'no' to disable WebSocket listener, default 'yes'
201 port 9696 ; WebSocket listener port number
202 enable_v4 yes ; set to 'no' to disable listening on IPv4 socket, default 'yes'
203 enable_v6 yes ; set to 'no' to disable listening on IPv6 socket, default 'yes'
204 }
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700205}
206
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000207; The authorizations section grants privileges to authorized keys.
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700208authorizations
209{
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000210 ; An authorize section grants privileges to a NDN certificate.
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700211 authorize
212 {
Alexander Afanasyev790bb212015-03-15 19:19:25 -0700213 certfile certs/localhost_daemons_nfd.ndncert
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700214 privileges
215 {
Davide Pesavento59a01812019-02-09 19:14:02 -0500216 faces
217 fib
218 cs
219 strategy-choice
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700220 }
221 }
222
223 authorize
224 {
Davide Pesavento59a01812019-02-09 19:14:02 -0500225 certfile any ; "any" authorizes command interests signed under any certificate,
226 ; i.e., no actual validation.
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700227 privileges
228 {
Davide Pesavento59a01812019-02-09 19:14:02 -0500229 faces
230 cs
231 strategy-choice
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700232 }
233 }
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000234
235 ; You may have multiple authorize sections that specify additional
236 ; certificates and their privileges.
237
238 ; authorize
239 ; {
240 ; certfile keys/this_cert_does_not_exist.ndncert
241 ; authorize
242 ; privileges
243 ; {
244 ; faces
245 ; }
246 ; }
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700247}
248
249rib
250{
251 ; The following localhost_security allows anyone to register routing entries in local RIB
252 localhost_security
253 {
254 trust-anchor
255 {
256 type any
257 }
258 }
259
260 ; localhop_security should be enabled when NFD runs on a hub.
261 ; "/localhop/nfd/fib" command prefix will be disabled when localhop_security section is missing.
262 ; localhop_security
263 ; {
264 ; ; This section defines the trust model for NFD RIB Management. It consists of rules and
265 ; ; trust-anchors, which are briefly defined in this file. For more information refer to
Davide Pesavento59a01812019-02-09 19:14:02 -0500266 ; ; validator configuration file format documentation:
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700267 ; ;
Davide Pesavento59a01812019-02-09 19:14:02 -0500268 ; ; https://named-data.net/doc/ndn-cxx/current/tutorials/security-validator-config.html
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700269 ; ;
270 ; ; A trust-anchor is a pre-trusted certificate. This can be any certificate that is the
271 ; ; root of certification chain (e.g., NDN testbed root certificate) or an existing
272 ; ; default system certificate `default.ndncert`.
273 ; ;
274 ; ; A rule defines conditions a valid packet MUST have. A packet must satisfy one of the
275 ; ; rules defined here. A rule can be broken into two parts: matching & checking. A packet
276 ; ; will be matched against rules from the first to the last until a matched rule is
277 ; ; encountered. The matched rule will be used to check the packet. If a packet does not
278 ; ; match any rule, it will be treated as invalid. The matching part of a rule consists
279 ; ; of `for` and `filter` sections. They collectively define which packets can be checked
280 ; ; with this rule. `for` defines packet type (data or interest) and `filter` defines
281 ; ; conditions on other properties of a packet. Right now, you can only define conditions
282 ; ; on packet name, and you can only specify ONLY ONE filter for packet name. The
283 ; ; checking part of a rule consists of `checker`, which defines the conditions that a
284 ; ; VALID packet MUST have. See comments in checker section for more details.
285 ;
286 ; rule
287 ; {
Davide Pesavento59a01812019-02-09 19:14:02 -0500288 ; id "RIB Registration Command Rule"
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700289 ; for interest ; rule for Interests (to validate CommandInterests)
290 ; filter
291 ; {
Davide Pesavento59a01812019-02-09 19:14:02 -0500292 ; type name ; condition on interest name (w/o SignatureInfo/SignatureValue)
293 ; regex ^[<localhop><localhost>]<nfd><rib>[<register><unregister>]<><><>$
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700294 ; }
295 ; checker
296 ; {
297 ; type customized
298 ; sig-type rsa-sha256 ; interest must have a rsa-sha256 signature
299 ; key-locator
300 ; {
301 ; type name ; key locator must be the certificate name of the
302 ; ; signing key
Davide Pesavento59a01812019-02-09 19:14:02 -0500303 ; regex ^<>*<KEY><>$
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700304 ; }
305 ; }
306 ; }
307 ; rule
308 ; {
309 ; id "NDN Testbed Hierarchy Rule"
310 ; for data ; rule for Data (to validate NDN certificates)
311 ; filter
312 ; {
313 ; type name ; condition on data name
Davide Pesavento59a01812019-02-09 19:14:02 -0500314 ; regex ^<>*<KEY><><><>$
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700315 ; }
316 ; checker
317 ; {
318 ; type hierarchical ; the certificate name of the signing key and
319 ; ; the data name must follow the hierarchical model
320 ; sig-type rsa-sha256 ; data must have a rsa-sha256 signature
321 ; }
322 ; }
323 ; trust-anchor
324 ; {
325 ; type file
326 ; file-name keys/default.ndncert ; the file name, by default this file should be placed in the
327 ; ; same folder as this config file.
328 ; }
329 ; ; trust-anchor ; Can be repeated multiple times to specify multiple trust anchors
330 ; ; {
331 ; ; type file
332 ; ; file-name keys/ndn-testbed.ndncert
333 ; ; }
334 ; }
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000335
Alexander Afanasyevcc5661e2015-01-28 11:52:10 -0800336 ; The following localhop_security should be enabled when NFD runs on a hub,
337 ; which accepts all remote registrations and is a short-term solution.
338 ; localhop_security
339 ; {
340 ; trust-anchor
341 ; {
342 ; type any
343 ; }
344 ; }
345
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000346 auto_prefix_propagate
Alexander Afanasyevcc5661e2015-01-28 11:52:10 -0800347 {
348 cost 15 ; forwarding cost of prefix registered on remote router
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000349 timeout 10000 ; timeout (in milliseconds) of prefix registration command for propagation
Alexander Afanasyevcc5661e2015-01-28 11:52:10 -0800350
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000351 refresh_interval 300 ; interval (in seconds) before refreshing the propagation
Alexander Afanasyevcc5661e2015-01-28 11:52:10 -0800352 ; This setting should be less than face_system.udp.idle_time,
353 ; so that the face is kept alive on the remote router.
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000354
355 base_retry_wait 50 ; base wait time (in seconds) before retrying propagation
356 max_retry_wait 3600 ; maximum wait time (in seconds) before retrying propagation
357 ; for consequent retries, the wait time before each retry is calculated based on the back-off
358 ; policy. Initially, the wait time is set to base_retry_wait, then it will be doubled for every
359 ; retry unless beyond the max_retry_wait, in which case max_retry_wait is set as the wait time.
Alexander Afanasyevcc5661e2015-01-28 11:52:10 -0800360 }
Davide Pesavento59a01812019-02-09 19:14:02 -0500361
362 ; If enabled, routes registered with origin=client (typically from auto_prefix_propagate)
363 ; will be readvertised into local NLSR daemon.
364 readvertise_nlsr no
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700365}