FibMgmt » History » Revision 20
« Previous |
Revision 20/44
(diff)
| Next »
Junxiao Shi, 02/14/2014 11:08 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 Interest with the following name:
/localhost/nfd/fib/<command-verb>/<command-options>/<timestamp>/<random-value>/<SignatureInfo>/<SignatureValue>
\ / \ / \ /
------- ------- ------------- --------------- --------------------------- ----------------------------
\/ \/ \/
NFD Control Command FibManager command Command Interest related information
to FibManager and command options
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?
Strategy?
// Name defined in NDN-TLV spec
FaceId ::= FACEID-TYPE TLV-LENGTH
nonNegativeInteger
Cost ::= COST-TYPE TLV-LENGTH
nonNegativeInteger
Strategy ::= STRATEGY-TYPE TLV-LENGTH
Name
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, 500x, or other error codes based on RFC2616 |
StatusText |
Human-readable description of the error |
<StatusBody> |
Not present |
Operations¶
FIB management protocol protocol supports five operations:
- insert a FIB entry (command-verb:
insert
) - delete a FIB entry (command-verb:
delete
) - add a nexthop to a FIB entry (command-verb:
add-nexthop
) - remove a nexthop from a FIB entry (command-verb:
remove-nexthop
) - set the forwarding strategy for a namespace (command-verb:
set-strategy
)
Insert a FIB entry¶
command-verb: insert
Required fields in FibManagementOptions
block:
Name
If a FIB entry for Name already exists, this command does nothing, but is still considered successful.
Delete a FIB entry¶
command-verb: delete
Required fields in FibManagementOptions
block:
Name
If a FIB entry for Name does not exist, this command does nothing, but is still considered successful.
Add a nexthop¶
command-verb: add-nexthop
This command adds a nexthop to an existing FIB entry.
Required fields in FibManagementOptions
block:
Name
FaceId
Cost
If a nexthop of same FaceId
exists on the FIB entry, its cost is updated.
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.
Remove a nexthop¶
command-verb: remove-nexthop
This command removes a nexthop from a FIB entry.
Removing the last nexthop in a FIB entry will not automatically delete the FIB entry.
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.
Set strategy¶
This command sets a forwarding strategy for a namespace.
The format of this command will be defined in a later version of this spec.
Required fields in FibManagementOptions
block:
Name
Strategy
TLV-TYPE assignments¶
Type | Assigned value | Assigned value (hex) |
---|---|---|
FibManagementOptions | 104 | 0x68 |
FaceId | 105 | 0x69 |
Cost | 106 | 0x6a |
Strategy | 107 | 0x6b |
Updated by Junxiao Shi almost 11 years ago · 36 revisions