FibMgmt » History » Version 2
  Junxiao Shi, 01/24/2014 08:30 PM 
  
| 1 | 2 | Junxiao Shi | # NFD FIB Management Protocol  | 
|---|---|---|---|
| 2 | 1 | Junxiao Shi | |
| 3 | 2 | Junxiao Shi | The **FIB management protocol** allows an entity to manipulate the FIB entry.  | 
| 4 | 1 | Junxiao Shi | |
| 5 | This protocol supports four operations:  | 
||
| 6 | |||
| 7 | * add a nexthop to a FIB entry  | 
||
| 8 | * remove a nexthop from a FIB entry  | 
||
| 9 | 2 | Junxiao Shi | * set the forwarding strategy for a namespace  | 
| 10 | 1 | Junxiao Shi | |
| 11 | |||
| 12 | ## Command format  | 
||
| 13 | |||
| 14 | 2 | Junxiao Shi | The FIB management protocol uses Interest-Data exchange.  | 
| 15 | 1 | Junxiao Shi | The command request and response formats are specified in [[ControlCommand|NFD Control Command specification]].  | 
| 16 | |||
| 17 | |||
| 18 | ## Add a nexthop  | 
||
| 19 | |||
| 20 | **prefixreg** command adds a nexthop to a FIB entry,  | 
||
| 21 | 2 | Junxiao Shi | or updates its cost if it already exists.  | 
| 22 | 1 | Junxiao Shi | |
| 23 | The command verb is **prefixreg**.  | 
||
| 24 | Request Interest must be signed.  | 
||
| 25 | |||
| 26 | The request options have the following format:  | 
||
| 27 | |||
| 28 | PrefixRegOptions ::= PREFIX-REG-OPTIONS-TYPE TLV-LENGTH  | 
||
| 29 | Name  | 
||
| 30 | FaceId  | 
||
| 31 | Cost  | 
||
| 32 | ForwardingFlags?  | 
||
| 33 | |||
| 34 | FaceId ::= FACEID-TYPE TLV-LENGTH  | 
||
| 35 | nonNegativeInteger  | 
||
| 36 | |||
| 37 | Cost ::= COST-TYPE TLV-LENGTH  | 
||
| 38 | nonNegativeInteger  | 
||
| 39 | |||
| 40 | **FaceId** is the FaceId returned in *NFD Face Management protocol*.  | 
||
| 41 | If **FaceId** is set to zero, it is implied as the face of the entity sending this command.  | 
||
| 42 | |||
| 43 | The response has StatusCode 200 if the command succeeds.  | 
||
| 44 | |||
| 45 | |||
| 46 | ## Remove a nexthop  | 
||
| 47 | |||
| 48 | **prefixunreg** command removes a nexthop from a FIB entry.  | 
||
| 49 | |||
| 50 | The command verb is **prefixunreg**.  | 
||
| 51 | Request Interest must be signed.  | 
||
| 52 | |||
| 53 | The request options have the following format:  | 
||
| 54 | |||
| 55 | PrefixUnregOptions ::= PREFIX-UNREG-OPTIONS-TYPE TLV-LENGTH  | 
||
| 56 | Name  | 
||
| 57 | FaceId  | 
||
| 58 | |||
| 59 | The response has StatusCode 200 if the command succeeds.  | 
||
| 60 | |||
| 61 | If the specified nexthop does not exist on the FIB entry, this command does nothing,  | 
||
| 62 | but is still considered successful.  | 
||
| 63 | |||
| 64 | |||
| 65 | ## Set strategy  | 
||
| 66 | |||
| 67 | **prefixstrategy** command picks a forwarding strategy for a namespace.  | 
||
| 68 | |||
| 69 | The format of this command will be defined in a later version of this spec.  | 
||
| 70 | |||
| 71 | |||
| 72 | ## TLV-TYPE assignments  | 
||
| 73 | |||
| 74 | Type | Assigned value | Assigned value (hex)  | 
||
| 75 | ------------------------------------------- | ----------------- | --------------------  | 
||
| 76 | PrefixRegOptions | 129 | 0x81  | 
||
| 77 | PrefixUnregOptions | 129 | 0x81  | 
||
| 78 | FaceId | 132 | 0x84  | 
||
| 79 | Cost | 63672 | 0xf8b8  |