Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 1 | nfdc-strategy |
| 2 | ============= |
| 3 | |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 4 | Synopsis |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 5 | -------- |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 6 | |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 7 | | **nfdc strategy** [**list**] |
| 8 | | **nfdc strategy** **show** [**prefix**] *PREFIX* |
| 9 | | **nfdc strategy** **set** [**prefix**] *PREFIX* [**strategy**] *STRATEGY* |
| 10 | | **nfdc strategy** **unset** [**prefix**] *PREFIX* |
| 11 | |
| 12 | Description |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 13 | ----------- |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 14 | |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 15 | In NFD, packet forwarding behavior is determined by forwarding pipelines and forwarding strategies. |
| 16 | The forwarding pipelines define general steps of packet processing. |
| 17 | Forwarding strategies provide the intelligence to make decision on whether, when, and where |
| 18 | to forward Interests. |
| 19 | |
| 20 | NFD contains multiple forwarding strategy implementations. |
| 21 | The strategy choice table determines which strategy is used in forwarding an Interest. |
| 22 | |
Junxiao Shi | 5d3e481 | 2017-04-05 16:52:59 +0000 | [diff] [blame] | 23 | The **nfdc strategy list** command shows a list of strategy choices. |
| 24 | |
| 25 | 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] | 26 | |
Junxiao Shi | b283f52 | 2017-04-06 20:46:15 +0000 | [diff] [blame] | 27 | The **nfdc strategy set** command sets the strategy for a name prefix. |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 28 | The strategy for the ``"/"`` prefix is the default strategy. |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 29 | |
Junxiao Shi | b283f52 | 2017-04-06 20:46:15 +0000 | [diff] [blame] | 30 | 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] | 31 | 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] | 32 | It undoes a prior **nfdc strategy set** command on the same name prefix. |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 33 | It is prohibited to unset the strategy choice for the ``"/"`` prefix because there must always be |
| 34 | a default strategy. |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 35 | |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 36 | Options |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 37 | ------- |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 38 | |
| 39 | .. option:: <PREFIX> |
| 40 | |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 41 | The name prefix of a strategy choice. |
| 42 | The strategy choice is effective for all Interests under the name prefix, |
Junxiao Shi | b283f52 | 2017-04-06 20:46:15 +0000 | [diff] [blame] | 43 | unless overridden by another strategy choice at a longer prefix. |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 44 | |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 45 | .. option:: <STRATEGY> |
| 46 | |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 47 | A name that identifies the forwarding strategy. |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 48 | Consult the NFD Developer's Guide for a complete list of all implemented strategies. |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 49 | |
Ashlesh Gawande | 1ef93d0 | 2022-04-08 00:25:06 -0400 | [diff] [blame] | 50 | For the ASF, BestRoute, and Multicast strategies, the following options may be supplied |
| 51 | to configure exponential retransmission suppression by appending them after the strategy |
| 52 | name and version number. |
| 53 | |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 54 | retx-suppression-initial |
Ashlesh Gawande | 1ef93d0 | 2022-04-08 00:25:06 -0400 | [diff] [blame] | 55 | Starting duration of the suppression interval within which any retransmitted |
| 56 | Interests are considered for suppression. The default value is 10 ms. |
| 57 | |
| 58 | Format: ``retx-suppression-initial~<milliseconds>`` |
| 59 | |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 60 | retx-suppression-max |
Ashlesh Gawande | 1ef93d0 | 2022-04-08 00:25:06 -0400 | [diff] [blame] | 61 | Maximum duration of the suppression interval. Must not be smaller than |
| 62 | **retx-suppression-initial**. The default value is 250 ms. |
| 63 | |
| 64 | Format: ``retx-suppression-max~<milliseconds>`` |
| 65 | |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 66 | retx-suppression-multiplier |
Ashlesh Gawande | 1ef93d0 | 2022-04-08 00:25:06 -0400 | [diff] [blame] | 67 | The suppression interval is increased by this multiplier. The default value is 2. |
| 68 | |
| 69 | Format: ``retx-suppression-multiplier~<float>`` |
| 70 | |
| 71 | See :manpage:`nfd-asf-strategy(7)` for details on additional parameters for ASF strategy. |
| 72 | |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 73 | Exit Status |
| 74 | ----------- |
Junxiao Shi | 5d3e481 | 2017-04-05 16:52:59 +0000 | [diff] [blame] | 75 | |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 76 | 0 |
| 77 | Success. |
Junxiao Shi | 5d3e481 | 2017-04-05 16:52:59 +0000 | [diff] [blame] | 78 | |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 79 | 1 |
| 80 | An unspecified error occurred. |
Junxiao Shi | 5d3e481 | 2017-04-05 16:52:59 +0000 | [diff] [blame] | 81 | |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 82 | 2 |
| 83 | Malformed command line. |
Junxiao Shi | b283f52 | 2017-04-06 20:46:15 +0000 | [diff] [blame] | 84 | |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 85 | 7 |
| 86 | Strategy not found (**nfdc strategy set** only). |
| 87 | |
| 88 | Examples |
Junxiao Shi | 0e13e1e | 2018-01-22 08:29:12 +0000 | [diff] [blame] | 89 | -------- |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 90 | |
| 91 | ``nfdc strategy list`` |
Junxiao Shi | 0e13e1e | 2018-01-22 08:29:12 +0000 | [diff] [blame] | 92 | List all configured strategy choices. |
| 93 | |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 94 | ``nfdc strategy show prefix /localhost/ping/1`` |
Junxiao Shi | 0e13e1e | 2018-01-22 08:29:12 +0000 | [diff] [blame] | 95 | Identify which strategy will handle Interests named "/localhost/ping/1". |
| 96 | |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 97 | ``nfdc strategy set prefix / strategy /localhost/nfd/strategy/best-route`` |
Junxiao Shi | 0e13e1e | 2018-01-22 08:29:12 +0000 | [diff] [blame] | 98 | Set the default strategy to best-route, latest version. |
| 99 | |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 100 | ``nfdc strategy set prefix /ndn strategy /localhost/nfd/strategy/multicast/v=4`` |
Eric Newberry | 7249fb4 | 2021-04-04 21:09:32 -0700 | [diff] [blame] | 101 | Set the strategy for the "/ndn" prefix to multicast, version 4. |
Junxiao Shi | 0e13e1e | 2018-01-22 08:29:12 +0000 | [diff] [blame] | 102 | |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 103 | ``nfdc strategy set prefix /ndn strategy /localhost/nfd/strategy/multicast/v=4/retx-suppression-initial~20/retx-suppression-max~500`` |
Ashlesh Gawande | 1ef93d0 | 2022-04-08 00:25:06 -0400 | [diff] [blame] | 104 | Set the strategy for the "/ndn" prefix to multicast, version 4, with retransmission |
| 105 | suppression initial interval set to 20 ms and maximum interval set to 500 ms. |
| 106 | |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 107 | ``nfdc strategy unset prefix /ndn`` |
Junxiao Shi | 0e13e1e | 2018-01-22 08:29:12 +0000 | [diff] [blame] | 108 | Clear the strategy choice for the "/ndn" prefix. |
| 109 | |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 110 | See Also |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 111 | -------- |
Davide Pesavento | 543b152 | 2024-06-25 17:00:32 -0400 | [diff] [blame] | 112 | |
| 113 | :manpage:`nfdc(1)`, |
| 114 | :manpage:`nfd-asf-strategy(7)` |