FibMgmt » History » Version 43
  Davide Pesavento, 08/13/2019 08:19 AM 
  
| 1 | 29 | Junxiao Shi | # FIB Management | 
|---|---|---|---|
| 2 | 1 | Junxiao Shi | |
| 3 | 36 | Davide Pesavento | {{>toc}} | 
| 4 | 35 | Davide Pesavento | |
| 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 | 37 | Davide Pesavento | *Name* is the name prefix of the FIB entry. | 
| 31 | A forwarder MAY impose a limit on the length of name prefix. The current limit in NFD is 32 name components. | ||
| 32 | If *Name* exceeds this limit, the command fails with code 414. | ||
| 33 | 34 | Junxiao Shi | |
| 34 | 37 | Davide Pesavento | *FaceId* is the FaceId returned by [[FaceMgmt|Face Management]]. | 
| 35 | If *FaceId* is omitted or is set to zero, it is implied as the requesting face (self). | ||
| 36 | If the face does not exist, the command fails with code 410. | ||
| 37 | 27 | Junxiao Shi | |
| 38 | 37 | Davide Pesavento | *Cost* defaults to zero. | 
| 39 | If a nexthop with the same FaceId exists on the FIB entry, its cost is updated. | ||
| 40 | 1 | Junxiao Shi | |
| 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 | 37 | Davide Pesavento | *FaceId* is the FaceId returned by [[FaceMgmt|Face Management]]. | 
| 60 | If *FaceId* is omitted or is set to zero, it is implied as the requesting face (self). | ||
| 61 | 1 | Junxiao Shi | |
| 62 | 37 | Davide Pesavento | If the face or FIB entry or nexthop record do 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 | 1 | Junxiao Shi | Cost | 
| 83 | |||
| 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 | ||
| 91 | 41 | Davide Pesavento | FaceId (shared with [[ControlCommand]]) | 105 | 0x69 | 
| 92 | Cost (shared with [[ControlCommand]]) | 106 | 0x6a |