FibMgmt » History » Version 45
  Davide Pesavento, 02/02/2025 09:32 PM 
  
| 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 | 45 | Davide Pesavento | *Name* is the name prefix of the FIB entry. A forwarder MAY impose a limit on the length of name prefix. The current limit in NFD is 32 name components. If *Name* exceeds this limit, the command fails with code 414.  | 
| 31 | 34 | Junxiao Shi | |
| 32 | 45 | Davide Pesavento | *FaceId* is the FaceId returned by [[FaceMgmt|Face Management]]. If *FaceId* is omitted or is set to zero, it is implied as the requesting face (self).  | 
| 33 | 37 | Davide Pesavento | If the face does not exist, the command fails with code 410.  | 
| 34 | |||
| 35 | 45 | Davide Pesavento | *Cost* defaults to zero. If a nexthop with the same FaceId exists on the FIB entry, its cost is updated.  | 
| 36 | 1 | Junxiao Shi | |
| 37 | 45 | Davide Pesavento | If the command succeeds, \<body> in ControlResponse block contains the updated ControlParameters:  | 
| 38 | 30 | Junxiao Shi | |
| 39 | * Name: unchanged  | 
||
| 40 | 31 | Junxiao Shi | * FaceId: nexthop FaceId (not zero)  | 
| 41 | 30 | Junxiao Shi | * Cost: unchanged if request has this field; zero if request omits this field  | 
| 42 | |||
| 43 | 29 | Junxiao Shi | ### Remove a nexthop  | 
| 44 | 12 | Alex Afanasyev | |
| 45 | 29 | Junxiao Shi | **command-verb**: `remove-nexthop`  | 
| 46 | 27 | Junxiao Shi | |
| 47 | 1 | Junxiao Shi | This command removes a nexthop from a FIB entry.  | 
| 48 | 29 | Junxiao Shi | If the last nexthop record in a FIB entry is removed, the FIB entry is deleted automatically.  | 
| 49 | 1 | Junxiao Shi | |
| 50 | 29 | Junxiao Shi | ControlParameters fields:  | 
| 51 | |||
| 52 | 1 | Junxiao Shi | * Name (required)  | 
| 53 | * FaceId (optional)  | 
||
| 54 | 37 | Davide Pesavento | |
| 55 | 45 | Davide Pesavento | *FaceId* is the FaceId returned by [[FaceMgmt|Face Management]]. If *FaceId* is omitted or is set to zero, it is implied as the requesting face (self).  | 
| 56 | 1 | Junxiao Shi | |
| 57 | 45 | Davide Pesavento | If the face or FIB entry or nexthop record do not exist, this command does nothing but is still considered successful.  | 
| 58 | 1 | Junxiao Shi | |
| 59 | 45 | Davide Pesavento | If the command succeeds, \<body> in ControlResponse block contains the updated ControlParameters:  | 
| 60 | 24 | Junxiao Shi | |
| 61 | 30 | Junxiao Shi | * Name: unchanged  | 
| 62 | 31 | Junxiao Shi | * FaceId: nexthop FaceId (not zero)  | 
| 63 | 10 | Junxiao Shi | |
| 64 | 12 | Alex Afanasyev | |
| 65 | 29 | Junxiao Shi | ## FIB Dataset  | 
| 66 | 1 | Junxiao Shi | |
| 67 | 29 | Junxiao Shi | FIB entries and nexthop records are published as a [[StatusDataset|Status Dataset]] at `ndn:/localhost/nfd/fib/list`.  | 
| 68 | 10 | Junxiao Shi | |
| 69 | 32 | Junxiao Shi | Each FIB entry is represented by a **FibEntry** block:  | 
| 70 | 24 | Junxiao Shi | |
| 71 | 44 | Davide Pesavento | FibEntry = FIB-ENTRY-TYPE TLV-LENGTH  | 
| 72 | Name  | 
||
| 73 | 1*NextHopRecord  | 
||
| 74 | |||
| 75 | NextHopRecord = NEXT-HOP-RECORD-TYPE TLV-LENGTH  | 
||
| 76 | FaceId  | 
||
| 77 | Cost  | 
||
| 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  | 
||
| 86 | 41 | Davide Pesavento | FaceId (shared with [[ControlCommand]]) | 105 | 0x69  | 
| 87 | Cost (shared with [[ControlCommand]]) | 106 | 0x6a  |