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