Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 1 | nfdc-route |
| 2 | ========== |
| 3 | |
| 4 | SYNOPSIS |
| 5 | -------- |
Junxiao Shi | 1d62e62 | 2017-03-08 22:39:28 +0000 | [diff] [blame] | 6 | | nfdc route [list [[nexthop] <FACEID|FACEURI>] [origin <ORIGIN>]] |
| 7 | | nfdc route show [prefix] <PREFIX> |
Davide Pesavento | d214744 | 2018-02-19 23:58:17 -0500 | [diff] [blame] | 8 | | nfdc route add [prefix] <PREFIX> [nexthop] <FACEID|FACEURI> [origin <ORIGIN>] |
| 9 | | [cost <COST>] [no-inherit] [capture] [expires <EXPIRATION-MILLIS>] |
Junxiao Shi | 1d62e62 | 2017-03-08 22:39:28 +0000 | [diff] [blame] | 10 | | nfdc route remove [prefix] <PREFIX> [nexthop] <FACEID|FACEURI> [origin <ORIGIN>] |
| 11 | | nfdc fib [list] |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 12 | |
| 13 | DESCRIPTION |
| 14 | ----------- |
| 15 | In NFD, the routing information base (RIB) stores static or dynamic routing information |
| 16 | registered by applications, operators, and NFD itself. |
| 17 | Each *route* in the RIB indicates that contents under a name prefix may be available via a nexthop. |
| 18 | A route contains a name prefix, a nexthop face, the origin, a cost, and a set of route inheritance flags; |
| 19 | refer to NFD Management protocol for more information. |
| 20 | |
Junxiao Shi | 1d62e62 | 2017-03-08 22:39:28 +0000 | [diff] [blame] | 21 | The **nfdc route list** command lists RIB routes, optionally filtered by nexthop and origin. |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 22 | |
Junxiao Shi | 1d62e62 | 2017-03-08 22:39:28 +0000 | [diff] [blame] | 23 | The **nfdc route show** command shows RIB routes at a specified name prefix. |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 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. |
Eric Newberry | d656aff | 2020-04-03 00:30:38 -0700 | [diff] [blame] | 29 | If no face matching the specified URI is found, nfdc will attempt to implicitly create a face with |
| 30 | this URI before adding the route. |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 31 | |
Junxiao Shi | 084b795 | 2017-02-26 22:00:53 +0000 | [diff] [blame] | 32 | 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] | 33 | |
Junxiao Shi | 1d62e62 | 2017-03-08 22:39:28 +0000 | [diff] [blame] | 34 | The **nfdc fib list** command shows the forwarding information base (FIB), |
| 35 | which is calculated from RIB routes and used directly by NFD forwarding. |
| 36 | |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 37 | OPTIONS |
| 38 | ------- |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 39 | <PREFIX> |
| 40 | Name prefix of the route. |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 41 | |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 42 | <FACEID> |
| 43 | Numerical identifier of the face. |
| 44 | 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] | 45 | |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 46 | <FACEURI> |
| 47 | An URI representing the remote endpoint of a face. |
Junxiao Shi | 084b795 | 2017-02-26 22:00:53 +0000 | [diff] [blame] | 48 | In **nfdc route add** command, it must uniquely match an existing face. |
| 49 | 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] | 50 | |
| 51 | <ORIGIN> |
| 52 | Origin of the route, i.e. who is announcing the route. |
| 53 | The default is 255, indicating a static route. |
| 54 | |
| 55 | <COST> |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 56 | The administrative cost of the route. |
| 57 | The default is 0. |
| 58 | |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 59 | no-inherit |
| 60 | Unset CHILD_INHERIT flag in the route. |
| 61 | |
| 62 | capture |
| 63 | Set CAPTURE flag in the route. |
| 64 | |
| 65 | <EXPIRATION-MILLIS> |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 66 | Expiration time of the route, in milliseconds. |
| 67 | When the route expires, NFD removes it from the RIB. |
| 68 | The default is infinite, which keeps the route active until the nexthop face is destroyed. |
| 69 | |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 70 | EXIT CODES |
| 71 | ---------- |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 72 | 0: Success |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 73 | |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 74 | 1: An unspecified error occurred |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 75 | |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 76 | 2: Malformed command line |
| 77 | |
Junxiao Shi | 084b795 | 2017-02-26 22:00:53 +0000 | [diff] [blame] | 78 | 3: Face not found |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 79 | |
Junxiao Shi | 084b795 | 2017-02-26 22:00:53 +0000 | [diff] [blame] | 80 | 4: FaceUri canonization failed |
Junxiao Shi | 918e5d4 | 2017-02-25 03:58:21 +0000 | [diff] [blame] | 81 | |
| 82 | 5: Ambiguous: multiple matching faces are found (**nfdc route add** only) |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 83 | |
Junxiao Shi | 1d62e62 | 2017-03-08 22:39:28 +0000 | [diff] [blame] | 84 | 6: Route not found (**nfdc route list** and **nfdc route show** only) |
| 85 | |
Junxiao Shi | 0e13e1e | 2018-01-22 08:29:12 +0000 | [diff] [blame] | 86 | EXAMPLES |
| 87 | -------- |
| 88 | nfdc route list |
| 89 | List all routes. |
| 90 | |
| 91 | nfdc route list nexthop 300 |
| 92 | List routes whose nexthop is face 300. |
| 93 | |
| 94 | nfdc route list origin static |
| 95 | List static routes. |
| 96 | |
| 97 | nfdc route show prefix /localhost/nfd |
| 98 | List routes with name prefix "/localhost/nfd". |
| 99 | |
| 100 | nfdc route add prefix /ndn nexthop 300 cost 100 |
| 101 | Add a route with prefix "/ndn" toward face 300, with administrative cost 100. |
| 102 | |
| 103 | nfdc route add prefix / nexthop udp://router.example.net |
| 104 | Add a route with prefix "/" toward a face with the specified remote FaceUri. |
| 105 | |
| 106 | nfdc route remove prefix /ndn nexthop 300 origin static |
| 107 | Remove the route whose prefix is "/ndn", nexthop is face 300, and origin is "static". |
| 108 | |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 109 | SEE ALSO |
| 110 | -------- |
| 111 | nfd(1), nfdc(1) |