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