Project

General

Profile

FibMgmt » History » Version 34

Junxiao Shi, 01/21/2018 12:08 PM

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