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