blob: 601dc924d4c6f22430369d8fe5d77d791edc2708 [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 Shi9685cc52016-08-29 12:47:05 +000052 ; Set a policy to decide whether to cache or drop unsolicited Data.
53 ; Available policies are: drop-all, admit-local, admit-network, admit-all
Junxiao Shi88f5f732016-09-03 07:11:37 +000054 cs_unsolicited_policy drop-all
Junxiao Shi9685cc52016-08-29 12:47:05 +000055
Steve DiBenedettoc0640f52014-11-03 15:55:43 -070056 ; Set the forwarding strategy for the specified prefixes:
57 ; <prefix> <strategy>
58 strategy_choice
59 {
60 / /localhost/nfd/strategy/best-route
Junxiao Shi67ba8d22015-08-21 21:21:28 -070061 /localhost /localhost/nfd/strategy/multicast
Steve DiBenedettoc0640f52014-11-03 15:55:43 -070062 /localhost/nfd /localhost/nfd/strategy/best-route
Junxiao Shi67ba8d22015-08-21 21:21:28 -070063 /ndn/broadcast /localhost/nfd/strategy/multicast
Steve DiBenedettoc0640f52014-11-03 15:55:43 -070064 }
Vince Lehman63ab1bb2015-09-04 17:06:58 -050065
66 ; Declare network region names
67 ; These are used for mobility support. An Interest carrying a Link object is
68 ; assumed to have reached the producer region if any delegation name in the
69 ; Link object is a prefix of any region name.
70 network_region
71 {
72 ; /example/region1
73 ; /example/region2
74 }
Steve DiBenedetto3a4f83d2014-06-02 14:58:54 -060075}
76
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -060077; The face_system section defines what faces and channels are created.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060078face_system
79{
Steve DiBenedettodbcb1a12014-11-17 11:04:21 -070080 ; The unix section contains settings of Unix stream faces and channels.
81 ; Unix channel is always listening; delete unix section to disable
82 ; Unix stream faces and channels.
Steve DiBenedetto158f73f2014-12-22 14:46:12 -070083 ;
84 ; The ndn-cxx library expects unix:///var/run/nfd.sock
85 ; to be used as the default transport option. Please change
86 ; the "transport" field in client.conf to an appropriate tcp4 FaceUri
87 ; if you need to disable unix sockets.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060088 unix
89 {
Steve DiBenedettodbcb1a12014-11-17 11:04:21 -070090 path /var/run/nfd.sock ; Unix stream listener path
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060091 }
92
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -060093 ; The tcp section contains settings of TCP faces and channels.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060094 tcp
95 {
96 listen yes ; set to 'no' to disable TCP listener, default 'yes'
97 port 6363 ; TCP listener port number
Steve DiBenedetto95152872014-04-11 12:40:59 -060098 enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes'
99 enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes'
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600100 }
101
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600102 ; The udp section contains settings of UDP faces and channels.
Steve DiBenedetto95152872014-04-11 12:40:59 -0600103 ; UDP channel is always listening; delete udp section to disable UDP
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600104 udp
105 {
106 port 6363 ; UDP unicast port number
Steve DiBenedetto95152872014-04-11 12:40:59 -0600107 enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes'
108 enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes'
Chengyu Fanaddecff2015-02-10 14:09:01 -0700109
110 ; idle time (seconds) before closing a UDP unicast face, the actual timeout would be
111 ; anywhere within [idle_timeout, 2*idle_timeout), default is 600
112 idle_timeout 600
113
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600114 keep_alive_interval 25; interval (seconds) between keep-alive refreshes
115
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700116 ; UDP multicast settings
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600117 ; NFD creates one UDP multicast face per NIC
Giulio Grassi6d7176d2014-04-16 16:08:48 +0200118 ;
119 ; In multi-homed Linux machines these settings will NOT work without
120 ; root or settings the appropriate permissions:
121 ;
122 ; sudo setcap cap_net_raw=eip /full/path/nfd
123 ;
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700124 mcast yes ; set to 'no' to disable UDP multicast, default 'yes'
125 mcast_port 56363 ; UDP multicast port number
126 mcast_group 224.0.23.170 ; UDP multicast group (IPv4 only)
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600127 }
128
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600129 ; The ether section contains settings of Ethernet faces and channels.
130 ; These settings will NOT work without root or setting the appropriate
131 ; permissions:
132 ;
133 ; sudo setcap cap_net_raw,cap_net_admin=eip /full/path/nfd
134 ;
135 ; You may need to install a package to use setcap:
136 ;
137 ; **Ubuntu:**
138 ;
139 ; sudo apt-get install libcap2-bin
140 ;
141 ; **Mac OS X:**
142 ;
143 ; curl https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -o ChmodBPF.tar.gz
144 ; tar zxvf ChmodBPF.tar.gz
145 ; open ChmodBPF/Install\ ChmodBPF.app
146 ;
147 ; or manually:
148 ;
149 ; sudo chgrp admin /dev/bpf*
150 ; sudo chmod g+rw /dev/bpf*
151
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700152 @IF_HAVE_LIBPCAP@ether
153 @IF_HAVE_LIBPCAP@{
154 @IF_HAVE_LIBPCAP@ ; Ethernet multicast settings
155 @IF_HAVE_LIBPCAP@ ; NFD creates one Ethernet multicast face per NIC
156 @IF_HAVE_LIBPCAP@
157 @IF_HAVE_LIBPCAP@ mcast yes ; set to 'no' to disable Ethernet multicast, default 'yes'
158 @IF_HAVE_LIBPCAP@ mcast_group 01:00:5E:00:17:AA ; Ethernet multicast group
159 @IF_HAVE_LIBPCAP@}
Wentao Shang53df1632014-04-21 12:01:32 -0700160
161 ; The websocket section contains settings of WebSocket faces and channels.
162
163 @IF_HAVE_WEBSOCKET@websocket
164 @IF_HAVE_WEBSOCKET@{
165 @IF_HAVE_WEBSOCKET@ listen yes ; set to 'no' to disable WebSocket listener, default 'yes'
166 @IF_HAVE_WEBSOCKET@ port 9696 ; WebSocket listener port number
167 @IF_HAVE_WEBSOCKET@ enable_v4 yes ; set to 'no' to disable listening on IPv4 socket, default 'yes'
168 @IF_HAVE_WEBSOCKET@ enable_v6 yes ; set to 'no' to disable listening on IPv6 socket, default 'yes'
169 @IF_HAVE_WEBSOCKET@}
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600170}
171
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600172; The authorizations section grants privileges to authorized keys.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600173authorizations
174{
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600175 ; An authorize section grants privileges to a NDN certificate.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600176 authorize
177 {
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600178 ; If you do not already have NDN certificate, you can generate
179 ; one with the following commands.
180 ;
181 ; 1. Generate and install a self-signed identity certificate:
182 ;
183 ; ndnsec-keygen /`whoami` | ndnsec-install-cert -
184 ;
185 ; Note that the argument to ndnsec-key will be the identity name of the
186 ; new key (in this case, /your-username). Identities are hierarchical NDN
187 ; names and may have multiple components (e.g. `/ndn/ucla/edu/alice`).
188 ; You may create additional keys and identities as you see fit.
189 ;
190 ; 2. Dump the NDN certificate to a file:
191 ;
192 ; sudo mkdir -p @SYSCONFDIR@/ndn/keys/
193 ; ndnsec-cert-dump -i /`whoami` > default.ndncert
194 ; sudo mv default.ndncert @SYSCONFDIR@/ndn/keys/default.ndncert
195 ;
196 ; The "certfile" field below specifies the default key directory for
197 ; your machine. You may move your newly created key to the location it
198 ; specifies or path.
199
Yingdi Yuc8f214c2014-04-29 20:39:37 -0700200 ; certfile keys/default.ndncert ; NDN identity certificate file
201 certfile any ; "any" authorizes command interests signed under any certificate,
202 ; i.e., no actual validation.
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600203 privileges ; set of privileges granted to this identity
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600204 {
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600205 faces
206 fib
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600207 strategy-choice
208 }
209 }
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600210
211 ; You may have multiple authorize sections that specify additional
212 ; certificates and their privileges.
213
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700214 ; authorize
215 ; {
216 ; certfile keys/this_cert_does_not_exist.ndncert
217 ; authorize
218 ; privileges
219 ; {
220 ; faces
221 ; }
222 ; }
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600223}
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700224
Yingdi Yue5224e92014-04-29 18:04:02 -0700225rib
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700226{
Yingdi Yue5224e92014-04-29 18:04:02 -0700227 ; The following localhost_security allows anyone to register routing entries in local RIB
228 localhost_security
229 {
230 trust-anchor
231 {
232 type any
233 }
234 }
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700235
Yingdi Yue5224e92014-04-29 18:04:02 -0700236 ; localhop_security should be enabled when NFD runs on a hub.
237 ; "/localhop/nfd/fib" command prefix will be disabled when localhop_security section is missing.
238 ; localhop_security
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700239 ; {
Yingdi Yue5224e92014-04-29 18:04:02 -0700240 ; ; This section defines the trust model for NFD RIB Management. It consists of rules and
241 ; ; trust-anchors, which are briefly defined in this file. For more information refer to
242 ; ; manpage of ndn-validator.conf:
243 ; ;
244 ; ; man ndn-validator.conf
245 ; ;
246 ; ; A trust-anchor is a pre-trusted certificate. This can be any certificate that is the
247 ; ; root of certification chain (e.g., NDN testbed root certificate) or an existing
248 ; ; default system certificate `default.ndncert`.
249 ; ;
250 ; ; A rule defines conditions a valid packet MUST have. A packet must satisfy one of the
251 ; ; rules defined here. A rule can be broken into two parts: matching & checking. A packet
252 ; ; will be matched against rules from the first to the last until a matched rule is
253 ; ; encountered. The matched rule will be used to check the packet. If a packet does not
254 ; ; match any rule, it will be treated as invalid. The matching part of a rule consists
255 ; ; of `for` and `filter` sections. They collectively define which packets can be checked
256 ; ; with this rule. `for` defines packet type (data or interest) and `filter` defines
257 ; ; conditions on other properties of a packet. Right now, you can only define conditions
258 ; ; on packet name, and you can only specify ONLY ONE filter for packet name. The
259 ; ; checking part of a rule consists of `checker`, which defines the conditions that a
260 ; ; VALID packet MUST have. See comments in checker section for more details.
261 ;
262 ; rule
263 ; {
264 ; id "NRD Prefix Registration Command Rule"
265 ; for interest ; rule for Interests (to validate CommandInterests)
266 ; filter
267 ; {
268 ; type name ; condition on interest name (w/o signature)
Yingdi Yu676a55a2014-06-18 21:09:09 -0700269 ; regex ^[<localhop><localhost>]<nfd><rib>[<register><unregister>]<>$ ; prefix before
270 ; ; timestamp
Yingdi Yue5224e92014-04-29 18:04:02 -0700271 ; }
272 ; checker
273 ; {
274 ; type customized
275 ; sig-type rsa-sha256 ; interest must have a rsa-sha256 signature
276 ; key-locator
277 ; {
278 ; type name ; key locator must be the certificate name of the
279 ; ; signing key
280 ; regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT>$
281 ; }
282 ; }
283 ; }
284 ; rule
285 ; {
286 ; id "NDN Testbed Hierarchy Rule"
287 ; for data ; rule for Data (to validate NDN certificates)
288 ; filter
289 ; {
290 ; type name ; condition on data name
291 ; regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT><>$
292 ; }
293 ; checker
294 ; {
295 ; type hierarchical ; the certificate name of the signing key and
296 ; ; the data name must follow the hierarchical model
297 ; sig-type rsa-sha256 ; data must have a rsa-sha256 signature
298 ; }
299 ; }
300 ; trust-anchor
301 ; {
302 ; type file
303 ; file-name keys/default.ndncert ; the file name, by default this file should be placed in the
304 ; ; same folder as this config file.
305 ; }
306 ; ; trust-anchor ; Can be repeated multiple times to specify multiple trust anchors
307 ; ; {
308 ; ; type file
309 ; ; file-name keys/ndn-testbed.ndncert
310 ; ; }
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700311 ; }
Yanbiao Lic17de832014-11-21 17:51:45 -0800312
Yanbiao Lib9d439d2014-12-11 16:12:32 -0800313 ; The following localhop_security should be enabled when NFD runs on a hub,
314 ; which accepts all remote registrations and is a short-term solution.
315 ; localhop_security
316 ; {
317 ; trust-anchor
318 ; {
319 ; type any
320 ; }
321 ; }
322
Yanbiao Lid7c96362015-01-30 23:58:24 -0800323 auto_prefix_propagate
Yanbiao Lic17de832014-11-21 17:51:45 -0800324 {
325 cost 15 ; forwarding cost of prefix registered on remote router
Yanbiao Lid7c96362015-01-30 23:58:24 -0800326 timeout 10000 ; timeout (in milliseconds) of prefix registration command for propagation
Yanbiao Lic17de832014-11-21 17:51:45 -0800327
Yanbiao Lid7c96362015-01-30 23:58:24 -0800328 refresh_interval 300 ; interval (in seconds) before refreshing the propagation
Yanbiao Lic17de832014-11-21 17:51:45 -0800329 ; This setting should be less than face_system.udp.idle_time,
330 ; so that the face is kept alive on the remote router.
Yanbiao Lid7c96362015-01-30 23:58:24 -0800331
332 base_retry_wait 50 ; base wait time (in seconds) before retrying propagation
333 max_retry_wait 3600 ; maximum wait time (in seconds) before retrying propagation
334 ; for consequent retries, the wait time before each retry is calculated based on the back-off
335 ; policy. Initially, the wait time is set to base_retry_wait, then it will be doubled for every
336 ; 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 -0800337 }
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700338}