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