blob: 93b0d450958ca1d351a4d2a46fd944accc8ad867 [file] [log] [blame]
Junxiao Shi6c135622016-11-21 14:30:33 +00001nfdc-strategy
2=============
3
4SYNOPSIS
5--------
6| nfdc strategy [list]
Junxiao Shi5d3e4812017-04-05 16:52:59 +00007| nfdc strategy show [prefix] <PREFIX>
Junxiao Shib283f522017-04-06 20:46:15 +00008| nfdc strategy set [prefix] <PREFIX> [strategy] <STRATEGY>
9| nfdc strategy unset [prefix] <PREFIX>
Junxiao Shi6c135622016-11-21 14:30:33 +000010
11DESCRIPTION
12-----------
13In NFD, packet forwarding behavior is determined by forwarding pipelines and forwarding strategies.
14The forwarding pipelines define general steps of packet processing.
15Forwarding strategies provide the intelligence to make decision on whether, when, and where
16to forward Interests.
17
18NFD contains multiple forwarding strategy implementations.
19The strategy choice table determines which strategy is used in forwarding an Interest.
20
Junxiao Shi5d3e4812017-04-05 16:52:59 +000021The **nfdc strategy list** command shows a list of strategy choices.
22
23The **nfdc strategy show** command shows the effective strategy choice for a specific name.
Junxiao Shi6c135622016-11-21 14:30:33 +000024
Junxiao Shib283f522017-04-06 20:46:15 +000025The **nfdc strategy set** command sets the strategy for a name prefix.
susmit3f94ec32018-02-13 12:21:01 -070026The strategy for ``"/"`` prefix is the default strategy.
Junxiao Shi6c135622016-11-21 14:30:33 +000027
Junxiao Shib283f522017-04-06 20:46:15 +000028The **nfdc strategy unset** command clears the strategy choice at a name prefix,
Junxiao Shi6c135622016-11-21 14:30:33 +000029so that a strategy choice at a shorter prefix or the default strategy will be used.
Junxiao Shib283f522017-04-06 20:46:15 +000030It undoes a prior **nfdc strategy set** command on the same name prefix.
susmit3f94ec32018-02-13 12:21:01 -070031It is prohibited to unset the strategy choice for ``"/"`` prefix because there must always be a
Junxiao Shib283f522017-04-06 20:46:15 +000032default strategy.
Junxiao Shi6c135622016-11-21 14:30:33 +000033
34OPTIONS
35-------
Junxiao Shif0dfb332017-02-02 05:32:25 +000036<PREFIX>
Junxiao Shi6c135622016-11-21 14:30:33 +000037 The name prefix of a strategy choice.
38 The strategy choice is effective for all Interests under the name prefix,
Junxiao Shib283f522017-04-06 20:46:15 +000039 unless overridden by another strategy choice at a longer prefix.
Junxiao Shi6c135622016-11-21 14:30:33 +000040
Junxiao Shif0dfb332017-02-02 05:32:25 +000041<STRATEGY>
Junxiao Shi6c135622016-11-21 14:30:33 +000042 A name that identifies the forwarding strategy.
43 Consult NFD Developer's Guide for a complete list of all implemented strategies.
44
Ashlesh Gawande1ef93d02022-04-08 00:25:06 -040045 For the ASF, BestRoute, and Multicast strategies, the following options may be supplied
46 to configure exponential retransmission suppression by appending them after the strategy
47 name and version number.
48
49 **retx-suppression-initial**
50 Starting duration of the suppression interval within which any retransmitted
51 Interests are considered for suppression. The default value is 10 ms.
52
53 Format: ``retx-suppression-initial~<milliseconds>``
54
55 **retx-suppression-max**
56 Maximum duration of the suppression interval. Must not be smaller than
57 **retx-suppression-initial**. The default value is 250 ms.
58
59 Format: ``retx-suppression-max~<milliseconds>``
60
61 **retx-suppression-multiplier**
62 The suppression interval is increased by this multiplier. The default value is 2.
63
64 Format: ``retx-suppression-multiplier~<float>``
65
66 See :manpage:`nfd-asf-strategy(7)` for details on additional parameters for ASF strategy.
67
Junxiao Shi5d3e4812017-04-05 16:52:59 +000068EXIT CODES
69----------
Junxiao Shi5d3e4812017-04-05 16:52:59 +0000700: Success
71
721: An unspecified error occurred
73
742: Malformed command line
75
Junxiao Shib283f522017-04-06 20:46:15 +0000767: Strategy not found (**nfdc strategy set** only)
77
Junxiao Shi0e13e1e2018-01-22 08:29:12 +000078EXAMPLES
79--------
80nfdc strategy list
81 List all configured strategy choices.
82
83nfdc strategy show prefix /localhost/ping/1
84 Identify which strategy will handle Interests named "/localhost/ping/1".
85
86nfdc strategy set prefix / strategy /localhost/nfd/strategy/best-route
87 Set the default strategy to best-route, latest version.
88
Eric Newberry7249fb42021-04-04 21:09:32 -070089nfdc strategy set prefix /ndn strategy /localhost/nfd/strategy/multicast/v=4
90 Set the strategy for the "/ndn" prefix to multicast, version 4.
Junxiao Shi0e13e1e2018-01-22 08:29:12 +000091
Ashlesh Gawande1ef93d02022-04-08 00:25:06 -040092nfdc strategy set prefix /ndn strategy /localhost/nfd/strategy/multicast/v=4/retx-suppression-initial~20/retx-suppression-max~500
93 Set the strategy for the "/ndn" prefix to multicast, version 4, with retransmission
94 suppression initial interval set to 20 ms and maximum interval set to 500 ms.
95
Junxiao Shi0e13e1e2018-01-22 08:29:12 +000096nfdc strategy unset prefix /ndn
97 Clear the strategy choice for the "/ndn" prefix.
98
Junxiao Shi6c135622016-11-21 14:30:33 +000099SEE ALSO
100--------
Ashlesh Gawande92e4ea52017-07-19 11:38:12 -0500101nfd(1), nfdc(1), nfd-asf-strategy(7)