Project

General

Profile

FibMgmt » History » Version 33

Junxiao Shi, 07/29/2015 08:35 AM

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 12 Alex Afanasyev
FaceId is the FaceId returned in [[FaceMgmt|Face Management]].
29 31 Junxiao Shi
If FaceId is omitted or is set to zero, it is implied as the requesting face (self).
30 29 Junxiao Shi
If face does not exist, the command fails with code 410.
31 27 Junxiao Shi
32 1 Junxiao Shi
Cost defaults to zero.
33
If a nexthop of same FaceId exists on the FIB entry, its cost is updated.
34
35 30 Junxiao Shi
If the command succeeds, \<Body> in ControlResponse block contains updated ControlParameters:
36
37
* Name: unchanged
38 31 Junxiao Shi
* FaceId: nexthop FaceId (not zero)
39 30 Junxiao Shi
* Cost: unchanged if request has this field; zero if request omits this field
40
41 29 Junxiao Shi
### Remove a nexthop
42 12 Alex Afanasyev
43 29 Junxiao Shi
**command-verb**: `remove-nexthop`
44 27 Junxiao Shi
45 29 Junxiao Shi
This command removes a nexthop from a FIB entry.
46
If the last nexthop record in a FIB entry is removed, the FIB entry is deleted automatically.
47
48
ControlParameters fields:
49 1 Junxiao Shi
50
* Name (required)
51 31 Junxiao Shi
* FaceId (optional)
52 1 Junxiao Shi
53 29 Junxiao Shi
FaceId is the FaceId returned in [[FaceMgmt|Face Management]].
54 31 Junxiao Shi
If FaceId is omitted or is set to zero, it is implied as the requesting face (self).
55 1 Junxiao Shi
56 30 Junxiao Shi
If face or FIB entry or nexthop record does not exist, this command does nothing, but is still considered successful.
57 1 Junxiao Shi
58 30 Junxiao Shi
If the command succeeds, \<Body> in ControlResponse block contains updated ControlParameters:
59 24 Junxiao Shi
60 30 Junxiao Shi
* Name: unchanged
61 31 Junxiao Shi
* FaceId: nexthop FaceId (not zero)
62 10 Junxiao Shi
63 12 Alex Afanasyev
64 29 Junxiao Shi
## FIB Dataset
65 1 Junxiao Shi
66 29 Junxiao Shi
FIB entries and nexthop records are published as a [[StatusDataset|Status Dataset]] at `ndn:/localhost/nfd/fib/list`.
67 10 Junxiao Shi
68 32 Junxiao Shi
Each FIB entry is represented by a **FibEntry** block:
69 24 Junxiao Shi
70 29 Junxiao Shi
    FibEntry      := FIB-ENTRY-TYPE TLV-LENGTH
71
                       Name
72
                       NextHopRecord+
73
    
74 32 Junxiao Shi
    NextHopRecord := NEXT-HOP-RECORD-TYPE TLV-LENGTH
75 29 Junxiao Shi
                       FaceId
76 25 Junxiao Shi
                       Cost
77 1 Junxiao Shi
78
79
## TLV-TYPE assignments
80
81 15 Alex Afanasyev
Type                                        | Assigned value    | Assigned value (hex)
82 17 Alex Afanasyev
------------------------------------------- | ----------------- | --------------------
83 29 Junxiao Shi
FibEntry                                    | 128               | 0x80
84
NextHopRecord                               | 129               | 0x81