blob: ffb1f5cd98ddf2407d40f386adfd57e8d7e4e1f0 [file] [log] [blame]
ashu01b62f72015-03-12 15:16:11 -05001; The general section contains settings of nfd process.
2general
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}
11
12log
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
28 default_level NONE
29
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 ; nrd --modules
36 ;
37 ; Or look for NFD_LOG_INIT(<module name>) statements in .cpp files
38 ;
39 ; Example module-level settings:
40 ;
41 ; FibManager DEBUG
42 ; Forwarder INFO
43}
44
45; The tables section configures the CS, PIT, FIB, Strategy Choice, and Measurements
46tables
47{
48
49 ; ContentStore size limit in number of packets
50 ; default is 65536, about 500MB with 8KB packet size
51 cs_max_packets 65536
52
53 ; Set the forwarding strategy for the specified prefixes:
54 ; <prefix> <strategy>
55 strategy_choice
56 {
57 / /localhost/nfd/strategy/best-route
58 /localhost /localhost/nfd/strategy/broadcast
59 /localhost/nfd /localhost/nfd/strategy/best-route
60 /ndn/broadcast /localhost/nfd/strategy/broadcast
61 }
62}
63
64; The face_system section defines what faces and channels are created.
65face_system
66{
67 ; The unix section contains settings of Unix stream faces and channels.
68 ; Unix channel is always listening; delete unix section to disable
69 ; Unix stream faces and channels.
70 unix
71 {
72 path /var/run/nfd.sock ; Unix stream listener path
73 }
74
75 ; The tcp section contains settings of TCP faces and channels.
76 tcp
77 {
78 listen yes ; set to 'no' to disable TCP listener, default 'yes'
79 port 6363 ; TCP listener port number
80 enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes'
81 enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes'
82 }
83
84 ; The udp section contains settings of UDP faces and channels.
85 ; UDP channel is always listening; delete udp section to disable UDP
86 udp
87 {
88 port 6363 ; UDP unicast port number
89 enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes'
90 enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes'
91 idle_timeout 600 ; idle time (seconds) before closing a UDP unicast face
92 keep_alive_interval 25; interval (seconds) between keep-alive refreshes
93
94 ; UDP multicast settings
95 ; NFD creates one UDP multicast face per NIC
96 ;
97 ; In multi-homed Linux machines these settings will NOT work without
98 ; root or settings the appropriate permissions:
99 ;
100 ; sudo setcap cap_net_raw=eip /full/path/nfd
101 ;
102 mcast yes ; set to 'no' to disable UDP multicast, default 'yes'
103 mcast_port 56363 ; UDP multicast port number
104 mcast_group 224.0.23.170 ; UDP multicast group (IPv4 only)
105 }
106}
107
108; The authorizations section grants privileges to authorized keys.
109authorizations
110{
111 ; An authorize section grants privileges to a NDN certificate.
112 authorize
113 {
114 ; If you do not already have NDN certificate, you can generate
115 ; one with the following commands.
116 ;
117 ; 1. Generate and install a self-signed identity certificate:
118 ;
119 ; ndnsec-keygen /`whoami` | ndnsec-install-cert -
120 ;
121 ; Note that the argument to ndnsec-key will be the identity name of the
122 ; new key (in this case, /your-username). Identities are hierarchical NDN
123 ; names and may have multiple components (e.g. `/ndn/ucla/edu/alice`).
124 ; You may create additional keys and identities as you see fit.
125 ;
126 ; 2. Dump the NDN certificate to a file:
127 ;
128 ; sudo mkdir -p @SYSCONFDIR@/ndn/keys/
129 ; ndnsec-cert-dump -i /`whoami` > default.ndncert
130 ; sudo mv default.ndncert @SYSCONFDIR@/ndn/keys/default.ndncert
131 ;
132 ; The "certfile" field below specifies the default key directory for
133 ; your machine. You may move your newly created key to the location it
134 ; specifies or path.
135
136 ; certfile keys/default.ndncert ; NDN identity certificate file
137 certfile any ; "any" authorizes command interests signed under any certificate,
138 ; i.e., no actual validation.
139 privileges ; set of privileges granted to this identity
140 {
141 faces
142 fib
143 strategy-choice
144 }
145 }
146
147 ; You may have multiple authorize sections that specify additional
148 ; certificates and their privileges.
149
150 ; authorize
151 ; {
152 ; certfile keys/this_cert_does_not_exist.ndncert
153 ; authorize
154 ; privileges
155 ; {
156 ; faces
157 ; }
158 ; }
159}
160
161rib
162{
163 ; The following localhost_security allows anyone to register routing entries in local RIB
164 localhost_security
165 {
166 trust-anchor
167 {
168 type any
169 }
170 }
171
172 ; localhop_security should be enabled when NFD runs on a hub.
173 ; "/localhop/nfd/fib" command prefix will be disabled when localhop_security section is missing.
174 ; localhop_security
175 ; {
176 ; ; This section defines the trust model for NFD RIB Management. It consists of rules and
177 ; ; trust-anchors, which are briefly defined in this file. For more information refer to
178 ; ; manpage of ndn-validator.conf:
179 ; ;
180 ; ; man ndn-validator.conf
181 ; ;
182 ; ; A trust-anchor is a pre-trusted certificate. This can be any certificate that is the
183 ; ; root of certification chain (e.g., NDN testbed root certificate) or an existing
184 ; ; default system certificate `default.ndncert`.
185 ; ;
186 ; ; A rule defines conditions a valid packet MUST have. A packet must satisfy one of the
187 ; ; rules defined here. A rule can be broken into two parts: matching & checking. A packet
188 ; ; will be matched against rules from the first to the last until a matched rule is
189 ; ; encountered. The matched rule will be used to check the packet. If a packet does not
190 ; ; match any rule, it will be treated as invalid. The matching part of a rule consists
191 ; ; of `for` and `filter` sections. They collectively define which packets can be checked
192 ; ; with this rule. `for` defines packet type (data or interest) and `filter` defines
193 ; ; conditions on other properties of a packet. Right now, you can only define conditions
194 ; ; on packet name, and you can only specify ONLY ONE filter for packet name. The
195 ; ; checking part of a rule consists of `checker`, which defines the conditions that a
196 ; ; VALID packet MUST have. See comments in checker section for more details.
197 ;
198 ; rule
199 ; {
200 ; id "NRD Prefix Registration Command Rule"
201 ; for interest ; rule for Interests (to validate CommandInterests)
202 ; filter
203 ; {
204 ; type name ; condition on interest name (w/o signature)
205 ; regex ^[<localhop><localhost>]<nfd><rib>[<register><unregister>]<>$ ; prefix before
206 ; ; timestamp
207 ; }
208 ; checker
209 ; {
210 ; type customized
211 ; sig-type rsa-sha256 ; interest must have a rsa-sha256 signature
212 ; key-locator
213 ; {
214 ; type name ; key locator must be the certificate name of the
215 ; ; signing key
216 ; regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT>$
217 ; }
218 ; }
219 ; }
220 ; rule
221 ; {
222 ; id "NDN Testbed Hierarchy Rule"
223 ; for data ; rule for Data (to validate NDN certificates)
224 ; filter
225 ; {
226 ; type name ; condition on data name
227 ; regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT><>$
228 ; }
229 ; checker
230 ; {
231 ; type hierarchical ; the certificate name of the signing key and
232 ; ; the data name must follow the hierarchical model
233 ; sig-type rsa-sha256 ; data must have a rsa-sha256 signature
234 ; }
235 ; }
236 ; trust-anchor
237 ; {
238 ; type file
239 ; file-name keys/default.ndncert ; the file name, by default this file should be placed in the
240 ; ; same folder as this config file.
241 ; }
242 ; ; trust-anchor ; Can be repeated multiple times to specify multiple trust anchors
243 ; ; {
244 ; ; type file
245 ; ; file-name keys/ndn-testbed.ndncert
246 ; ; }
247 ; }
248
249 ; The following localhop_security should be enabled when NFD runs on a hub,
250 ; which accepts all remote registrations and is a short-term solution.
251 ; localhop_security
252 ; {
253 ; trust-anchor
254 ; {
255 ; type any
256 ; }
257 ; }
258
259 remote_register
260 {
261 cost 15 ; forwarding cost of prefix registered on remote router
262 timeout 10000 ; timeout (in milliseconds) of remote prefix registration command
263 retry 0 ; maximum number of retries for each remote prefix registration command
264
265 refresh_interval 300 ; interval (in seconds) before refreshing the registration
266 ; This setting should be less than face_system.udp.idle_time,
267 ; so that the face is kept alive on the remote router.
268 }
269}