Project

General

Profile

FibMgmt » History » Revision 9

Revision 8 (Alex Afanasyev, 01/28/2014 11:55 PM) → Revision 9/44 (Junxiao Shi, 01/29/2014 12:02 AM)

# NFD FIB Management Protocol 

 The **FIB management protocol** allows an entity to manipulate the FIB entry. 

 This protocol supports four operations: 

 * 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]]. 


 ## Add a nexthop 

 **prefixreg** command adds a nexthop to a FIB entry, 
 or updates its cost if it already exists. 

 The command verb is **prefixreg**. 
 Request Interest must be signed. 

 The request options have the following format: 

     PrefixRegOptions ::= 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. 


 ## Remove a nexthop 

 **prefixunreg** command removes a nexthop from a FIB entry. 
 If the last nexthop in a FIB entry is removed, the FIB entry is deleted. 

 The command verb is **prefixunreg**. 
 Request Interest must be signed. 

 The request options have the following format: 

     PrefixUnregOptions ::= PREFIX-UNREG-OPTIONS-TYPE TLV-LENGTH 
                              Name 
                              FaceId 

 The response has StatusCode 200 if the command succeeds. 

 If the specified nexthop does not exist on the FIB entry, this command does nothing, 
 but is still considered successful. 

 If the **prefixunreg** removes the last nexthop for the FIB entry, the whole FIB entry is removed. 

 ## Set strategy 

 **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) 
 ------------------------------------------- | ----------------- | -------------------- 
 PrefixRegOptions                              | 129                 | 0x81 
 PrefixUnregOptions                            | 129                 | 0x81 
 FaceId                                        | 132                 | 0x84 
 Cost                                          | 63672               | 0xf8b8