blob: 8d6f5d1814a3047da88a560e7ace442a86b5bb0c [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.
84 ; Unix channel is always listening; delete unix section to disable
85 ; Unix stream faces and channels.
Steve DiBenedetto158f73f2014-12-22 14:46:12 -070086 ;
87 ; The ndn-cxx library expects unix:///var/run/nfd.sock
88 ; to be used as the default transport option. Please change
89 ; the "transport" field in client.conf to an appropriate tcp4 FaceUri
90 ; if you need to disable unix sockets.
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 DiBenedetto95152872014-04-11 12:40:59 -0600106 ; UDP channel is always listening; delete udp section to disable UDP
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600107 udp
108 {
109 port 6363 ; UDP unicast port number
Steve DiBenedetto95152872014-04-11 12:40:59 -0600110 enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes'
111 enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes'
Chengyu Fanaddecff2015-02-10 14:09:01 -0700112
113 ; idle time (seconds) before closing a UDP unicast face, the actual timeout would be
114 ; anywhere within [idle_timeout, 2*idle_timeout), default is 600
115 idle_timeout 600
116
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600117 keep_alive_interval 25; interval (seconds) between keep-alive refreshes
118
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700119 ; UDP multicast settings
susmit21f22e62017-03-25 15:44:45 -0500120 ; By default, NFD creates one UDP multicast face per NIC
Giulio Grassi6d7176d2014-04-16 16:08:48 +0200121 ;
122 ; In multi-homed Linux machines these settings will NOT work without
123 ; root or settings the appropriate permissions:
124 ;
125 ; sudo setcap cap_net_raw=eip /full/path/nfd
126 ;
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700127 mcast yes ; set to 'no' to disable UDP multicast, default 'yes'
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700128 mcast_group 224.0.23.170 ; UDP multicast group (IPv4 only)
Teng Liangfe4fce32017-03-29 04:49:38 +0000129 mcast_port 56363 ; UDP multicast port number
130 mcast_ad_hoc no ; set 'yes' to make all UDP multicast faces "ad hoc", default 'no'
Junxiao Shic31080d2017-01-24 15:10:12 +0000131
132 ; Whitelist and blacklist can contain, in no particular order:
susmit21f22e62017-03-25 15:44:45 -0500133 ; interface names, including wildcard patterns (e.g., 'ifname eth0', 'ifname en*', 'ifname wlp?s0'),
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 single asterisk ('*') that matches all interfaces.
Junxiao Shic31080d2017-01-24 15:10:12 +0000137 whitelist
138 {
139 *
140 }
141 blacklist
142 {
143 }
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600144 }
145
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600146 ; The ether section contains settings of Ethernet faces and channels.
147 ; These settings will NOT work without root or setting the appropriate
148 ; permissions:
149 ;
150 ; sudo setcap cap_net_raw,cap_net_admin=eip /full/path/nfd
151 ;
152 ; You may need to install a package to use setcap:
153 ;
154 ; **Ubuntu:**
155 ;
156 ; sudo apt-get install libcap2-bin
157 ;
158 ; **Mac OS X:**
159 ;
160 ; curl https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -o ChmodBPF.tar.gz
161 ; tar zxvf ChmodBPF.tar.gz
162 ; open ChmodBPF/Install\ ChmodBPF.app
163 ;
164 ; or manually:
165 ;
166 ; sudo chgrp admin /dev/bpf*
167 ; sudo chmod g+rw /dev/bpf*
susmit91e1d7c2016-10-03 16:16:57 -0600168 ;
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700169 @IF_HAVE_LIBPCAP@ether
170 @IF_HAVE_LIBPCAP@{
171 @IF_HAVE_LIBPCAP@ ; Ethernet multicast settings
susmit21f22e62017-03-25 15:44:45 -0500172 @IF_HAVE_LIBPCAP@ ; By default, NFD creates one Ethernet multicast face per NIC
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700173 @IF_HAVE_LIBPCAP@
174 @IF_HAVE_LIBPCAP@ mcast yes ; set to 'no' to disable Ethernet multicast, default 'yes'
175 @IF_HAVE_LIBPCAP@ mcast_group 01:00:5E:00:17:AA ; Ethernet multicast group
susmit91e1d7c2016-10-03 16:16:57 -0600176 @IF_HAVE_LIBPCAP@
Junxiao Shic31080d2017-01-24 15:10:12 +0000177 @IF_HAVE_LIBPCAP@ ; Whitelist and blacklist can contain, in no particular order:
susmit21f22e62017-03-25 15:44:45 -0500178 @IF_HAVE_LIBPCAP@ ; interface names, including wildcard patterns (e.g., 'ifname eth0', 'ifname en*', 'ifname wlp?s0'),
179 @IF_HAVE_LIBPCAP@ ; mac addresses (e.g., 'ether 85:3b:4d:d3:5f:c2'),
180 @IF_HAVE_LIBPCAP@ ; subnets (e.g., 'subnet 192.0.2.0/24', note that only IPv4 is supported here),
181 @IF_HAVE_LIBPCAP@ ; or a single asterisk ('*') that matches all interfaces.
susmit91e1d7c2016-10-03 16:16:57 -0600182 @IF_HAVE_LIBPCAP@ whitelist
183 @IF_HAVE_LIBPCAP@ {
184 @IF_HAVE_LIBPCAP@ *
185 @IF_HAVE_LIBPCAP@ }
186 @IF_HAVE_LIBPCAP@ blacklist
187 @IF_HAVE_LIBPCAP@ {
188 @IF_HAVE_LIBPCAP@ }
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700189 @IF_HAVE_LIBPCAP@}
Wentao Shang53df1632014-04-21 12:01:32 -0700190
191 ; The websocket section contains settings of WebSocket faces and channels.
Wentao Shang53df1632014-04-21 12:01:32 -0700192 @IF_HAVE_WEBSOCKET@websocket
193 @IF_HAVE_WEBSOCKET@{
194 @IF_HAVE_WEBSOCKET@ listen yes ; set to 'no' to disable WebSocket listener, default 'yes'
195 @IF_HAVE_WEBSOCKET@ port 9696 ; WebSocket listener port number
196 @IF_HAVE_WEBSOCKET@ enable_v4 yes ; set to 'no' to disable listening on IPv4 socket, default 'yes'
197 @IF_HAVE_WEBSOCKET@ enable_v6 yes ; set to 'no' to disable listening on IPv6 socket, default 'yes'
198 @IF_HAVE_WEBSOCKET@}
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600199}
200
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600201; The authorizations section grants privileges to authorized keys.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600202authorizations
203{
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600204 ; An authorize section grants privileges to a NDN certificate.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600205 authorize
206 {
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600207 ; If you do not already have NDN certificate, you can generate
208 ; one with the following commands.
209 ;
210 ; 1. Generate and install a self-signed identity certificate:
211 ;
212 ; ndnsec-keygen /`whoami` | ndnsec-install-cert -
213 ;
214 ; Note that the argument to ndnsec-key will be the identity name of the
215 ; new key (in this case, /your-username). Identities are hierarchical NDN
216 ; names and may have multiple components (e.g. `/ndn/ucla/edu/alice`).
217 ; You may create additional keys and identities as you see fit.
218 ;
219 ; 2. Dump the NDN certificate to a file:
220 ;
221 ; sudo mkdir -p @SYSCONFDIR@/ndn/keys/
222 ; ndnsec-cert-dump -i /`whoami` > default.ndncert
223 ; sudo mv default.ndncert @SYSCONFDIR@/ndn/keys/default.ndncert
224 ;
225 ; The "certfile" field below specifies the default key directory for
226 ; your machine. You may move your newly created key to the location it
227 ; specifies or path.
228
Yingdi Yuc8f214c2014-04-29 20:39:37 -0700229 ; certfile keys/default.ndncert ; NDN identity certificate file
230 certfile any ; "any" authorizes command interests signed under any certificate,
231 ; i.e., no actual validation.
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600232 privileges ; set of privileges granted to this identity
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600233 {
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600234 faces
235 fib
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600236 strategy-choice
237 }
238 }
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600239
240 ; You may have multiple authorize sections that specify additional
241 ; certificates and their privileges.
242
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700243 ; authorize
244 ; {
245 ; certfile keys/this_cert_does_not_exist.ndncert
246 ; authorize
247 ; privileges
248 ; {
249 ; faces
250 ; }
251 ; }
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600252}
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700253
Yingdi Yue5224e92014-04-29 18:04:02 -0700254rib
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700255{
Yingdi Yue5224e92014-04-29 18:04:02 -0700256 ; The following localhost_security allows anyone to register routing entries in local RIB
257 localhost_security
258 {
259 trust-anchor
260 {
261 type any
262 }
263 }
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700264
Yingdi Yue5224e92014-04-29 18:04:02 -0700265 ; localhop_security should be enabled when NFD runs on a hub.
266 ; "/localhop/nfd/fib" command prefix will be disabled when localhop_security section is missing.
267 ; localhop_security
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700268 ; {
Yingdi Yue5224e92014-04-29 18:04:02 -0700269 ; ; This section defines the trust model for NFD RIB Management. It consists of rules and
270 ; ; trust-anchors, which are briefly defined in this file. For more information refer to
271 ; ; manpage of ndn-validator.conf:
272 ; ;
273 ; ; man ndn-validator.conf
274 ; ;
275 ; ; A trust-anchor is a pre-trusted certificate. This can be any certificate that is the
276 ; ; root of certification chain (e.g., NDN testbed root certificate) or an existing
277 ; ; default system certificate `default.ndncert`.
278 ; ;
279 ; ; A rule defines conditions a valid packet MUST have. A packet must satisfy one of the
280 ; ; rules defined here. A rule can be broken into two parts: matching & checking. A packet
281 ; ; will be matched against rules from the first to the last until a matched rule is
282 ; ; encountered. The matched rule will be used to check the packet. If a packet does not
283 ; ; match any rule, it will be treated as invalid. The matching part of a rule consists
284 ; ; of `for` and `filter` sections. They collectively define which packets can be checked
285 ; ; with this rule. `for` defines packet type (data or interest) and `filter` defines
286 ; ; conditions on other properties of a packet. Right now, you can only define conditions
287 ; ; on packet name, and you can only specify ONLY ONE filter for packet name. The
288 ; ; checking part of a rule consists of `checker`, which defines the conditions that a
289 ; ; VALID packet MUST have. See comments in checker section for more details.
290 ;
291 ; rule
292 ; {
293 ; id "NRD Prefix Registration Command Rule"
294 ; for interest ; rule for Interests (to validate CommandInterests)
295 ; filter
296 ; {
297 ; type name ; condition on interest name (w/o signature)
Yingdi Yu676a55a2014-06-18 21:09:09 -0700298 ; regex ^[<localhop><localhost>]<nfd><rib>[<register><unregister>]<>$ ; prefix before
299 ; ; timestamp
Yingdi Yue5224e92014-04-29 18:04:02 -0700300 ; }
301 ; checker
302 ; {
303 ; type customized
304 ; sig-type rsa-sha256 ; interest must have a rsa-sha256 signature
305 ; key-locator
306 ; {
307 ; type name ; key locator must be the certificate name of the
308 ; ; signing key
309 ; regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT>$
310 ; }
311 ; }
312 ; }
313 ; rule
314 ; {
315 ; id "NDN Testbed Hierarchy Rule"
316 ; for data ; rule for Data (to validate NDN certificates)
317 ; filter
318 ; {
319 ; type name ; condition on data name
320 ; regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT><>$
321 ; }
322 ; checker
323 ; {
324 ; type hierarchical ; the certificate name of the signing key and
325 ; ; the data name must follow the hierarchical model
326 ; sig-type rsa-sha256 ; data must have a rsa-sha256 signature
327 ; }
328 ; }
329 ; trust-anchor
330 ; {
331 ; type file
332 ; file-name keys/default.ndncert ; the file name, by default this file should be placed in the
333 ; ; same folder as this config file.
334 ; }
335 ; ; trust-anchor ; Can be repeated multiple times to specify multiple trust anchors
336 ; ; {
337 ; ; type file
338 ; ; file-name keys/ndn-testbed.ndncert
339 ; ; }
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700340 ; }
Yanbiao Lic17de832014-11-21 17:51:45 -0800341
Yanbiao Lib9d439d2014-12-11 16:12:32 -0800342 ; The following localhop_security should be enabled when NFD runs on a hub,
343 ; which accepts all remote registrations and is a short-term solution.
344 ; localhop_security
345 ; {
346 ; trust-anchor
347 ; {
348 ; type any
349 ; }
350 ; }
351
Yanbiao Lid7c96362015-01-30 23:58:24 -0800352 auto_prefix_propagate
Yanbiao Lic17de832014-11-21 17:51:45 -0800353 {
354 cost 15 ; forwarding cost of prefix registered on remote router
Yanbiao Lid7c96362015-01-30 23:58:24 -0800355 timeout 10000 ; timeout (in milliseconds) of prefix registration command for propagation
Yanbiao Lic17de832014-11-21 17:51:45 -0800356
Yanbiao Lid7c96362015-01-30 23:58:24 -0800357 refresh_interval 300 ; interval (in seconds) before refreshing the propagation
Yanbiao Lic17de832014-11-21 17:51:45 -0800358 ; This setting should be less than face_system.udp.idle_time,
359 ; so that the face is kept alive on the remote router.
Yanbiao Lid7c96362015-01-30 23:58:24 -0800360
361 base_retry_wait 50 ; base wait time (in seconds) before retrying propagation
362 max_retry_wait 3600 ; maximum wait time (in seconds) before retrying propagation
363 ; for consequent retries, the wait time before each retry is calculated based on the back-off
364 ; policy. Initially, the wait time is set to base_retry_wait, then it will be doubled for every
365 ; 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 -0800366 }
Nick Gordon9fcf1232017-03-10 22:30:20 +0000367
368 ; If enabled, routes registered with origin=client (typically from auto_prefix_propagate)
369 ; will be readvertised into local NLSR daemon.
370 readvertise_nlsr no
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700371}