FibMgmt » History » Version 30
Junxiao Shi, 03/25/2014 02:40 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 | 29 | Junxiao Shi | FIB Management commands and datasets are published in 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 | * FaceId (required) |
||
26 | * Cost (optional) |
||
27 | 1 | Junxiao Shi | |
28 | 12 | Alex Afanasyev | FaceId is the FaceId returned in [[FaceMgmt|Face Management]]. |
29 | 30 | Junxiao Shi | If FaceId is set to zero, it is implied as the requesting face. |
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 | * FaceId: unchanged if request specifies non-zero; requesting FaceId if request specifies zero |
||
39 | * 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 | * FaceId (required) |
||
52 | |||
53 | 29 | Junxiao Shi | FaceId is the FaceId returned in [[FaceMgmt|Face Management]]. |
54 | 30 | Junxiao Shi | If FaceId is set to zero, it is implied as the requesting face. |
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 | * FaceId: unchanged if request specifies non-zero; requesting FaceId if request specifies 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 | 29 | Junxiao Shi | Each FIB entry is represented by a **FibEntry** blocks: |
69 | 24 | Junxiao Shi | |
70 | 29 | Junxiao Shi | FibEntry := FIB-ENTRY-TYPE TLV-LENGTH |
71 | Name |
||
72 | NextHopRecord+ |
||
73 | |||
74 | NextHopRecord := NEXT-HOP-RECORD TLV-LENGTH |
||
75 | FaceId |
||
76 | Cost |
||
77 | 25 | Junxiao Shi | |
78 | 1 | Junxiao Shi | |
79 | |||
80 | ## TLV-TYPE assignments |
||
81 | |||
82 | 15 | Alex Afanasyev | Type | Assigned value | Assigned value (hex) |
83 | 17 | Alex Afanasyev | ------------------------------------------- | ----------------- | -------------------- |
84 | 29 | Junxiao Shi | FibEntry | 128 | 0x80 |
85 | NextHopRecord | 129 | 0x81 |