blob: 7b01c44193d6887af1517a38fc0163c0a9088d81 [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
30The **nfdc unregister** command removes a route with matching prefix, nexthop, and origin.
31
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.
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 Shi6c135622016-11-21 14:30:33 +000050 The administrative cost of the route.
51 The default is 0.
52
Junxiao Shi918e5d42017-02-25 03:58:21 +000053no-inherit
54 Unset CHILD_INHERIT flag in the route.
55
56capture
57 Set CAPTURE flag in the route.
58
59<EXPIRATION-MILLIS>
Junxiao Shi6c135622016-11-21 14:30:33 +000060 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 Shi918e5d42017-02-25 03:58:21 +000064EXIT CODES
65----------
Junxiao Shi6c135622016-11-21 14:30:33 +000066
Junxiao Shi918e5d42017-02-25 03:58:21 +0000670: Success
Junxiao Shi6c135622016-11-21 14:30:33 +000068
Junxiao Shi918e5d42017-02-25 03:58:21 +0000691: An unspecified error occurred
Junxiao Shi6c135622016-11-21 14:30:33 +000070
Junxiao Shi918e5d42017-02-25 03:58:21 +0000712: Malformed command line
72
733: Face not found (**nfdc route add** only)
74
754: FaceUri canonization failed (**nfdc route add** only)
76
775: Ambiguous: multiple matching faces are found (**nfdc route add** only)
Junxiao Shi6c135622016-11-21 14:30:33 +000078
79SEE ALSO
80--------
81nfd(1), nfdc(1)