FibMgmt » History » Revision 10
Revision 9 (Junxiao Shi, 01/29/2014 12:02 AM) → Revision 10/44 (Junxiao Shi, 01/30/2014 12:16 AM)
# NFD FIB Management Protocol The **FIB management protocol** allows an entity to manipulate the FIB entry. This protocol supports five four operations: * insert a FIB entry * delete a FIB entry * add a nexthop to a FIB entry * remove a nexthop from a FIB entry * set the forwarding strategy for a namespace ## Command format The FIB management protocol uses Interest-Data exchange. The command request and response formats are specified in [[ControlCommand|NFD Control Command specification]]. ## Insert a FIB entry **fibinsert** command inserts a FIB entry. The command verb is **fibinsert**. Request Interest must be signed. The request options have the following format: FibInsertOptions ::= FIB-INSERT-OPTIONS-TYPE TLV-LENGTH Name The response has StatusCode 200 if the command succeeds. If a FIB entry for Name already exists, this command does nothing, but is still considered successful. ## Delete a FIB entry **fibdelete** command deletes a FIB entry. The command verb is **fibdelete**. Request Interest must be signed. The request options have the following format: FibDeleteOptions ::= FIB-DELETE-OPTIONS-TYPE TLV-LENGTH Name The response has StatusCode 200 if the command succeeds. If a FIB entry for Name does not exist, this command does nothing, but is still considered successful. ## Add a nexthop **fibaddnexthop** **prefixreg** command adds a nexthop to an existing FIB entry. If a nexthop of same FaceId exists on the FIB entry, or updates its cost is updated. if it already exists. The command verb is **fibaddnexthop**. **prefixreg**. Request Interest must be signed. The request options have the following format: FibAddNextHopOptions PrefixRegOptions ::= FIB-ADD-NEXTHOP-OPTIONS-TYPE PREFIX-REG-OPTIONS-TYPE TLV-LENGTH Name FaceId Cost FaceId ::= FACEID-TYPE TLV-LENGTH nonNegativeInteger Cost ::= COST-TYPE TLV-LENGTH nonNegativeInteger **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. The default value of **Cost** is zero. The response has StatusCode 200 if the command succeeds. If the FIB entry does not exist, the response has StatusCode 404. ## Remove a nexthop **fibremovenexthop** **prefixunreg** command removes a nexthop from a FIB entry. Removing If the last nexthop in a FIB entry will not automatically delete is removed, the FIB entry. entry is deleted. The command verb is **fibremovenexthop**. **prefixunreg**. Request Interest must be signed. The request options have the following format: FibRemoveNextHopOptions PrefixUnregOptions ::= FIB-REMOVE-NEXTHOP-OPTIONS-TYPE PREFIX-UNREG-OPTIONS-TYPE TLV-LENGTH 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. The response has StatusCode 200 if the command succeeds. 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 **fibstrategy** **prefixstrategy** command picks a forwarding strategy for a namespace. The format of this command will be defined in a later version of this spec. ## TLV-TYPE assignments Type | Assigned value | Assigned value (hex) ------------------------------------------- | ----------------- | -------------------- FibInsertOptions PrefixRegOptions | 55547 | 0xd8fb FibDeleteOptions | 56539 | 0xdcdb FibAddNextHopOptions | 129 | 0x81 FibRemoveNextHopOptions PrefixUnregOptions | 129 | 0x81 FaceId | 132 | 0x84 Cost | 63672 | 0xf8b8