blob: a3232d73df2a15f673e0a23c4863579aaac6ea24 [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{
Alexander Afanasyevcc5661e2015-01-28 11:52:10 -08004 user ndn
5 group ndn
Alexander Afanasyev34412062014-08-25 12:35:54 -07006}
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -07007
8log
9{
10 ; default_level specifies the logging level for modules
11 ; that are not explicitly named. All debugging levels
12 ; listed above the selected value are enabled.
13 ;
14 ; Valid values:
15 ;
16 ; NONE ; no messages
17 ; ERROR ; error messages
18 ; WARN ; warning messages
19 ; INFO ; informational messages (default)
20 ; DEBUG ; debugging messages
21 ; TRACE ; trace messages (most verbose)
22 ; ALL ; all messages
23
24 default_level INFO
25
26 ; You may override default_level by assigning a logging level
27 ; to the desired module name. Module names can be found in two ways:
28 ;
29 ; Run:
30 ; nfd --modules
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -070031 ;
32 ; Or look for NFD_LOG_INIT(<module name>) statements in .cpp files
33 ;
34 ; Example module-level settings:
35 ;
36 ; FibManager DEBUG
37 ; Forwarder INFO
38}
39
Alexander Afanasyev34412062014-08-25 12:35:54 -070040; The tables section configures the CS, PIT, FIB, Strategy Choice, and Measurements
41tables
42{
43
44 ; ContentStore size limit in number of packets
45 ; default is 65536, about 500MB with 8KB packet size
46 cs_max_packets 65536
Alexander Afanasyev3a902892015-12-30 22:42:20 +000047
48 ; Set the forwarding strategy for the specified prefixes:
49 ; <prefix> <strategy>
50 strategy_choice
51 {
52 / /localhost/nfd/strategy/best-route
53 /localhost /localhost/nfd/strategy/multicast
54 /localhost/nfd /localhost/nfd/strategy/best-route
55 /ndn/broadcast /localhost/nfd/strategy/multicast
56 }
57
58 ; Declare network region names
59 ; These are used for mobility support. An Interest carrying a Link object is
60 ; assumed to have reached the producer region if any delegation name in the
61 ; Link object is a prefix of any region name.
62 network_region
63 {
64 ; /example/region1
65 ; /example/region2
66 }
Alexander Afanasyev34412062014-08-25 12:35:54 -070067}
68
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -070069; The face_system section defines what faces and channels are created.
70face_system
71{
Alexander Afanasyev3a902892015-12-30 22:42:20 +000072 ; The unix section contains settings of Unix stream faces and channels.
73 ; Unix channel is always listening; delete unix section to disable
74 ; Unix stream faces and channels.
75 ;
76 ; The ndn-cxx library expects unix:///var/run/nfd.sock
77 ; to be used as the default transport option. Please change
78 ; the "transport" field in client.conf to an appropriate tcp4 FaceUri
79 ; if you need to disable unix sockets.
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -070080 unix
81 {
Alexander Afanasyev3a902892015-12-30 22:42:20 +000082 path /var/run/nfd.sock ; Unix stream listener path
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -070083 }
84
85 ; The tcp section contains settings of TCP faces and channels.
86 tcp
87 {
88 listen yes ; set to 'no' to disable TCP listener, default 'yes'
89 port 6363 ; TCP listener port number
90 enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes'
91 enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes'
92 }
93
94 ; The udp section contains settings of UDP faces and channels.
95 ; UDP channel is always listening; delete udp section to disable UDP
96 udp
97 {
98 port 6363 ; UDP unicast port number
99 enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes'
100 enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes'
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000101
102 ; idle time (seconds) before closing a UDP unicast face, the actual timeout would be
103 ; anywhere within [idle_timeout, 2*idle_timeout), default is 600
104 idle_timeout 600
105
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700106 keep_alive_interval 25; interval (seconds) between keep-alive refreshes
107
108 ; UDP multicast settings
109 ; NFD creates one UDP multicast face per NIC
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000110 ;
111 ; In multi-homed Linux machines these settings will NOT work without
112 ; root or settings the appropriate permissions:
113 ;
114 ; sudo setcap cap_net_raw=eip /full/path/nfd
115 ;
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700116 mcast yes ; set to 'no' to disable UDP multicast, default 'yes'
117 mcast_port 56363 ; UDP multicast port number
118 mcast_group 224.0.23.170 ; UDP multicast group (IPv4 only)
119 }
120
121 ; The ether section contains settings of Ethernet faces and channels.
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000122 ; These settings will NOT work without root or setting the appropriate
123 ; permissions:
124 ;
125 ; sudo setcap cap_net_raw,cap_net_admin=eip /full/path/nfd
126 ;
127 ; You may need to install a package to use setcap:
128 ;
129 ; **Ubuntu:**
130 ;
131 ; sudo apt-get install libcap2-bin
132 ;
133 ; **Mac OS X:**
134 ;
135 ; curl https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -o ChmodBPF.tar.gz
136 ; tar zxvf ChmodBPF.tar.gz
137 ; open ChmodBPF/Install\ ChmodBPF.app
138 ;
139 ; or manually:
140 ;
141 ; sudo chgrp admin /dev/bpf*
142 ; sudo chmod g+rw /dev/bpf*
143
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700144 ether
145 {
146 ; Ethernet multicast settings
147 ; NFD creates one Ethernet multicast face per NIC
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000148
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700149 mcast yes ; set to 'no' to disable Ethernet multicast, default 'yes'
150 mcast_group 01:00:5E:00:17:AA ; Ethernet multicast group
151 }
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000152
153 ; The websocket section contains settings of WebSocket faces and channels.
154
155 websocket
156 {
157 listen yes ; set to 'no' to disable WebSocket listener, default 'yes'
158 port 9696 ; WebSocket listener port number
159 enable_v4 yes ; set to 'no' to disable listening on IPv4 socket, default 'yes'
160 enable_v6 yes ; set to 'no' to disable listening on IPv6 socket, default 'yes'
161 }
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700162}
163
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000164; The authorizations section grants privileges to authorized keys.
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700165authorizations
166{
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000167 ; An authorize section grants privileges to a NDN certificate.
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700168 authorize
169 {
Alexander Afanasyev790bb212015-03-15 19:19:25 -0700170 certfile certs/localhost_daemons_nfd.ndncert
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700171 privileges
172 {
173 faces
174 fib
175 strategy-choice
176 }
177 }
178
179 authorize
180 {
181 certfile any
182 privileges
183 {
184 faces
185 strategy-choice
186 }
187 }
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000188
189 ; You may have multiple authorize sections that specify additional
190 ; certificates and their privileges.
191
192 ; authorize
193 ; {
194 ; certfile keys/this_cert_does_not_exist.ndncert
195 ; authorize
196 ; privileges
197 ; {
198 ; faces
199 ; }
200 ; }
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700201}
202
203rib
204{
205 ; The following localhost_security allows anyone to register routing entries in local RIB
206 localhost_security
207 {
208 trust-anchor
209 {
210 type any
211 }
212 }
213
214 ; localhop_security should be enabled when NFD runs on a hub.
215 ; "/localhop/nfd/fib" command prefix will be disabled when localhop_security section is missing.
216 ; localhop_security
217 ; {
218 ; ; This section defines the trust model for NFD RIB Management. It consists of rules and
219 ; ; trust-anchors, which are briefly defined in this file. For more information refer to
220 ; ; manpage of ndn-validator.conf:
221 ; ;
222 ; ; man ndn-validator.conf
223 ; ;
224 ; ; A trust-anchor is a pre-trusted certificate. This can be any certificate that is the
225 ; ; root of certification chain (e.g., NDN testbed root certificate) or an existing
226 ; ; default system certificate `default.ndncert`.
227 ; ;
228 ; ; A rule defines conditions a valid packet MUST have. A packet must satisfy one of the
229 ; ; rules defined here. A rule can be broken into two parts: matching & checking. A packet
230 ; ; will be matched against rules from the first to the last until a matched rule is
231 ; ; encountered. The matched rule will be used to check the packet. If a packet does not
232 ; ; match any rule, it will be treated as invalid. The matching part of a rule consists
233 ; ; of `for` and `filter` sections. They collectively define which packets can be checked
234 ; ; with this rule. `for` defines packet type (data or interest) and `filter` defines
235 ; ; conditions on other properties of a packet. Right now, you can only define conditions
236 ; ; on packet name, and you can only specify ONLY ONE filter for packet name. The
237 ; ; checking part of a rule consists of `checker`, which defines the conditions that a
238 ; ; VALID packet MUST have. See comments in checker section for more details.
239 ;
240 ; rule
241 ; {
242 ; id "NRD Prefix Registration Command Rule"
243 ; for interest ; rule for Interests (to validate CommandInterests)
244 ; filter
245 ; {
246 ; type name ; condition on interest name (w/o signature)
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000247 ; regex ^[<localhop><localhost>]<nfd><rib>[<register><unregister>]<>$ ; prefix before
248 ; ; timestamp
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700249 ; }
250 ; checker
251 ; {
252 ; type customized
253 ; sig-type rsa-sha256 ; interest must have a rsa-sha256 signature
254 ; key-locator
255 ; {
256 ; type name ; key locator must be the certificate name of the
257 ; ; signing key
258 ; regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT>$
259 ; }
260 ; }
261 ; }
262 ; rule
263 ; {
264 ; id "NDN Testbed Hierarchy Rule"
265 ; for data ; rule for Data (to validate NDN certificates)
266 ; filter
267 ; {
268 ; type name ; condition on data name
269 ; regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT><>$
270 ; }
271 ; checker
272 ; {
273 ; type hierarchical ; the certificate name of the signing key and
274 ; ; the data name must follow the hierarchical model
275 ; sig-type rsa-sha256 ; data must have a rsa-sha256 signature
276 ; }
277 ; }
278 ; trust-anchor
279 ; {
280 ; type file
281 ; file-name keys/default.ndncert ; the file name, by default this file should be placed in the
282 ; ; same folder as this config file.
283 ; }
284 ; ; trust-anchor ; Can be repeated multiple times to specify multiple trust anchors
285 ; ; {
286 ; ; type file
287 ; ; file-name keys/ndn-testbed.ndncert
288 ; ; }
289 ; }
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000290
Alexander Afanasyevcc5661e2015-01-28 11:52:10 -0800291 ; The following localhop_security should be enabled when NFD runs on a hub,
292 ; which accepts all remote registrations and is a short-term solution.
293 ; localhop_security
294 ; {
295 ; trust-anchor
296 ; {
297 ; type any
298 ; }
299 ; }
300
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000301 auto_prefix_propagate
Alexander Afanasyevcc5661e2015-01-28 11:52:10 -0800302 {
303 cost 15 ; forwarding cost of prefix registered on remote router
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000304 timeout 10000 ; timeout (in milliseconds) of prefix registration command for propagation
Alexander Afanasyevcc5661e2015-01-28 11:52:10 -0800305
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000306 refresh_interval 300 ; interval (in seconds) before refreshing the propagation
Alexander Afanasyevcc5661e2015-01-28 11:52:10 -0800307 ; This setting should be less than face_system.udp.idle_time,
308 ; so that the face is kept alive on the remote router.
Alexander Afanasyev3a902892015-12-30 22:42:20 +0000309
310 base_retry_wait 50 ; base wait time (in seconds) before retrying propagation
311 max_retry_wait 3600 ; maximum wait time (in seconds) before retrying propagation
312 ; for consequent retries, the wait time before each retry is calculated based on the back-off
313 ; policy. Initially, the wait time is set to base_retry_wait, then it will be doubled for every
314 ; 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 -0800315 }
Alexander Afanasyev469cbcd2014-05-08 01:25:11 -0700316}