blob: 8ae5bc6bc33d8d439a71170d1d13448e971fb5e9 [file] [log] [blame]
Junxiao Shi6c135622016-11-21 14:30:33 +00001nfdc-route
2==========
3
4SYNOPSIS
5--------
Junxiao Shi1d62e622017-03-08 22:39:28 +00006| nfdc route [list [[nexthop] <FACEID|FACEURI>] [origin <ORIGIN>]]
7| nfdc route show [prefix] <PREFIX>
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 Shi1d62e622017-03-08 22:39:28 +000010| nfdc route remove [prefix] <PREFIX> [nexthop] <FACEID|FACEURI> [origin <ORIGIN>]
11| nfdc fib [list]
Junxiao Shi6c135622016-11-21 14:30:33 +000012
13DESCRIPTION
14-----------
15In NFD, the routing information base (RIB) stores static or dynamic routing information
16registered by applications, operators, and NFD itself.
17Each *route* in the RIB indicates that contents under a name prefix may be available via a nexthop.
18A route contains a name prefix, a nexthop face, the origin, a cost, and a set of route inheritance flags;
19refer to NFD Management protocol for more information.
20
Junxiao Shi1d62e622017-03-08 22:39:28 +000021The **nfdc route list** command lists RIB routes, optionally filtered by nexthop and origin.
Junxiao Shi6c135622016-11-21 14:30:33 +000022
Junxiao Shi1d62e622017-03-08 22:39:28 +000023The **nfdc route show** command shows RIB routes at a specified name prefix.
Junxiao Shi6c135622016-11-21 14:30:33 +000024
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
Junxiao Shi1d62e622017-03-08 22:39:28 +000032The **nfdc fib list** command shows the forwarding information base (FIB),
33which is calculated from RIB routes and used directly by NFD forwarding.
34
Junxiao Shi6c135622016-11-21 14:30:33 +000035OPTIONS
36-------
Junxiao Shi918e5d42017-02-25 03:58:21 +000037<PREFIX>
38 Name prefix of the route.
Junxiao Shi6c135622016-11-21 14:30:33 +000039
Junxiao Shi918e5d42017-02-25 03:58:21 +000040<FACEID>
41 Numerical identifier of the face.
42 It is displayed in the output of **nfdc face list** and **nfdc face create** commands.
Junxiao Shi6c135622016-11-21 14:30:33 +000043
Junxiao Shi918e5d42017-02-25 03:58:21 +000044<FACEURI>
45 An URI representing the remote endpoint of a face.
Junxiao Shi084b7952017-02-26 22:00:53 +000046 In **nfdc route add** command, it must uniquely match an existing face.
47 In **nfdc route remove** command, it must match one or more existing faces.
Junxiao Shi918e5d42017-02-25 03:58:21 +000048
49<ORIGIN>
50 Origin of the route, i.e. who is announcing the route.
51 The default is 255, indicating a static route.
52
53<COST>
Junxiao Shi6c135622016-11-21 14:30:33 +000054 The administrative cost of the route.
55 The default is 0.
56
Junxiao Shi918e5d42017-02-25 03:58:21 +000057no-inherit
58 Unset CHILD_INHERIT flag in the route.
59
60capture
61 Set CAPTURE flag in the route.
62
63<EXPIRATION-MILLIS>
Junxiao Shi6c135622016-11-21 14:30:33 +000064 Expiration time of the route, in milliseconds.
65 When the route expires, NFD removes it from the RIB.
66 The default is infinite, which keeps the route active until the nexthop face is destroyed.
67
Junxiao Shi918e5d42017-02-25 03:58:21 +000068EXIT CODES
69----------
Junxiao Shi6c135622016-11-21 14:30:33 +000070
Junxiao Shi918e5d42017-02-25 03:58:21 +0000710: Success
Junxiao Shi6c135622016-11-21 14:30:33 +000072
Junxiao Shi918e5d42017-02-25 03:58:21 +0000731: An unspecified error occurred
Junxiao Shi6c135622016-11-21 14:30:33 +000074
Junxiao Shi918e5d42017-02-25 03:58:21 +0000752: Malformed command line
76
Junxiao Shi084b7952017-02-26 22:00:53 +0000773: Face not found
Junxiao Shi918e5d42017-02-25 03:58:21 +000078
Junxiao Shi084b7952017-02-26 22:00:53 +0000794: FaceUri canonization failed
Junxiao Shi918e5d42017-02-25 03:58:21 +000080
815: Ambiguous: multiple matching faces are found (**nfdc route add** only)
Junxiao Shi6c135622016-11-21 14:30:33 +000082
Junxiao Shi1d62e622017-03-08 22:39:28 +0000836: Route not found (**nfdc route list** and **nfdc route show** only)
84
Junxiao Shi6c135622016-11-21 14:30:33 +000085SEE ALSO
86--------
87nfd(1), nfdc(1)