FibMgmt » History » Revision 43
Revision 42 (Davide Pesavento, 06/06/2019 01:56 PM) → Revision 43/44 (Davide Pesavento, 08/13/2019 08:19 AM)
# FIB Management {{>toc}} **FIB Management** is a module of [[Management|NFD Management protocol]]. It provides: * commands to insert, update, and delete FIB entries and nexthop records * a dataset of FIB entries and nexthop records FIB Management commands and datasets are available under namespace `ndn:/localhost/nfd/fib`. ## Control Commands [[ControlCommand]] **management-module**: `fib` ### Add a nexthop **command-verb**: `add-nexthop` This command adds a nexthop to a FIB entry. If the FIB entry does not exist, it is inserted automatically. ControlParameters fields: * Name (required) * FaceId (optional) * Cost (optional) *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. *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). If the face does not exist, the command fails with code 410. *Cost* defaults to zero. If a nexthop with the same FaceId exists on the FIB entry, its cost is updated. If the command succeeds, \<Body> in ControlResponse block contains updated ControlParameters: * Name: unchanged * FaceId: nexthop FaceId (not zero) * Cost: unchanged if request has this field; zero if request omits this field ### Remove a nexthop **command-verb**: `remove-nexthop` This command removes a nexthop from a FIB entry. If the last nexthop record in a FIB entry is removed, the FIB entry is deleted automatically. ControlParameters fields: * Name (required) * FaceId (optional) *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). If the face or FIB entry or nexthop record do not exist, this command does nothing, but is still considered successful. If the command succeeds, \<Body> in ControlResponse block contains updated ControlParameters: * Name: unchanged * FaceId: nexthop FaceId (not zero) ## FIB Dataset FIB entries and nexthop records are published as a [[StatusDataset|Status Dataset]] at `ndn:/localhost/nfd/fib/list`. Each FIB entry is represented by a **FibEntry** block: FibEntry := FIB-ENTRY-TYPE TLV-LENGTH Name NextHopRecord+ NextHopRecord := NEXT-HOP-RECORD-TYPE TLV-LENGTH FaceId Cost EndpointId? ## TLV-TYPE assignments Type | Assigned value | Assigned value (hex) ------------------------------------------- | ----------------- | -------------------- FibEntry | 128 | 0x80 NextHopRecord | 129 | 0x81 FaceId (shared with [[ControlCommand]]) | 105 | 0x69 Cost (shared with [[ControlCommand]]) | 106 | 0x6a EndpointId | 113 | 0x71