blob: 2ae5f84ac0af59e89435c7d124fb35f4a82d580c [file] [log] [blame]
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -06001; The general section contains settings of nfd process.
Steve DiBenedetto24b9a642014-04-07 15:45:39 -06002general
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 DiBenedetto84da5bf2014-03-11 14:51:29 -060011
Steve DiBenedettobf6a93d2014-03-21 14:03:02 -060012log
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 Afanasyev885a85b2014-04-12 21:01:13 -070028 default_level INFO
Steve DiBenedettobf6a93d2014-03-21 14:03:02 -060029
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 ;
36 ; Or look for NFD_LOG_INIT(<module name>) statements in .cpp files
37 ;
38 ; Example module-level settings:
39 ;
40 ; FibManager DEBUG
41 ; Forwarder INFO
42}
43
Steve DiBenedetto3a4f83d2014-06-02 14:58:54 -060044; The tables section configures the CS, PIT, FIB, Strategy Choice, and Measurements
45tables
46{
Steve DiBenedetto3a4f83d2014-06-02 14:58:54 -060047 ; ContentStore size limit in number of packets
48 ; default is 65536, about 500MB with 8KB packet size
49 cs_max_packets 65536
Steve DiBenedettoc0640f52014-11-03 15:55:43 -070050
Junxiao Shib4a5acd2016-12-07 19:59:18 +000051 ; Set the CS replacement policy.
52 ; Available policies are: priority_fifo, lru
53 cs_policy priority_fifo
54
Junxiao Shi9685cc52016-08-29 12:47:05 +000055 ; Set a policy to decide whether to cache or drop unsolicited Data.
56 ; Available policies are: drop-all, admit-local, admit-network, admit-all
Junxiao Shi88f5f732016-09-03 07:11:37 +000057 cs_unsolicited_policy drop-all
Junxiao Shi9685cc52016-08-29 12:47:05 +000058
Steve DiBenedettoc0640f52014-11-03 15:55:43 -070059 ; Set the forwarding strategy for the specified prefixes:
60 ; <prefix> <strategy>
61 strategy_choice
62 {
63 / /localhost/nfd/strategy/best-route
Junxiao Shi67ba8d22015-08-21 21:21:28 -070064 /localhost /localhost/nfd/strategy/multicast
Steve DiBenedettoc0640f52014-11-03 15:55:43 -070065 /localhost/nfd /localhost/nfd/strategy/best-route
Junxiao Shi67ba8d22015-08-21 21:21:28 -070066 /ndn/broadcast /localhost/nfd/strategy/multicast
Steve DiBenedettoc0640f52014-11-03 15:55:43 -070067 }
Vince Lehman63ab1bb2015-09-04 17:06:58 -050068
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 }
Steve DiBenedetto3a4f83d2014-06-02 14:58:54 -060078}
79
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -060080; The face_system section defines what faces and channels are created.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060081face_system
82{
Steve DiBenedettodbcb1a12014-11-17 11:04:21 -070083 ; The unix section contains settings of Unix stream faces and channels.
Davide Pesavento46afec42017-05-28 14:28:47 -040084 ; A Unix channel is always listening; delete the unix section to disable
Steve DiBenedettodbcb1a12014-11-17 11:04:21 -070085 ; Unix stream faces and channels.
Steve DiBenedetto158f73f2014-12-22 14:46:12 -070086 ;
Davide Pesavento46afec42017-05-28 14:28:47 -040087 ; The ndn-cxx library expects unix:///var/run/nfd.sock to be used as
88 ; the default transport option. Please change the "transport" field
89 ; in client.conf to an appropriate tcp4 FaceUri if you want to
90 ; disable Unix sockets and use TCP instead.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060091 unix
92 {
Steve DiBenedettodbcb1a12014-11-17 11:04:21 -070093 path /var/run/nfd.sock ; Unix stream listener path
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060094 }
95
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -060096 ; The tcp section contains settings of TCP faces and channels.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060097 tcp
98 {
99 listen yes ; set to 'no' to disable TCP listener, default 'yes'
100 port 6363 ; TCP listener port number
Steve DiBenedetto95152872014-04-11 12:40:59 -0600101 enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes'
102 enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes'
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600103 }
104
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600105 ; The udp section contains settings of UDP faces and channels.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600106 udp
107 {
Davide Pesavento46afec42017-05-28 14:28:47 -0400108 ; UDP unicast settings.
109 ; UDP channels are always listening; delete the udp section to disable them
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600110 port 6363 ; UDP unicast port number
Steve DiBenedetto95152872014-04-11 12:40:59 -0600111 enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes'
112 enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes'
Chengyu Fanaddecff2015-02-10 14:09:01 -0700113
Davide Pesavento46afec42017-05-28 14:28:47 -0400114 ; Time (in seconds) before closing an idle UDP unicast face.
115 ; The actual timeout will occur anytime between idle_timeout and 2*idle_timeout.
116 ; The default is 600 (10 minutes).
Chengyu Fanaddecff2015-02-10 14:09:01 -0700117 idle_timeout 600
118
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600119 keep_alive_interval 25; interval (seconds) between keep-alive refreshes
120
Davide Pesavento46afec42017-05-28 14:28:47 -0400121 ; UDP multicast settings.
122 ; By default, NFD creates one UDP multicast face per NIC.
Giulio Grassi6d7176d2014-04-16 16:08:48 +0200123 ;
124 ; In multi-homed Linux machines these settings will NOT work without
Davide Pesavento46afec42017-05-28 14:28:47 -0400125 ; root or setting the appropriate permissions:
Giulio Grassi6d7176d2014-04-16 16:08:48 +0200126 ;
Davide Pesavento46afec42017-05-28 14:28:47 -0400127 ; sudo setcap cap_net_raw=eip /path/to/nfd
Giulio Grassi6d7176d2014-04-16 16:08:48 +0200128 ;
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700129 mcast yes ; set to 'no' to disable UDP multicast, default 'yes'
Md Ashiqur Rahman8ce09032018-01-14 22:43:13 -0500130 mcast_group 224.0.23.170 ; UDP multicast group (IPv4)
131 mcast_port 56363 ; UDP multicast port number (IPv4)
132 mcast_group_v6 ff02::1234 ; UDP multicast group (IPv6)
133 mcast_port_v6 56363 ; UDP multicast port number (IPv6)
Davide Pesavento46afec42017-05-28 14:28:47 -0400134 mcast_ad_hoc no ; set to 'yes' to make all UDP multicast faces "ad hoc", default 'no'
Junxiao Shic31080d2017-01-24 15:10:12 +0000135
136 ; Whitelist and blacklist can contain, in no particular order:
Davide Pesavento46afec42017-05-28 14:28:47 -0400137 ; - interface names, including wildcard patterns (e.g., 'ifname eth0', 'ifname en*', 'ifname wlp?s0')
138 ; - mac addresses (e.g., 'ether 85:3b:4d:d3:5f:c2')
139 ; - subnets (e.g., 'subnet 192.0.2.0/24', note that only IPv4 is supported here)
140 ; - a single asterisk ('*') that matches all interfaces
141 ; By default, all interfaces are whitelisted.
Junxiao Shic31080d2017-01-24 15:10:12 +0000142 whitelist
143 {
144 *
145 }
146 blacklist
147 {
148 }
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600149 }
150
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600151 ; The ether section contains settings of Ethernet faces and channels.
152 ; These settings will NOT work without root or setting the appropriate
153 ; permissions:
154 ;
Davide Pesavento46afec42017-05-28 14:28:47 -0400155 ; sudo setcap cap_net_raw,cap_net_admin=eip /path/to/nfd
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600156 ;
157 ; You may need to install a package to use setcap:
158 ;
159 ; **Ubuntu:**
160 ;
161 ; sudo apt-get install libcap2-bin
162 ;
163 ; **Mac OS X:**
164 ;
165 ; curl https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -o ChmodBPF.tar.gz
166 ; tar zxvf ChmodBPF.tar.gz
167 ; open ChmodBPF/Install\ ChmodBPF.app
168 ;
169 ; or manually:
170 ;
171 ; sudo chgrp admin /dev/bpf*
172 ; sudo chmod g+rw /dev/bpf*
susmit91e1d7c2016-10-03 16:16:57 -0600173 ;
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700174 @IF_HAVE_LIBPCAP@ether
175 @IF_HAVE_LIBPCAP@{
Davide Pesavento46afec42017-05-28 14:28:47 -0400176 @IF_HAVE_LIBPCAP@ ; Ethernet unicast settings.
177 @IF_HAVE_LIBPCAP@ listen yes ; set to 'no' to disable Ethernet listener, default 'yes'
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700178 @IF_HAVE_LIBPCAP@
Davide Pesavento46afec42017-05-28 14:28:47 -0400179 @IF_HAVE_LIBPCAP@ ; Time (in seconds) before closing an idle Ethernet unicast face.
180 @IF_HAVE_LIBPCAP@ ; The actual timeout will occur anytime between idle_timeout and 2*idle_timeout.
181 @IF_HAVE_LIBPCAP@ ; The default is 600 (10 minutes).
182 @IF_HAVE_LIBPCAP@ idle_timeout 600
183 @IF_HAVE_LIBPCAP@
184 @IF_HAVE_LIBPCAP@ ; Ethernet multicast settings.
185 @IF_HAVE_LIBPCAP@ ; By default, NFD creates one Ethernet multicast face per NIC.
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700186 @IF_HAVE_LIBPCAP@ mcast yes ; set to 'no' to disable Ethernet multicast, default 'yes'
187 @IF_HAVE_LIBPCAP@ mcast_group 01:00:5E:00:17:AA ; Ethernet multicast group
Davide Pesavento46afec42017-05-28 14:28:47 -0400188 @IF_HAVE_LIBPCAP@ mcast_ad_hoc no ; set to 'yes' to make all Ethernet multicast faces "ad hoc", default 'no'
susmit91e1d7c2016-10-03 16:16:57 -0600189 @IF_HAVE_LIBPCAP@
Junxiao Shic31080d2017-01-24 15:10:12 +0000190 @IF_HAVE_LIBPCAP@ ; Whitelist and blacklist can contain, in no particular order:
Davide Pesavento46afec42017-05-28 14:28:47 -0400191 @IF_HAVE_LIBPCAP@ ; - interface names, including wildcard patterns (e.g., 'ifname eth0', 'ifname en*', 'ifname wlp?s0')
192 @IF_HAVE_LIBPCAP@ ; - mac addresses (e.g., 'ether 85:3b:4d:d3:5f:c2')
193 @IF_HAVE_LIBPCAP@ ; - subnets (e.g., 'subnet 192.0.2.0/24', note that only IPv4 is supported here)
194 @IF_HAVE_LIBPCAP@ ; - a single asterisk ('*') that matches all interfaces
195 @IF_HAVE_LIBPCAP@ ; By default, all interfaces are whitelisted.
susmit91e1d7c2016-10-03 16:16:57 -0600196 @IF_HAVE_LIBPCAP@ whitelist
197 @IF_HAVE_LIBPCAP@ {
198 @IF_HAVE_LIBPCAP@ *
199 @IF_HAVE_LIBPCAP@ }
200 @IF_HAVE_LIBPCAP@ blacklist
201 @IF_HAVE_LIBPCAP@ {
202 @IF_HAVE_LIBPCAP@ }
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700203 @IF_HAVE_LIBPCAP@}
Wentao Shang53df1632014-04-21 12:01:32 -0700204
205 ; The websocket section contains settings of WebSocket faces and channels.
Wentao Shang53df1632014-04-21 12:01:32 -0700206 @IF_HAVE_WEBSOCKET@websocket
207 @IF_HAVE_WEBSOCKET@{
208 @IF_HAVE_WEBSOCKET@ listen yes ; set to 'no' to disable WebSocket listener, default 'yes'
209 @IF_HAVE_WEBSOCKET@ port 9696 ; WebSocket listener port number
210 @IF_HAVE_WEBSOCKET@ enable_v4 yes ; set to 'no' to disable listening on IPv4 socket, default 'yes'
211 @IF_HAVE_WEBSOCKET@ enable_v6 yes ; set to 'no' to disable listening on IPv6 socket, default 'yes'
212 @IF_HAVE_WEBSOCKET@}
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600213}
214
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600215; The authorizations section grants privileges to authorized keys.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600216authorizations
217{
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600218 ; An authorize section grants privileges to a NDN certificate.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600219 authorize
220 {
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600221 ; If you do not already have NDN certificate, you can generate
222 ; one with the following commands.
223 ;
224 ; 1. Generate and install a self-signed identity certificate:
225 ;
226 ; ndnsec-keygen /`whoami` | ndnsec-install-cert -
227 ;
228 ; Note that the argument to ndnsec-key will be the identity name of the
229 ; new key (in this case, /your-username). Identities are hierarchical NDN
230 ; names and may have multiple components (e.g. `/ndn/ucla/edu/alice`).
231 ; You may create additional keys and identities as you see fit.
232 ;
233 ; 2. Dump the NDN certificate to a file:
234 ;
235 ; sudo mkdir -p @SYSCONFDIR@/ndn/keys/
236 ; ndnsec-cert-dump -i /`whoami` > default.ndncert
237 ; sudo mv default.ndncert @SYSCONFDIR@/ndn/keys/default.ndncert
238 ;
239 ; The "certfile" field below specifies the default key directory for
240 ; your machine. You may move your newly created key to the location it
241 ; specifies or path.
242
Yingdi Yuc8f214c2014-04-29 20:39:37 -0700243 ; certfile keys/default.ndncert ; NDN identity certificate file
244 certfile any ; "any" authorizes command interests signed under any certificate,
245 ; i.e., no actual validation.
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600246 privileges ; set of privileges granted to this identity
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600247 {
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600248 faces
249 fib
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600250 strategy-choice
251 }
252 }
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600253
254 ; You may have multiple authorize sections that specify additional
255 ; certificates and their privileges.
256
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700257 ; authorize
258 ; {
259 ; certfile keys/this_cert_does_not_exist.ndncert
260 ; authorize
261 ; privileges
262 ; {
263 ; faces
264 ; }
265 ; }
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600266}
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700267
Yingdi Yue5224e92014-04-29 18:04:02 -0700268rib
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700269{
Yingdi Yue5224e92014-04-29 18:04:02 -0700270 ; The following localhost_security allows anyone to register routing entries in local RIB
271 localhost_security
272 {
273 trust-anchor
274 {
275 type any
276 }
277 }
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700278
Yingdi Yue5224e92014-04-29 18:04:02 -0700279 ; localhop_security should be enabled when NFD runs on a hub.
280 ; "/localhop/nfd/fib" command prefix will be disabled when localhop_security section is missing.
281 ; localhop_security
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700282 ; {
Yingdi Yue5224e92014-04-29 18:04:02 -0700283 ; ; This section defines the trust model for NFD RIB Management. It consists of rules and
284 ; ; trust-anchors, which are briefly defined in this file. For more information refer to
Chavoosh Ghasemi60b7d512017-08-10 17:17:46 -0700285 ; ; validator configuration file format documentation:
Yingdi Yue5224e92014-04-29 18:04:02 -0700286 ; ;
Chavoosh Ghasemi60b7d512017-08-10 17:17:46 -0700287 ; ; https://named-data.net/doc/ndn-cxx/current/tutorials/security-validator-config.html
Yingdi Yue5224e92014-04-29 18:04:02 -0700288 ; ;
289 ; ; A trust-anchor is a pre-trusted certificate. This can be any certificate that is the
290 ; ; root of certification chain (e.g., NDN testbed root certificate) or an existing
291 ; ; default system certificate `default.ndncert`.
292 ; ;
293 ; ; A rule defines conditions a valid packet MUST have. A packet must satisfy one of the
294 ; ; rules defined here. A rule can be broken into two parts: matching & checking. A packet
295 ; ; will be matched against rules from the first to the last until a matched rule is
296 ; ; encountered. The matched rule will be used to check the packet. If a packet does not
297 ; ; match any rule, it will be treated as invalid. The matching part of a rule consists
298 ; ; of `for` and `filter` sections. They collectively define which packets can be checked
299 ; ; with this rule. `for` defines packet type (data or interest) and `filter` defines
300 ; ; conditions on other properties of a packet. Right now, you can only define conditions
301 ; ; on packet name, and you can only specify ONLY ONE filter for packet name. The
302 ; ; checking part of a rule consists of `checker`, which defines the conditions that a
303 ; ; VALID packet MUST have. See comments in checker section for more details.
304 ;
305 ; rule
306 ; {
Alexander Afanasyev38fb2512017-09-15 13:07:42 -0400307 ; id "RIB Registration Command Rule"
Yingdi Yue5224e92014-04-29 18:04:02 -0700308 ; for interest ; rule for Interests (to validate CommandInterests)
309 ; filter
310 ; {
Alexander Afanasyev38fb2512017-09-15 13:07:42 -0400311 ; type name ; condition on interest name (w/o SignatureInfo/SignatureValue)
312 ; regex ^[<localhop><localhost>]<nfd><rib>[<register><unregister>]<><><>$
Yingdi Yue5224e92014-04-29 18:04:02 -0700313 ; }
314 ; checker
315 ; {
316 ; type customized
317 ; sig-type rsa-sha256 ; interest must have a rsa-sha256 signature
318 ; key-locator
319 ; {
320 ; type name ; key locator must be the certificate name of the
321 ; ; signing key
Alexander Afanasyev38fb2512017-09-15 13:07:42 -0400322 ; regex ^<>*<KEY><>$
Yingdi Yue5224e92014-04-29 18:04:02 -0700323 ; }
324 ; }
325 ; }
326 ; rule
327 ; {
328 ; id "NDN Testbed Hierarchy Rule"
329 ; for data ; rule for Data (to validate NDN certificates)
330 ; filter
331 ; {
332 ; type name ; condition on data name
Alexander Afanasyev38fb2512017-09-15 13:07:42 -0400333 ; regex ^<>*<KEY><><><>$
Yingdi Yue5224e92014-04-29 18:04:02 -0700334 ; }
335 ; checker
336 ; {
337 ; type hierarchical ; the certificate name of the signing key and
338 ; ; the data name must follow the hierarchical model
339 ; sig-type rsa-sha256 ; data must have a rsa-sha256 signature
340 ; }
341 ; }
342 ; trust-anchor
343 ; {
344 ; type file
345 ; file-name keys/default.ndncert ; the file name, by default this file should be placed in the
346 ; ; same folder as this config file.
347 ; }
348 ; ; trust-anchor ; Can be repeated multiple times to specify multiple trust anchors
349 ; ; {
350 ; ; type file
351 ; ; file-name keys/ndn-testbed.ndncert
352 ; ; }
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700353 ; }
Yanbiao Lic17de832014-11-21 17:51:45 -0800354
Yanbiao Lib9d439d2014-12-11 16:12:32 -0800355 ; The following localhop_security should be enabled when NFD runs on a hub,
356 ; which accepts all remote registrations and is a short-term solution.
357 ; localhop_security
358 ; {
359 ; trust-anchor
360 ; {
361 ; type any
362 ; }
363 ; }
364
Yanbiao Lid7c96362015-01-30 23:58:24 -0800365 auto_prefix_propagate
Yanbiao Lic17de832014-11-21 17:51:45 -0800366 {
367 cost 15 ; forwarding cost of prefix registered on remote router
Yanbiao Lid7c96362015-01-30 23:58:24 -0800368 timeout 10000 ; timeout (in milliseconds) of prefix registration command for propagation
Yanbiao Lic17de832014-11-21 17:51:45 -0800369
Yanbiao Lid7c96362015-01-30 23:58:24 -0800370 refresh_interval 300 ; interval (in seconds) before refreshing the propagation
Yanbiao Lic17de832014-11-21 17:51:45 -0800371 ; This setting should be less than face_system.udp.idle_time,
372 ; so that the face is kept alive on the remote router.
Yanbiao Lid7c96362015-01-30 23:58:24 -0800373
374 base_retry_wait 50 ; base wait time (in seconds) before retrying propagation
375 max_retry_wait 3600 ; maximum wait time (in seconds) before retrying propagation
376 ; for consequent retries, the wait time before each retry is calculated based on the back-off
377 ; policy. Initially, the wait time is set to base_retry_wait, then it will be doubled for every
378 ; retry unless beyond the max_retry_wait, in which case max_retry_wait is set as the wait time.
Yanbiao Lic17de832014-11-21 17:51:45 -0800379 }
Nick Gordon9fcf1232017-03-10 22:30:20 +0000380
381 ; If enabled, routes registered with origin=client (typically from auto_prefix_propagate)
382 ; will be readvertised into local NLSR daemon.
383 readvertise_nlsr no
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700384}