Project

General

Profile

FibMgmt » History » Revision 31

Revision 30 (Junxiao Shi, 03/25/2014 02:40 PM) → Revision 31/44 (Junxiao Shi, 05/20/2014 02:55 PM)

# FIB Management 

 **FIB Management** is a module of [[Management|NFD Management protocol]]. 
 It provides: 

 * commands to insert, update, and delete FIB entries and nexthop records 
 * a dataset of FIB entries and nexthop records 

 FIB Management commands and datasets are published in namespace `ndn:/localhost/nfd/fib`. 

 

 ## Control Commands 

 [[ControlCommand]] **management-module**: `fib` 

 ### 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. 

 ControlParameters fields: 

 * Name (required) 
 * FaceId (optional) (required) 
 * Cost (optional) 

 FaceId is the FaceId returned in [[FaceMgmt|Face Management]]. 
 If FaceId is omitted or is set to zero, it is implied as the requesting face (self). 
 face.   
 If face does not exist, the command fails with code 410. 

 Cost defaults to zero. 
 If a nexthop of same FaceId exists on the FIB entry, its cost is updated. 

 If the command succeeds, \<Body> in ControlResponse block contains updated ControlParameters: 

 * Name: unchanged 
 * FaceId: nexthop unchanged if request specifies non-zero; requesting FaceId (not zero) if request specifies zero 
 * Cost: unchanged if request has this field; zero if request omits this field 

 ### 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 deleted automatically. 

 ControlParameters fields: 

 * Name (required) 
 * FaceId (optional) (required) 

 FaceId is the FaceId returned in [[FaceMgmt|Face Management]]. 
 If FaceId is omitted or is set to zero, it is implied as the requesting face (self). face. 

 If face or FIB entry or nexthop record does not exist, this command does nothing, but is still considered successful. 

 If the command succeeds, \<Body> in ControlResponse block contains updated ControlParameters: 

 * Name: unchanged 
 * FaceId: nexthop unchanged if request specifies non-zero; requesting FaceId (not zero) 


 if request specifies zero 


 ## FIB Dataset 

 FIB entries and nexthop records are published as a [[StatusDataset|Status Dataset]] at `ndn:/localhost/nfd/fib/list`. 

 Each FIB entry is represented by a **FibEntry** blocks: 

     FibEntry        := FIB-ENTRY-TYPE TLV-LENGTH 
                        Name 
                        NextHopRecord+ 
    
     NextHopRecord := NEXT-HOP-RECORD TLV-LENGTH 
                        FaceId 
                        Cost 


 



 ## TLV-TYPE assignments 

 Type                                          | Assigned value      | Assigned value (hex) 
 ------------------------------------------- | ----------------- | -------------------- 
 FibEntry                                      | 128                 | 0x80 
 NextHopRecord                                 | 129                 | 0x81