Project

General

Profile

FibMgmt » History » Version 35

Davide Pesavento, 02/09/2018 02:23 PM

1 29 Junxiao Shi
# FIB Management
2 1 Junxiao Shi
3 35 Davide Pesavento
{{toc}}
4
5 29 Junxiao Shi
**FIB Management** is a module of [[Management|NFD Management protocol]].
6
It provides:
7 20 Junxiao Shi
8 29 Junxiao Shi
* commands to insert, update, and delete FIB entries and nexthop records
9
* a dataset of FIB entries and nexthop records
10 1 Junxiao Shi
11 33 Junxiao Shi
FIB Management commands and datasets are available under namespace `ndn:/localhost/nfd/fib`.
12 1 Junxiao Shi
13 29 Junxiao Shi
## Control Commands
14 21 Alex Afanasyev
15 29 Junxiao Shi
[[ControlCommand]] **management-module**: `fib`
16 1 Junxiao Shi
17 29 Junxiao Shi
### Add a nexthop
18 1 Junxiao Shi
19 29 Junxiao Shi
**command-verb**: `add-nexthop`
20 1 Junxiao Shi
21 29 Junxiao Shi
This command adds a nexthop to a FIB entry.
22
If the FIB entry does not exist, it is inserted automatically.
23 1 Junxiao Shi
24 29 Junxiao Shi
ControlParameters fields:
25 12 Alex Afanasyev
26 29 Junxiao Shi
* Name (required)
27 31 Junxiao Shi
* FaceId (optional)
28 29 Junxiao Shi
* Cost (optional)
29 1 Junxiao Shi
30 34 Junxiao Shi
Name is the name prefix of the FIB entry.
31
NFD MAY impose a limit on the length of name prefix. The current limit is 32 name components.
32
If Name exceeds this limit, the command fails with code 414.
33
34 12 Alex Afanasyev
FaceId is the FaceId returned in [[FaceMgmt|Face Management]].
35 31 Junxiao Shi
If FaceId is omitted or is set to zero, it is implied as the requesting face (self).
36 29 Junxiao Shi
If face does not exist, the command fails with code 410.
37 27 Junxiao Shi
38 1 Junxiao Shi
Cost defaults to zero.
39
If a nexthop of same FaceId exists on the FIB entry, its cost is updated.
40
41 30 Junxiao Shi
If the command succeeds, \<Body> in ControlResponse block contains updated ControlParameters:
42
43
* Name: unchanged
44 31 Junxiao Shi
* FaceId: nexthop FaceId (not zero)
45 30 Junxiao Shi
* Cost: unchanged if request has this field; zero if request omits this field
46
47 29 Junxiao Shi
### Remove a nexthop
48 12 Alex Afanasyev
49 29 Junxiao Shi
**command-verb**: `remove-nexthop`
50 27 Junxiao Shi
51 29 Junxiao Shi
This command removes a nexthop from a FIB entry.
52
If the last nexthop record in a FIB entry is removed, the FIB entry is deleted automatically.
53
54
ControlParameters fields:
55 1 Junxiao Shi
56
* Name (required)
57 31 Junxiao Shi
* FaceId (optional)
58 1 Junxiao Shi
59 29 Junxiao Shi
FaceId is the FaceId returned in [[FaceMgmt|Face Management]].
60 31 Junxiao Shi
If FaceId is omitted or is set to zero, it is implied as the requesting face (self).
61 1 Junxiao Shi
62 30 Junxiao Shi
If face or FIB entry or nexthop record does not exist, this command does nothing, but is still considered successful.
63 1 Junxiao Shi
64 30 Junxiao Shi
If the command succeeds, \<Body> in ControlResponse block contains updated ControlParameters:
65 24 Junxiao Shi
66 30 Junxiao Shi
* Name: unchanged
67 31 Junxiao Shi
* FaceId: nexthop FaceId (not zero)
68 10 Junxiao Shi
69 12 Alex Afanasyev
70 29 Junxiao Shi
## FIB Dataset
71 1 Junxiao Shi
72 29 Junxiao Shi
FIB entries and nexthop records are published as a [[StatusDataset|Status Dataset]] at `ndn:/localhost/nfd/fib/list`.
73 10 Junxiao Shi
74 32 Junxiao Shi
Each FIB entry is represented by a **FibEntry** block:
75 24 Junxiao Shi
76 29 Junxiao Shi
    FibEntry      := FIB-ENTRY-TYPE TLV-LENGTH
77
                       Name
78
                       NextHopRecord+
79
    
80 32 Junxiao Shi
    NextHopRecord := NEXT-HOP-RECORD-TYPE TLV-LENGTH
81 29 Junxiao Shi
                       FaceId
82 25 Junxiao Shi
                       Cost
83 1 Junxiao Shi
84
85
## TLV-TYPE assignments
86
87 15 Alex Afanasyev
Type                                        | Assigned value    | Assigned value (hex)
88 17 Alex Afanasyev
------------------------------------------- | ----------------- | --------------------
89 29 Junxiao Shi
FibEntry                                    | 128               | 0x80
90
NextHopRecord                               | 129               | 0x81