FibMgmt » History » Version 18
Alex Afanasyev, 01/30/2014 05:51 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 | 12 | Alex Afanasyev | The FIB management protocol uses [[Signed Interests]]-Data exchange. |
| 6 | The command request and response follows the [[ControlCommand|NFD Control Command specification]] |
||
| 7 | 10 | Junxiao Shi | |
| 8 | 12 | Alex Afanasyev | ## Command format |
| 9 | 1 | Junxiao Shi | |
| 10 | 12 | Alex Afanasyev | ### Request |
| 11 | 1 | Junxiao Shi | |
| 12 | 12 | Alex Afanasyev | Request is a signed Interest with the following name: |
| 13 | 1 | Junxiao Shi | |
| 14 | 12 | Alex Afanasyev | /localhost/nfd/fib/<command-verb>/<command-options>/<timestamp>/<SignatureInfo>/<SignatureValue> |
| 15 | 1 | Junxiao Shi | |
| 16 | 12 | Alex Afanasyev | \ / \ / \ / |
| 17 | ------- ------- ------------- --------------- -------------------- -------------------- |
||
| 18 | \/ \/ \/ |
||
| 19 | NFD Control Command FibManager command Signed Interest related information |
||
| 20 | to FibManager and command options |
||
| 21 | 1 | Junxiao Shi | |
| 22 | |||
| 23 | 12 | Alex Afanasyev | Command options is defined as a TLV-encoded ``FibManagementOptions`` block. |
| 24 | Each individual command defines a subset of required and optional elements in the ``FibManagementOptions`` block. |
||
| 25 | 18 | Alex Afanasyev | Note that ``Name`` field is required for ``FibManagementOptions`` block. |
| 26 | 1 | Junxiao Shi | |
| 27 | FibManagementOptions ::= FIB-MANAGEMENT-OPTIONS-TYPE TLV-LENGTH |
||
| 28 | 18 | Alex Afanasyev | Name |
| 29 | 12 | Alex Afanasyev | FaceId? |
| 30 | Cost? |
||
| 31 | Strategy? |
||
| 32 | |||
| 33 | // Name defined in NDN-TLV spec |
||
| 34 | 10 | Junxiao Shi | |
| 35 | 12 | Alex Afanasyev | FaceId ::= FACEID-TYPE TLV-LENGTH |
| 36 | nonNegativeInteger |
||
| 37 | |||
| 38 | Cost ::= COST-TYPE TLV-LENGTH |
||
| 39 | nonNegativeInteger |
||
| 40 | 1 | Junxiao Shi | |
| 41 | 12 | Alex Afanasyev | Strategy ::= STRATEGY-TYPE TLV-LENGTH |
| 42 | 1 | Junxiao Shi | Name |
| 43 | 18 | Alex Afanasyev | |
| 44 | 1 | Junxiao Shi | |
| 45 | 12 | Alex Afanasyev | ### Response |
| 46 | |||
| 47 | Command response is a Data packet that contains TLV-encoded ``ControlResponse`` block, defined in [[ControlCommand|NFD Control Command specification]]. |
||
| 48 | |||
| 49 | 10 | Junxiao Shi | The response has StatusCode 200 if the command succeeds. |
| 50 | 1 | Junxiao Shi | |
| 51 | 12 | Alex Afanasyev | <!-- Alex: Should positive responses contain TLV-Encoded ``FibManagementOptions`` block related to the command (after StatusText)? --> |
| 52 | 1 | Junxiao Shi | |
| 53 | 12 | Alex Afanasyev | Any other status code (4xx, 5xx, [?]) mean error. |
| 54 | Description of the error can be present in ``StatusText`` field of ``ControlResponse`` command. |
||
| 55 | 1 | Junxiao Shi | |
| 56 | 12 | Alex Afanasyev | ### Operations |
| 57 | 1 | Junxiao Shi | |
| 58 | 12 | Alex Afanasyev | **FIB management protocol** protocol supports five operations: |
| 59 | 1 | Junxiao Shi | |
| 60 | 12 | Alex Afanasyev | * insert a FIB entry (command-verb: ``insert``) |
| 61 | * delete a FIB entry (command-verb: ``delete``) |
||
| 62 | * add a nexthop to a FIB entry (command-verb: ``add-nexthop``) |
||
| 63 | * remove a nexthop from a FIB entry (command-verb: ``remove-nexthop``) |
||
| 64 | * set the forwarding strategy for a namespace (command-verb: ``set-strategy``) |
||
| 65 | 1 | Junxiao Shi | |
| 66 | 12 | Alex Afanasyev | ## Insert a FIB entry |
| 67 | 1 | Junxiao Shi | |
| 68 | 12 | Alex Afanasyev | **command-verb:** ``insert`` |
| 69 | 1 | Junxiao Shi | |
| 70 | 12 | Alex Afanasyev | Required fields in ``FibManagementOptions`` block: |
| 71 | 10 | Junxiao Shi | |
| 72 | 12 | Alex Afanasyev | * ``Name`` |
| 73 | 10 | Junxiao Shi | |
| 74 | 12 | Alex Afanasyev | If a FIB entry for Name already exists, this command does nothing, but is still considered successful. |
| 75 | 1 | Junxiao Shi | |
| 76 | 12 | Alex Afanasyev | ## Delete a FIB entry |
| 77 | |||
| 78 | **command-verb:** ``delete`` |
||
| 79 | |||
| 80 | Required fields in ``FibManagementOptions`` block: |
||
| 81 | |||
| 82 | * ``Name`` |
||
| 83 | |||
| 84 | If a FIB entry for Name does not exist, this command does nothing, but is still considered successful. |
||
| 85 | |||
| 86 | 1 | Junxiao Shi | ## Add a nexthop |
| 87 | |||
| 88 | 12 | Alex Afanasyev | **command-verb:** ``add-nexthop`` |
| 89 | 1 | Junxiao Shi | |
| 90 | 12 | Alex Afanasyev | This command adds a nexthop to an existing FIB entry. |
| 91 | 1 | Junxiao Shi | |
| 92 | 12 | Alex Afanasyev | Required fields in ``FibManagementOptions`` block: |
| 93 | 10 | Junxiao Shi | |
| 94 | 12 | Alex Afanasyev | * ``Name`` |
| 95 | * ``FaceId`` |
||
| 96 | * ``Cost`` |
||
| 97 | 1 | Junxiao Shi | |
| 98 | 12 | Alex Afanasyev | If a nexthop of same ``FaceId`` exists on the FIB entry, its cost is updated. |
| 99 | 1 | Junxiao Shi | |
| 100 | 13 | Junxiao Shi | **FaceId** is the FaceId returned in [[FaceMgmt|NFD Face Management protocol]]. |
| 101 | 10 | Junxiao Shi | |
| 102 | 12 | Alex Afanasyev | If **FaceId** is set to zero, it is implied as the face of the entity sending this command. |
| 103 | |||
| 104 | 1 | Junxiao Shi | If the FIB entry does not exist, the response has StatusCode 404. |
| 105 | 10 | Junxiao Shi | |
| 106 | ## Remove a nexthop |
||
| 107 | |||
| 108 | 12 | Alex Afanasyev | **command-verb**: ``remove-nexthop`` |
| 109 | |||
| 110 | This command removes a nexthop from a FIB entry. |
||
| 111 | 10 | Junxiao Shi | Removing the last nexthop in a FIB entry will not automatically delete the FIB entry. |
| 112 | 1 | Junxiao Shi | |
| 113 | 12 | Alex Afanasyev | Required fields in ``FibManagementOptions`` block: |
| 114 | 1 | Junxiao Shi | |
| 115 | 12 | Alex Afanasyev | * ``Name`` |
| 116 | * ``FaceId`` |
||
| 117 | 1 | Junxiao Shi | |
| 118 | 10 | Junxiao Shi | **FaceId** is the FaceId returned in *NFD Face Management protocol*. |
| 119 | 1 | Junxiao Shi | If **FaceId** is set to zero, it is implied as the face of the entity sending this command. |
| 120 | |||
| 121 | |||
| 122 | If the FIB entry does not exist, the response has StatusCode 404. |
||
| 123 | |||
| 124 | If the specified nexthop does not exist on the FIB entry, this command does nothing, |
||
| 125 | but is still considered successful. |
||
| 126 | |||
| 127 | 10 | Junxiao Shi | |
| 128 | ## Set strategy |
||
| 129 | |||
| 130 | 12 | Alex Afanasyev | This command sets a forwarding strategy for a namespace. |
| 131 | 1 | Junxiao Shi | |
| 132 | The format of this command will be defined in a later version of this spec. |
||
| 133 | |||
| 134 | 12 | Alex Afanasyev | Required fields in ``FibManagementOptions`` block: |
| 135 | 1 | Junxiao Shi | |
| 136 | 12 | Alex Afanasyev | * ``Name`` |
| 137 | * ``Strategy`` |
||
| 138 | |||
| 139 | 1 | Junxiao Shi | ## TLV-TYPE assignments |
| 140 | |||
| 141 | Type | Assigned value | Assigned value (hex) |
||
| 142 | ------------------------------------------- | ----------------- | -------------------- |
||
| 143 | 15 | Alex Afanasyev | FibManagementOptions | 104 | 0x68 |
| 144 | FaceId | 105 | 0x69 |
||
| 145 | 17 | Alex Afanasyev | Cost | 106 | 0x6a |
| 146 | Strategy | 107 | 0x6b |