Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 1 | nfdc-route |
| 2 | ========== |
| 3 | |
| 4 | SYNOPSIS |
| 5 | -------- |
| 6 | | nfdc route [list] |
| 7 | | nfdc fib [list] |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 8 | | nfdc route add [prefix] <PREFIX> [nexthop] <FACEID|FACEURI> [origin <ORIGIN>] [cost <COST>] |
| 9 | | [no-inherit] [capture] [expires <EXPIRATION-MILLIS>] |
Junxiao Shi | f0dfb33 | 2017-02-02 05:32:25 +0000 | [diff] [blame] | 10 | | nfdc unregister [-o <ORIGIN>] <PREFIX> <FACEID> |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 11 | |
| 12 | DESCRIPTION |
| 13 | ----------- |
| 14 | In NFD, the routing information base (RIB) stores static or dynamic routing information |
| 15 | registered by applications, operators, and NFD itself. |
| 16 | Each *route* in the RIB indicates that contents under a name prefix may be available via a nexthop. |
| 17 | A route contains a name prefix, a nexthop face, the origin, a cost, and a set of route inheritance flags; |
| 18 | refer to NFD Management protocol for more information. |
| 19 | |
| 20 | The **nfdc route list** command shows a list of routes in the RIB. |
| 21 | |
| 22 | The **nfdc fib list** command shows the forwarding information base (FIB), |
| 23 | which is calculated from RIB routes and used directly by NFD forwarding. |
| 24 | |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 25 | The **nfdc route add** command requests to add a route. |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 26 | If a route with the same prefix, nexthop, and origin already exists, |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 27 | it is updated with the specified cost, route inheritance flags, and expiration period. |
| 28 | This command returns when the request has been accepted, but does not wait for RIB update completion. |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 29 | |
Junxiao Shi | 084b795 | 2017-02-26 22:00:53 +0000 | [diff] [blame] | 30 | The **nfdc route remove** command removes a route with matching prefix, nexthop, and origin. |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 31 | |
| 32 | OPTIONS |
| 33 | ------- |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 34 | <PREFIX> |
| 35 | Name prefix of the route. |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 36 | |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 37 | <FACEID> |
| 38 | Numerical identifier of the face. |
| 39 | It is displayed in the output of **nfdc face list** and **nfdc face create** commands. |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 40 | |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 41 | <FACEURI> |
| 42 | An URI representing the remote endpoint of a face. |
Junxiao Shi | 084b795 | 2017-02-26 22:00:53 +0000 | [diff] [blame] | 43 | In **nfdc route add** command, it must uniquely match an existing face. |
| 44 | In **nfdc route remove** command, it must match one or more existing faces. |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 45 | |
| 46 | <ORIGIN> |
| 47 | Origin of the route, i.e. who is announcing the route. |
| 48 | The default is 255, indicating a static route. |
| 49 | |
| 50 | <COST> |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 51 | The administrative cost of the route. |
| 52 | The default is 0. |
| 53 | |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 54 | no-inherit |
| 55 | Unset CHILD_INHERIT flag in the route. |
| 56 | |
| 57 | capture |
| 58 | Set CAPTURE flag in the route. |
| 59 | |
| 60 | <EXPIRATION-MILLIS> |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 61 | Expiration time of the route, in milliseconds. |
| 62 | When the route expires, NFD removes it from the RIB. |
| 63 | The default is infinite, which keeps the route active until the nexthop face is destroyed. |
| 64 | |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 65 | EXIT CODES |
| 66 | ---------- |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 67 | |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 68 | 0: Success |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 69 | |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 70 | 1: An unspecified error occurred |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 71 | |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 72 | 2: Malformed command line |
| 73 | |
Junxiao Shi | 084b795 | 2017-02-26 22:00:53 +0000 | [diff] [blame] | 74 | 3: Face not found |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 75 | |
Junxiao Shi | 084b795 | 2017-02-26 22:00:53 +0000 | [diff] [blame] | 76 | 4: FaceUri canonization failed |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 77 | |
| 78 | 5: Ambiguous: multiple matching faces are found (**nfdc route add** only) |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 79 | |
| 80 | SEE ALSO |
| 81 | -------- |
| 82 | nfd(1), nfdc(1) |