blob: 0c2f0e0b4a9a1b88a1f103892c77b837bbf7cf63 [file] [log] [blame]
Junxiao Shi6c135622016-11-21 14:30:33 +00001nfdc-route
2==========
3
4SYNOPSIS
5--------
6| nfdc route [list]
7| nfdc fib [list]
Junxiao Shi918e5d42017-02-25 03:58:21 +00008| nfdc route add [prefix] <PREFIX> [nexthop] <FACEID|FACEURI> [origin <ORIGIN>] [cost <COST>]
9| [no-inherit] [capture] [expires <EXPIRATION-MILLIS>]
Junxiao Shif0dfb332017-02-02 05:32:25 +000010| nfdc unregister [-o <ORIGIN>] <PREFIX> <FACEID>
Junxiao Shi6c135622016-11-21 14:30:33 +000011
12DESCRIPTION
13-----------
14In NFD, the routing information base (RIB) stores static or dynamic routing information
15registered by applications, operators, and NFD itself.
16Each *route* in the RIB indicates that contents under a name prefix may be available via a nexthop.
17A route contains a name prefix, a nexthop face, the origin, a cost, and a set of route inheritance flags;
18refer to NFD Management protocol for more information.
19
20The **nfdc route list** command shows a list of routes in the RIB.
21
22The **nfdc fib list** command shows the forwarding information base (FIB),
23which is calculated from RIB routes and used directly by NFD forwarding.
24
Junxiao Shi918e5d42017-02-25 03:58:21 +000025The **nfdc route add** command requests to add a route.
Junxiao Shi6c135622016-11-21 14:30:33 +000026If a route with the same prefix, nexthop, and origin already exists,
Junxiao Shi918e5d42017-02-25 03:58:21 +000027it is updated with the specified cost, route inheritance flags, and expiration period.
28This command returns when the request has been accepted, but does not wait for RIB update completion.
Junxiao Shi6c135622016-11-21 14:30:33 +000029
Junxiao Shi084b7952017-02-26 22:00:53 +000030The **nfdc route remove** command removes a route with matching prefix, nexthop, and origin.
Junxiao Shi6c135622016-11-21 14:30:33 +000031
32OPTIONS
33-------
Junxiao Shi918e5d42017-02-25 03:58:21 +000034<PREFIX>
35 Name prefix of the route.
Junxiao Shi6c135622016-11-21 14:30:33 +000036
Junxiao Shi918e5d42017-02-25 03:58:21 +000037<FACEID>
38 Numerical identifier of the face.
39 It is displayed in the output of **nfdc face list** and **nfdc face create** commands.
Junxiao Shi6c135622016-11-21 14:30:33 +000040
Junxiao Shi918e5d42017-02-25 03:58:21 +000041<FACEURI>
42 An URI representing the remote endpoint of a face.
Junxiao Shi084b7952017-02-26 22:00:53 +000043 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 Shi918e5d42017-02-25 03:58:21 +000045
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 Shi6c135622016-11-21 14:30:33 +000051 The administrative cost of the route.
52 The default is 0.
53
Junxiao Shi918e5d42017-02-25 03:58:21 +000054no-inherit
55 Unset CHILD_INHERIT flag in the route.
56
57capture
58 Set CAPTURE flag in the route.
59
60<EXPIRATION-MILLIS>
Junxiao Shi6c135622016-11-21 14:30:33 +000061 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 Shi918e5d42017-02-25 03:58:21 +000065EXIT CODES
66----------
Junxiao Shi6c135622016-11-21 14:30:33 +000067
Junxiao Shi918e5d42017-02-25 03:58:21 +0000680: Success
Junxiao Shi6c135622016-11-21 14:30:33 +000069
Junxiao Shi918e5d42017-02-25 03:58:21 +0000701: An unspecified error occurred
Junxiao Shi6c135622016-11-21 14:30:33 +000071
Junxiao Shi918e5d42017-02-25 03:58:21 +0000722: Malformed command line
73
Junxiao Shi084b7952017-02-26 22:00:53 +0000743: Face not found
Junxiao Shi918e5d42017-02-25 03:58:21 +000075
Junxiao Shi084b7952017-02-26 22:00:53 +0000764: FaceUri canonization failed
Junxiao Shi918e5d42017-02-25 03:58:21 +000077
785: Ambiguous: multiple matching faces are found (**nfdc route add** only)
Junxiao Shi6c135622016-11-21 14:30:33 +000079
80SEE ALSO
81--------
82nfd(1), nfdc(1)