FibMgmt » History » Revision 27
« Previous |
Revision 27/44
(diff)
| Next »
Junxiao Shi, 03/06/2014 09:42 PM
NFD FIB Management Protocol¶
The FIB management protocol allows an entity to manipulate the FIB entry.
The FIB management protocol uses Command Interests-Data exchange.
The command request and response follows the NFD Control Command specification
Command format¶
Request¶
Request is a Signed Command Interest with the following name:
/localhost/nfd/fib/<command-verb>/<command-options>/............................
\ / \ / \ /
------- ------- ------------- --------------- ------------ ------------
\/ \/ \/
NFD Control Command FibManager command Command Interest
to FibManager and command options related information
Command options is defined as a TLV-encoded FibManagementOptions
block.
Each individual command defines a subset of required and optional elements in the FibManagementOptions
block.
Note that Name
field is required for FibManagementOptions
block.
FibManagementOptions ::= FIB-MANAGEMENT-OPTIONS-TYPE TLV-LENGTH
Name
FaceId?
Cost?
// Name defined in NDN-TLV spec
FaceId ::= FACEID-TYPE TLV-LENGTH
nonNegativeInteger
Cost ::= COST-TYPE TLV-LENGTH
nonNegativeInteger
Response¶
Command response is a Data packet that contains TLV-encoded ControlResponse
block, defined in NFD Control Command specification.
Content of ControlResponse
on success:
Field in ControlResponse block |
Value |
---|---|
StatusCode |
200 |
StatusText |
"Success" |
<StatusBody> |
FibManagementOptions block, either echoed or with updated FaceId field |
Content of ControlResponse
on error:
Field in ControlResponse block |
Value |
---|---|
StatusCode |
4xx, 5xx, or other error codes based on RFC2616 |
StatusText |
Human-readable description of the error |
<StatusBody> |
Not present |
Operations¶
FIB management protocol supports two operations:
- add-nexthop: add a nexthop to a FIB entry
- remove-nexthop: remove a nexthop from a FIB entry
Add a nexthop¶
command-verb: add-nexthop
This command adds a nexthop to a FIB entry.
If the FIB entry does not exist, it is inserted automatically.
Required fields in FibManagementOptions
block:
Name
FaceId
Cost
FaceId is the FaceId returned in NFD Face Management protocol.
If FaceId is set to zero, it is implied as the face of the entity sending this command.
If a nexthop of same FaceId
exists on the FIB entry, its cost is updated.
Remove a nexthop¶
command-verb: remove-nexthop
This command removes a nexthop from a FIB entry.
If the last nexthop record in a FIB entry is removed, the FIB entry is also deleted.
Required fields in FibManagementOptions
block:
Name
FaceId
FaceId is the FaceId returned in NFD Face Management protocol.
If FaceId is set to zero, it is implied as the face of the entity sending this command.
If the FIB entry does not exist, the response has StatusCode 404.
If the specified nexthop does not exist on the FIB entry, this command does nothing,
but is still considered successful.
TLV-TYPE assignments¶
Type | Assigned value | Assigned value (hex) |
---|---|---|
FibManagementOptions | 104 | 0x68 |
FaceId | 105 | 0x69 |
Cost | 106 | 0x6a |
Updated by Junxiao Shi almost 11 years ago · 36 revisions