Project

General

Profile

FibMgmt » History » Version 9

Junxiao Shi, 01/29/2014 12:02 AM

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 9 Junxiao Shi
If the last nexthop in a FIB entry is removed, the FIB entry is deleted.
51 1 Junxiao Shi
52
The command verb is **prefixunreg**.
53
Request Interest must be signed.
54
55
The request options have the following format:
56
57
    PrefixUnregOptions ::= PREFIX-UNREG-OPTIONS-TYPE TLV-LENGTH
58
                             Name
59
                             FaceId
60
61
The response has StatusCode 200 if the command succeeds.
62
63
If the specified nexthop does not exist on the FIB entry, this command does nothing,
64 8 Alex Afanasyev
but is still considered successful.
65 1 Junxiao Shi
66
## Set strategy
67
68
**prefixstrategy** command picks a forwarding strategy for a namespace.
69
70
The format of this command will be defined in a later version of this spec.
71
72
73
## TLV-TYPE assignments
74
75
Type                                        | Assigned value    | Assigned value (hex)
76
------------------------------------------- | ----------------- | --------------------
77
PrefixRegOptions                            | 129               | 0x81
78
PrefixUnregOptions                          | 129               | 0x81
79 4 Wentao Shang
FaceId                                      | 132               | 0x84
80 1 Junxiao Shi
Cost                                        | 63672             | 0xf8b8