blob: 819e038b3d5182fe71f0c1961bf7621ccf15938c [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{
47
48 ; ContentStore size limit in number of packets
49 ; default is 65536, about 500MB with 8KB packet size
50 cs_max_packets 65536
Steve DiBenedettoc0640f52014-11-03 15:55:43 -070051
Junxiao Shib4a5acd2016-12-07 19:59:18 +000052 ; Set the CS replacement policy.
53 ; Available policies are: priority_fifo, lru
54 cs_policy priority_fifo
55
Junxiao Shi9685cc52016-08-29 12:47:05 +000056 ; Set a policy to decide whether to cache or drop unsolicited Data.
57 ; Available policies are: drop-all, admit-local, admit-network, admit-all
Junxiao Shi88f5f732016-09-03 07:11:37 +000058 cs_unsolicited_policy drop-all
Junxiao Shi9685cc52016-08-29 12:47:05 +000059
Steve DiBenedettoc0640f52014-11-03 15:55:43 -070060 ; Set the forwarding strategy for the specified prefixes:
61 ; <prefix> <strategy>
62 strategy_choice
63 {
64 / /localhost/nfd/strategy/best-route
Junxiao Shi67ba8d22015-08-21 21:21:28 -070065 /localhost /localhost/nfd/strategy/multicast
Steve DiBenedettoc0640f52014-11-03 15:55:43 -070066 /localhost/nfd /localhost/nfd/strategy/best-route
Junxiao Shi67ba8d22015-08-21 21:21:28 -070067 /ndn/broadcast /localhost/nfd/strategy/multicast
Steve DiBenedettoc0640f52014-11-03 15:55:43 -070068 }
Vince Lehman63ab1bb2015-09-04 17:06:58 -050069
70 ; Declare network region names
71 ; These are used for mobility support. An Interest carrying a Link object is
72 ; assumed to have reached the producer region if any delegation name in the
73 ; Link object is a prefix of any region name.
74 network_region
75 {
76 ; /example/region1
77 ; /example/region2
78 }
Steve DiBenedetto3a4f83d2014-06-02 14:58:54 -060079}
80
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -060081; The face_system section defines what faces and channels are created.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060082face_system
83{
Steve DiBenedettodbcb1a12014-11-17 11:04:21 -070084 ; The unix section contains settings of Unix stream faces and channels.
85 ; Unix channel is always listening; delete unix section to disable
86 ; Unix stream faces and channels.
Steve DiBenedetto158f73f2014-12-22 14:46:12 -070087 ;
88 ; The ndn-cxx library expects unix:///var/run/nfd.sock
89 ; to be used as the default transport option. Please change
90 ; the "transport" field in client.conf to an appropriate tcp4 FaceUri
91 ; if you need to disable unix sockets.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060092 unix
93 {
Steve DiBenedettodbcb1a12014-11-17 11:04:21 -070094 path /var/run/nfd.sock ; Unix stream listener path
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060095 }
96
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -060097 ; The tcp section contains settings of TCP faces and channels.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060098 tcp
99 {
100 listen yes ; set to 'no' to disable TCP listener, default 'yes'
101 port 6363 ; TCP listener port number
Steve DiBenedetto95152872014-04-11 12:40:59 -0600102 enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes'
103 enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes'
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600104 }
105
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600106 ; The udp section contains settings of UDP faces and channels.
Steve DiBenedetto95152872014-04-11 12:40:59 -0600107 ; UDP channel is always listening; delete udp section to disable UDP
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600108 udp
109 {
110 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
114 ; idle time (seconds) before closing a UDP unicast face, the actual timeout would be
115 ; anywhere within [idle_timeout, 2*idle_timeout), default is 600
116 idle_timeout 600
117
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600118 keep_alive_interval 25; interval (seconds) between keep-alive refreshes
119
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700120 ; UDP multicast settings
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600121 ; NFD creates one UDP multicast face per NIC
Giulio Grassi6d7176d2014-04-16 16:08:48 +0200122 ;
123 ; In multi-homed Linux machines these settings will NOT work without
124 ; root or settings the appropriate permissions:
125 ;
126 ; sudo setcap cap_net_raw=eip /full/path/nfd
127 ;
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700128 mcast yes ; set to 'no' to disable UDP multicast, default 'yes'
129 mcast_port 56363 ; UDP multicast port number
130 mcast_group 224.0.23.170 ; UDP multicast group (IPv4 only)
Junxiao Shic31080d2017-01-24 15:10:12 +0000131
132 ; Whitelist and blacklist can contain, in no particular order:
133 ; interface names (e.g., ifname eth0),
134 ; mac addresses (e.g., ether 85:3b:4d:d3:5f:c2),
135 ; subnets (e.g., subnet 192.0.2.0/24, note that only IPv4 is supported here),
136 ; or a wildcard (*) that matches all interfaces.
137
138 whitelist
139 {
140 *
141 }
142 blacklist
143 {
144 }
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600145 }
146
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600147 ; The ether section contains settings of Ethernet faces and channels.
148 ; These settings will NOT work without root or setting the appropriate
149 ; permissions:
150 ;
151 ; sudo setcap cap_net_raw,cap_net_admin=eip /full/path/nfd
152 ;
153 ; You may need to install a package to use setcap:
154 ;
155 ; **Ubuntu:**
156 ;
157 ; sudo apt-get install libcap2-bin
158 ;
159 ; **Mac OS X:**
160 ;
161 ; curl https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -o ChmodBPF.tar.gz
162 ; tar zxvf ChmodBPF.tar.gz
163 ; open ChmodBPF/Install\ ChmodBPF.app
164 ;
165 ; or manually:
166 ;
167 ; sudo chgrp admin /dev/bpf*
168 ; sudo chmod g+rw /dev/bpf*
susmit91e1d7c2016-10-03 16:16:57 -0600169 ;
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700170 @IF_HAVE_LIBPCAP@ether
171 @IF_HAVE_LIBPCAP@{
172 @IF_HAVE_LIBPCAP@ ; Ethernet multicast settings
173 @IF_HAVE_LIBPCAP@ ; NFD creates one Ethernet multicast face per NIC
174 @IF_HAVE_LIBPCAP@
175 @IF_HAVE_LIBPCAP@ mcast yes ; set to 'no' to disable Ethernet multicast, default 'yes'
176 @IF_HAVE_LIBPCAP@ mcast_group 01:00:5E:00:17:AA ; Ethernet multicast group
susmit91e1d7c2016-10-03 16:16:57 -0600177 @IF_HAVE_LIBPCAP@
Junxiao Shic31080d2017-01-24 15:10:12 +0000178 @IF_HAVE_LIBPCAP@ ; Whitelist and blacklist can contain, in no particular order:
susmit91e1d7c2016-10-03 16:16:57 -0600179 @IF_HAVE_LIBPCAP@ ; interface names (e.g., ifname eth0),
180 @IF_HAVE_LIBPCAP@ ; mac addresses (e.g., ether 85:3b:4d:d3:5f:c2),
181 @IF_HAVE_LIBPCAP@ ; subnets (e.g., subnet 192.0.2.0/24, note that only IPv4 is supported here),
182 @IF_HAVE_LIBPCAP@ ; or a wildcard (*) that matches all interfaces.
183 @IF_HAVE_LIBPCAP@
184 @IF_HAVE_LIBPCAP@ whitelist
185 @IF_HAVE_LIBPCAP@ {
186 @IF_HAVE_LIBPCAP@ *
187 @IF_HAVE_LIBPCAP@ }
188 @IF_HAVE_LIBPCAP@ blacklist
189 @IF_HAVE_LIBPCAP@ {
190 @IF_HAVE_LIBPCAP@ }
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700191 @IF_HAVE_LIBPCAP@}
Wentao Shang53df1632014-04-21 12:01:32 -0700192
193 ; The websocket section contains settings of WebSocket faces and channels.
Wentao Shang53df1632014-04-21 12:01:32 -0700194 @IF_HAVE_WEBSOCKET@websocket
195 @IF_HAVE_WEBSOCKET@{
196 @IF_HAVE_WEBSOCKET@ listen yes ; set to 'no' to disable WebSocket listener, default 'yes'
197 @IF_HAVE_WEBSOCKET@ port 9696 ; WebSocket listener port number
198 @IF_HAVE_WEBSOCKET@ enable_v4 yes ; set to 'no' to disable listening on IPv4 socket, default 'yes'
199 @IF_HAVE_WEBSOCKET@ enable_v6 yes ; set to 'no' to disable listening on IPv6 socket, default 'yes'
200 @IF_HAVE_WEBSOCKET@}
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600201}
202
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600203; The authorizations section grants privileges to authorized keys.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600204authorizations
205{
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600206 ; An authorize section grants privileges to a NDN certificate.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600207 authorize
208 {
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600209 ; If you do not already have NDN certificate, you can generate
210 ; one with the following commands.
211 ;
212 ; 1. Generate and install a self-signed identity certificate:
213 ;
214 ; ndnsec-keygen /`whoami` | ndnsec-install-cert -
215 ;
216 ; Note that the argument to ndnsec-key will be the identity name of the
217 ; new key (in this case, /your-username). Identities are hierarchical NDN
218 ; names and may have multiple components (e.g. `/ndn/ucla/edu/alice`).
219 ; You may create additional keys and identities as you see fit.
220 ;
221 ; 2. Dump the NDN certificate to a file:
222 ;
223 ; sudo mkdir -p @SYSCONFDIR@/ndn/keys/
224 ; ndnsec-cert-dump -i /`whoami` > default.ndncert
225 ; sudo mv default.ndncert @SYSCONFDIR@/ndn/keys/default.ndncert
226 ;
227 ; The "certfile" field below specifies the default key directory for
228 ; your machine. You may move your newly created key to the location it
229 ; specifies or path.
230
Yingdi Yuc8f214c2014-04-29 20:39:37 -0700231 ; certfile keys/default.ndncert ; NDN identity certificate file
232 certfile any ; "any" authorizes command interests signed under any certificate,
233 ; i.e., no actual validation.
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600234 privileges ; set of privileges granted to this identity
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600235 {
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600236 faces
237 fib
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600238 strategy-choice
239 }
240 }
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600241
242 ; You may have multiple authorize sections that specify additional
243 ; certificates and their privileges.
244
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700245 ; authorize
246 ; {
247 ; certfile keys/this_cert_does_not_exist.ndncert
248 ; authorize
249 ; privileges
250 ; {
251 ; faces
252 ; }
253 ; }
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600254}
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700255
Yingdi Yue5224e92014-04-29 18:04:02 -0700256rib
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700257{
Yingdi Yue5224e92014-04-29 18:04:02 -0700258 ; The following localhost_security allows anyone to register routing entries in local RIB
259 localhost_security
260 {
261 trust-anchor
262 {
263 type any
264 }
265 }
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700266
Yingdi Yue5224e92014-04-29 18:04:02 -0700267 ; localhop_security should be enabled when NFD runs on a hub.
268 ; "/localhop/nfd/fib" command prefix will be disabled when localhop_security section is missing.
269 ; localhop_security
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700270 ; {
Yingdi Yue5224e92014-04-29 18:04:02 -0700271 ; ; This section defines the trust model for NFD RIB Management. It consists of rules and
272 ; ; trust-anchors, which are briefly defined in this file. For more information refer to
273 ; ; manpage of ndn-validator.conf:
274 ; ;
275 ; ; man ndn-validator.conf
276 ; ;
277 ; ; A trust-anchor is a pre-trusted certificate. This can be any certificate that is the
278 ; ; root of certification chain (e.g., NDN testbed root certificate) or an existing
279 ; ; default system certificate `default.ndncert`.
280 ; ;
281 ; ; A rule defines conditions a valid packet MUST have. A packet must satisfy one of the
282 ; ; rules defined here. A rule can be broken into two parts: matching & checking. A packet
283 ; ; will be matched against rules from the first to the last until a matched rule is
284 ; ; encountered. The matched rule will be used to check the packet. If a packet does not
285 ; ; match any rule, it will be treated as invalid. The matching part of a rule consists
286 ; ; of `for` and `filter` sections. They collectively define which packets can be checked
287 ; ; with this rule. `for` defines packet type (data or interest) and `filter` defines
288 ; ; conditions on other properties of a packet. Right now, you can only define conditions
289 ; ; on packet name, and you can only specify ONLY ONE filter for packet name. The
290 ; ; checking part of a rule consists of `checker`, which defines the conditions that a
291 ; ; VALID packet MUST have. See comments in checker section for more details.
292 ;
293 ; rule
294 ; {
295 ; id "NRD Prefix Registration Command Rule"
296 ; for interest ; rule for Interests (to validate CommandInterests)
297 ; filter
298 ; {
299 ; type name ; condition on interest name (w/o signature)
Yingdi Yu676a55a2014-06-18 21:09:09 -0700300 ; regex ^[<localhop><localhost>]<nfd><rib>[<register><unregister>]<>$ ; prefix before
301 ; ; timestamp
Yingdi Yue5224e92014-04-29 18:04:02 -0700302 ; }
303 ; checker
304 ; {
305 ; type customized
306 ; sig-type rsa-sha256 ; interest must have a rsa-sha256 signature
307 ; key-locator
308 ; {
309 ; type name ; key locator must be the certificate name of the
310 ; ; signing key
311 ; regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT>$
312 ; }
313 ; }
314 ; }
315 ; rule
316 ; {
317 ; id "NDN Testbed Hierarchy Rule"
318 ; for data ; rule for Data (to validate NDN certificates)
319 ; filter
320 ; {
321 ; type name ; condition on data name
322 ; regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT><>$
323 ; }
324 ; checker
325 ; {
326 ; type hierarchical ; the certificate name of the signing key and
327 ; ; the data name must follow the hierarchical model
328 ; sig-type rsa-sha256 ; data must have a rsa-sha256 signature
329 ; }
330 ; }
331 ; trust-anchor
332 ; {
333 ; type file
334 ; file-name keys/default.ndncert ; the file name, by default this file should be placed in the
335 ; ; same folder as this config file.
336 ; }
337 ; ; trust-anchor ; Can be repeated multiple times to specify multiple trust anchors
338 ; ; {
339 ; ; type file
340 ; ; file-name keys/ndn-testbed.ndncert
341 ; ; }
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700342 ; }
Yanbiao Lic17de832014-11-21 17:51:45 -0800343
Yanbiao Lib9d439d2014-12-11 16:12:32 -0800344 ; The following localhop_security should be enabled when NFD runs on a hub,
345 ; which accepts all remote registrations and is a short-term solution.
346 ; localhop_security
347 ; {
348 ; trust-anchor
349 ; {
350 ; type any
351 ; }
352 ; }
353
Yanbiao Lid7c96362015-01-30 23:58:24 -0800354 auto_prefix_propagate
Yanbiao Lic17de832014-11-21 17:51:45 -0800355 {
356 cost 15 ; forwarding cost of prefix registered on remote router
Yanbiao Lid7c96362015-01-30 23:58:24 -0800357 timeout 10000 ; timeout (in milliseconds) of prefix registration command for propagation
Yanbiao Lic17de832014-11-21 17:51:45 -0800358
Yanbiao Lid7c96362015-01-30 23:58:24 -0800359 refresh_interval 300 ; interval (in seconds) before refreshing the propagation
Yanbiao Lic17de832014-11-21 17:51:45 -0800360 ; This setting should be less than face_system.udp.idle_time,
361 ; so that the face is kept alive on the remote router.
Yanbiao Lid7c96362015-01-30 23:58:24 -0800362
363 base_retry_wait 50 ; base wait time (in seconds) before retrying propagation
364 max_retry_wait 3600 ; maximum wait time (in seconds) before retrying propagation
365 ; for consequent retries, the wait time before each retry is calculated based on the back-off
366 ; policy. Initially, the wait time is set to base_retry_wait, then it will be doubled for every
367 ; 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 -0800368 }
Nick Gordon9fcf1232017-03-10 22:30:20 +0000369
370 ; If enabled, routes registered with origin=client (typically from auto_prefix_propagate)
371 ; will be readvertised into local NLSR daemon.
372 readvertise_nlsr no
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700373}