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 | |
| 30 | The **nfdc unregister** command removes a route with matching prefix, nexthop, and origin. |
| 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. |
| 43 | It must uniquely match an existing face. |
| 44 | |
| 45 | <ORIGIN> |
| 46 | Origin of the route, i.e. who is announcing the route. |
| 47 | The default is 255, indicating a static route. |
| 48 | |
| 49 | <COST> |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 50 | The administrative cost of the route. |
| 51 | The default is 0. |
| 52 | |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 53 | no-inherit |
| 54 | Unset CHILD_INHERIT flag in the route. |
| 55 | |
| 56 | capture |
| 57 | Set CAPTURE flag in the route. |
| 58 | |
| 59 | <EXPIRATION-MILLIS> |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 60 | Expiration time of the route, in milliseconds. |
| 61 | When the route expires, NFD removes it from the RIB. |
| 62 | The default is infinite, which keeps the route active until the nexthop face is destroyed. |
| 63 | |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 64 | EXIT CODES |
| 65 | ---------- |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 66 | |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 67 | 0: Success |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 68 | |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 69 | 1: An unspecified error occurred |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 70 | |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 71 | 2: Malformed command line |
| 72 | |
| 73 | 3: Face not found (**nfdc route add** only) |
| 74 | |
| 75 | 4: FaceUri canonization failed (**nfdc route add** only) |
| 76 | |
| 77 | 5: Ambiguous: multiple matching faces are found (**nfdc route add** only) |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 78 | |
| 79 | SEE ALSO |
| 80 | -------- |
| 81 | nfd(1), nfdc(1) |