FibMgmt » History » Version 8
Alex Afanasyev, 01/28/2014 11:55 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 | |||
33 | FaceId ::= FACEID-TYPE TLV-LENGTH |
||
34 | nonNegativeInteger |
||
35 | |||
36 | Cost ::= COST-TYPE TLV-LENGTH |
||
37 | nonNegativeInteger |
||
38 | |||
39 | **FaceId** is the FaceId returned in *NFD Face Management protocol*. |
||
40 | If **FaceId** is set to zero, it is implied as the face of the entity sending this command. |
||
41 | |||
42 | 4 | Wentao Shang | The default value of **Cost** is zero. |
43 | |||
44 | 1 | Junxiao Shi | The response has StatusCode 200 if the command succeeds. |
45 | |||
46 | |||
47 | ## Remove a nexthop |
||
48 | |||
49 | **prefixunreg** command removes a nexthop from a FIB entry. |
||
50 | |||
51 | The command verb is **prefixunreg**. |
||
52 | Request Interest must be signed. |
||
53 | |||
54 | The request options have the following format: |
||
55 | |||
56 | PrefixUnregOptions ::= PREFIX-UNREG-OPTIONS-TYPE TLV-LENGTH |
||
57 | Name |
||
58 | FaceId |
||
59 | |||
60 | The response has StatusCode 200 if the command succeeds. |
||
61 | |||
62 | If the specified nexthop does not exist on the FIB entry, this command does nothing, |
||
63 | but is still considered successful. |
||
64 | |||
65 | 8 | Alex Afanasyev | If the **prefixunreg** removes the last nexthop for the FIB entry, the whole FIB entry is removed. |
66 | 1 | Junxiao Shi | |
67 | ## Set strategy |
||
68 | |||
69 | **prefixstrategy** command picks a forwarding strategy for a namespace. |
||
70 | |||
71 | The format of this command will be defined in a later version of this spec. |
||
72 | |||
73 | |||
74 | ## TLV-TYPE assignments |
||
75 | |||
76 | Type | Assigned value | Assigned value (hex) |
||
77 | ------------------------------------------- | ----------------- | -------------------- |
||
78 | PrefixRegOptions | 129 | 0x81 |
||
79 | PrefixUnregOptions | 129 | 0x81 |
||
80 | 4 | Wentao Shang | FaceId | 132 | 0x84 |
81 | 1 | Junxiao Shi | Cost | 63672 | 0xf8b8 |