blob: 55b7ee09677920c6a40a5465d25eb8618511a71a [file] [log] [blame]
hilata6ee6e072014-04-20 17:10:18 -05001nfdc
2====
3
4Usage
5-----
6
7::
8
9 nfdc [-h] COMMAND [<command options>]
10
11
12Description
13-----------
14
15``nfdc`` is a tool to manipulate routing information base (RIB), forwarding information
16base (FIB), and StrategyChoices table (i.e., which strategy should be used by which
17namespaces).
18
19Options
20-------
21
22``-h``
23 Print usage information.
24
25``COMMAND``
26
27 ``register``
28 Register a new or update existing routing entry in Routing Information Base (RIB).
29
Syed Obaid4ae0ce32014-06-17 13:59:20 -050030 ``register [-I] [-C] [-c <cost>] [-e expiration time] [-o origin] <prefix> <faceId | faceUri>``
hilata6ee6e072014-04-20 17:10:18 -050031
32 ``-I``
33 Unset CHILD_INHERIT flag from the routing entry.
34
35 ``-C``
36 Set CAPTURE flag in the routing entry.
37
38 ``-c <cost>``
39 Cost for the RIB entry (default is 0).
40
Syed Obaid4ae0ce32014-06-17 13:59:20 -050041 ``-e <expiration time>``
42 Expiration time of the RIB entry in milliseconds (default is 3600000).
43
44 ``-o <origin>``
45 Origin of the registration request (default is 255).
46 0 for Local producer applications, 128 for NLSR, 255 for static routes.
47
hilata6ee6e072014-04-20 17:10:18 -050048 ``prefix``
49 A prefix of an existing or to be created RIB entry, for which routing entry is
50 requested to be added or updated.
51
52 ``faceId``
53 An existing NFD Face ID number, which can be obtained, for example, using
54 ``nfd-status`` command.
55
56 ``faceUri``
57 URI of the existing or to be created Face.
58
59 ``unregister``
60 Unregister an existing routing entry from Routing Information Base (RIB).
61
62 ``unregister <prefix> <faceId>``
63
64 ``prefix``
65 A prefix of an existing RIB entry, from which routing entry is requested to be
66 removed.
67
68 ``faceId``
69 An existing NFD Face ID number, which can be obtained, for example, using
70 ``nfd-status`` command.
71
72 ``create``
73 Create a UDP unicast or TCP Face
74
75 ``create <faceUri>``
76
77 ``faceUri``
78 UDP unicast or TCP Face URI::
79
80 UDP unicast: udp[4|6]://<remote-IP-or-host>[:<remote-port>]
81 TCP: tcp[4|6]://<remote-IP-or-host>[:<remote-port>]
82
83 ``destroy``
84 Create an existing UDP unicast or TCP Face.
85
86 ``destroy <faceId | faceUri>``
87
88 ``faceId``
89 An existing NFD Face ID number, which can be obtained, for example, using
90 ``nfd-status`` command.
91
92 ``faceUri``
93 UDP unicast or TCP Face URI::
94
95 UDP unicast: udp[4|6]://<remote-IP-or-host>[:<remote-port>]
96 TCP: tcp[4|6]://<remote-IP-or-host>[:<remote-port>]
97
98 ``set-strategy``
99 Select strategy to be used for the specified namespace
100
101 ``set-strategy <namespace> <strategy-name>``
102
103 ``namespace``
104 Namespace that will use the specified strategy.
105
106 Note that more specific namespace(s) can use different strategy or strategies.
107 For example, if namespace ``/A/B/C`` was using strategy
108 ``ndn:/localhost/nfd/strategy/best-route`` before running ``set-strategy`` on
109 ``/A`` namespace, it will continue using the same strategy no matter which
110 namespace was specified for ``/A``.
111
112 ``strategy-name``
113 Name of one of the available strategies.
114
115 Currently, NFD supports the following strategies::
116
117 ndn:/localhost/nfd/strategy/best-route
118 ndn:/localhost/nfd/strategy/broadcast
119 ndn:/localhost/nfd/strategy/client-control
120 ndn:/localhost/nfd/strategy/ncc
121
122 ``unset-strategy``
123 Unset the strategy for a given ``namespace``.
124
125 Effectively, this command select parent's namespace strategy to be used for the
126 specified ``namespace``.
127
128 ``unset-strategy <namespace>``
129
130 ``namespace``
131 Namespace from which namespace customization should be removed.
132
133 ``add-nexthop``
134 Directly add nexthop entry info NFD's Forwarding Information Base (FIB). This command
135 is intended only for debugging purposes. Normally, prefix-nexhop association should
136 be registered in Routing Information Base using ``register`` command.
137
138 ``add-nexthop [-c <cost>] <prefix> <faceId | faceUri>``
139
140 ``-c <cost>``
141 Cost for the nexthop entry to be inserted (default is 0).
142
143 ``prefix``
144 A prefix of an existing or to be created FIB entry, to which nexthop
145 entry is requested to be added.
146
147 ``faceId``
148 An existing NFD Face ID number, which can be obtained, for example, using
149 ``nfd-status`` command
150
151 ``faceUri``
152 URI of the existing or to be created Face.
153
154 ``remove-nexthop``
155 Directly remove nexthop entry from NFD'S FIB. This command
156 is intended only for debugging purposes. Normally, prefix-nexhop association should
157 be unregistered from Routing Information Base using ``unregister`` command.
158
159 ``remove-nexthop <prefix> <faceId>``
160
161 ``prefix``
162 A prefix of an existing FIB entry, from which nexthop entry is requested to be removed.
163
164 ``faceId``
165 An existing NFD Face ID number, which can be obtained, for example, using
166 ``nfd-status`` command.
167
168 Note that when ``faceId`` is the last Face associated with ``prefix`` FIB entry,
169 the whole FIB entry will be removed.
170
171
172
173Examples
174--------
175
176Add a namespace to a face uri:
177
178::
179
180 nfdc register ndn:/app1/video udp://192.168.1.2
181
182Set strategy to a name:
183
184::
185
186 nfdc set-strategy ndn:/app1/video ndn:/localhost/nfd/strategy/broadcast