Project

General

Profile

FibMgmt » History » Version 6

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