Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 1 | nfdc-strategy |
| 2 | ============= |
| 3 | |
| 4 | SYNOPSIS |
| 5 | -------- |
| 6 | | nfdc strategy [list] |
Junxiao Shi | 5d3e481 | 2017-04-05 16:52:59 +0000 | [diff] [blame] | 7 | | nfdc strategy show [prefix] <PREFIX> |
Junxiao Shi | b283f52 | 2017-04-06 20:46:15 +0000 | [diff] [blame] | 8 | | nfdc strategy set [prefix] <PREFIX> [strategy] <STRATEGY> |
| 9 | | nfdc strategy unset [prefix] <PREFIX> |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 10 | |
| 11 | DESCRIPTION |
| 12 | ----------- |
| 13 | In NFD, packet forwarding behavior is determined by forwarding pipelines and forwarding strategies. |
| 14 | The forwarding pipelines define general steps of packet processing. |
| 15 | Forwarding strategies provide the intelligence to make decision on whether, when, and where |
| 16 | to forward Interests. |
| 17 | |
| 18 | NFD contains multiple forwarding strategy implementations. |
| 19 | The strategy choice table determines which strategy is used in forwarding an Interest. |
| 20 | |
Junxiao Shi | 5d3e481 | 2017-04-05 16:52:59 +0000 | [diff] [blame] | 21 | The **nfdc strategy list** command shows a list of strategy choices. |
| 22 | |
| 23 | The **nfdc strategy show** command shows the effective strategy choice for a specific name. |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 24 | |
Junxiao Shi | b283f52 | 2017-04-06 20:46:15 +0000 | [diff] [blame] | 25 | The **nfdc strategy set** command sets the strategy for a name prefix. |
susmit | 3f94ec3 | 2018-02-13 12:21:01 -0700 | [diff] [blame] | 26 | The strategy for ``"/"`` prefix is the default strategy. |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 27 | |
Junxiao Shi | b283f52 | 2017-04-06 20:46:15 +0000 | [diff] [blame] | 28 | The **nfdc strategy unset** command clears the strategy choice at a name prefix, |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 29 | so that a strategy choice at a shorter prefix or the default strategy will be used. |
Junxiao Shi | b283f52 | 2017-04-06 20:46:15 +0000 | [diff] [blame] | 30 | It undoes a prior **nfdc strategy set** command on the same name prefix. |
susmit | 3f94ec3 | 2018-02-13 12:21:01 -0700 | [diff] [blame] | 31 | It is prohibited to unset the strategy choice for ``"/"`` prefix because there must always be a |
Junxiao Shi | b283f52 | 2017-04-06 20:46:15 +0000 | [diff] [blame] | 32 | default strategy. |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 33 | |
| 34 | OPTIONS |
| 35 | ------- |
Junxiao Shi | f0dfb33 | 2017-02-02 05:32:25 +0000 | [diff] [blame] | 36 | <PREFIX> |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 37 | The name prefix of a strategy choice. |
| 38 | The strategy choice is effective for all Interests under the name prefix, |
Junxiao Shi | b283f52 | 2017-04-06 20:46:15 +0000 | [diff] [blame] | 39 | unless overridden by another strategy choice at a longer prefix. |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 40 | |
Junxiao Shi | f0dfb33 | 2017-02-02 05:32:25 +0000 | [diff] [blame] | 41 | <STRATEGY> |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 42 | A name that identifies the forwarding strategy. |
| 43 | Consult NFD Developer's Guide for a complete list of all implemented strategies. |
| 44 | |
Ashlesh Gawande | 1ef93d0 | 2022-04-08 00:25:06 -0400 | [diff] [blame^] | 45 | 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 Shi | 5d3e481 | 2017-04-05 16:52:59 +0000 | [diff] [blame] | 68 | EXIT CODES |
| 69 | ---------- |
Junxiao Shi | 5d3e481 | 2017-04-05 16:52:59 +0000 | [diff] [blame] | 70 | 0: Success |
| 71 | |
| 72 | 1: An unspecified error occurred |
| 73 | |
| 74 | 2: Malformed command line |
| 75 | |
Junxiao Shi | b283f52 | 2017-04-06 20:46:15 +0000 | [diff] [blame] | 76 | 7: Strategy not found (**nfdc strategy set** only) |
| 77 | |
Junxiao Shi | 0e13e1e | 2018-01-22 08:29:12 +0000 | [diff] [blame] | 78 | EXAMPLES |
| 79 | -------- |
| 80 | nfdc strategy list |
| 81 | List all configured strategy choices. |
| 82 | |
| 83 | nfdc strategy show prefix /localhost/ping/1 |
| 84 | Identify which strategy will handle Interests named "/localhost/ping/1". |
| 85 | |
| 86 | nfdc strategy set prefix / strategy /localhost/nfd/strategy/best-route |
| 87 | Set the default strategy to best-route, latest version. |
| 88 | |
Eric Newberry | 7249fb4 | 2021-04-04 21:09:32 -0700 | [diff] [blame] | 89 | nfdc strategy set prefix /ndn strategy /localhost/nfd/strategy/multicast/v=4 |
| 90 | Set the strategy for the "/ndn" prefix to multicast, version 4. |
Junxiao Shi | 0e13e1e | 2018-01-22 08:29:12 +0000 | [diff] [blame] | 91 | |
Ashlesh Gawande | 1ef93d0 | 2022-04-08 00:25:06 -0400 | [diff] [blame^] | 92 | nfdc 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 Shi | 0e13e1e | 2018-01-22 08:29:12 +0000 | [diff] [blame] | 96 | nfdc strategy unset prefix /ndn |
| 97 | Clear the strategy choice for the "/ndn" prefix. |
| 98 | |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 99 | SEE ALSO |
| 100 | -------- |
Ashlesh Gawande | 92e4ea5 | 2017-07-19 11:38:12 -0500 | [diff] [blame] | 101 | nfd(1), nfdc(1), nfd-asf-strategy(7) |