RIB Management is a module ofNFD Management protocol.
It provides:
RIB Management commands and datasets are available under namespacendn:/localhost/nfd/rib.
RIB Management commands are also available under namespacendn:/localhop/nfd/rib.
ARIB Entry maintains a list of routes associated with a particular namespace.
A RIB Entry contains:
Aroute indicates that data with a certain name prefix may be available via a certain nexthop.
A route contains:
Origin is a value in [0, 65535] range that indicates who is announcing a route.
nfd-autoreg tool.ndn-autoconfig tool.Cost indicates the preference among multiple routes with same Name prefix.
Generally, the nexthop face on a route with lower cost is preferred. Unlike IP routing, in NDN the nexthop face to use is decided by the forwarding strategy. Route cost is a suggestion to the strategy: the strategy MAY consider route cost when making forwarding decisions.
Each route can have two route inheritance flags:
CHILD_INHERIT: indicates that this route may be used even if a longer prefix is matched.This flag applies on a single route.CAPTURE: indicates that no shorter prefix can be used; overridesCHILD_INHERIT.This flag applies on the prefix: if any route of a prefix has this flag, the prefix will have this flag.Example:
| Name prefix | Nexthop FaceId | CHILD_INHERIT | CAPTURE |
|---|---|---|---|
| / | 1 | yes | no |
| / | 2 | no | no |
| /A | 3 | yes | no |
| /A/B/C | 4 | yes | no |
| /D | 5 | yes | yes |
| /D | 6 | yes | no |
To determine the routing cost of a nexthop face for FIB entry:
Example:
| Name prefix | Nexthop FaceId | Origin | Cost | CHILD_INHERIT | CAPTURE |
|---|---|---|---|---|---|
| /A | 1 | static | 10 | no | no |
| /A | 1 | nlsr | 20 | yes | no |
| /A | 2 | static | 30 | no | no |
| /A/B | 1 | static | 40 | yes | no |
| /A/B | 2 | static | 50 | yes | no |
| /A/B/C | 3 | static | 60 | yes | no |
| /A/B/C/D | 4 | static | 70 | yes | yes |
The corresponding FIB should be:
| Name prefix | Nexthop records |
|---|---|
| /A | (face=1,cost=10) (face=2,cost=30) |
| /A/B | (face=1,cost=40) (face=2,cost=50) |
| /A/B/C | (face=1,cost=40) (face=2,cost=50) (face=3,cost=60) |
| /A/B/C/D | (face=4,cost=70) |
ControlCommandmanagement-module:rib
command-verb:register
This command adds a route to the RIB.
This command can also be accepted onndn:/localhop/nfd management prefix, in addition to the defaultndn:/localhost/nfd management prefix.
ControlParameters fields:
Name is the name prefix of the route. A forwarder MAY impose a limit on the length of the name prefix. The current limit in NFD is 32 name components. IfName exceeds this limit, the command fails with code 414.
FaceId is the FaceId returned byFace Management. IfFaceId is omitted or is set to zero, it is implied as the requesting face (self registration).
Origin defaults toapp (=0).
Cost defaults to zero.
Flags is the inclusive OR of the following route inheritance flags:
CHILD_INHERIT = 1CAPTURE = 2The default isCHILD_INHERIT.
ExpirationPeriod gives the duration (in milliseconds) for which this route is effective. AfterExpirationPeriod has elapsed, or when the face fails, the route is removed.ExpirationPeriod defaults to infinity.
If a route of sameName,FaceId, andOrigin exists, itsCost andFlags are updated and its lifetime is extended to now +ExpirationPeriod.
If the command succeeds, <body> in ControlResponse block contains the updated ControlParameters:
This command announces a prefix using aPrefixAnnouncement object.
The RIB management module accepts this command as asigned Interest with the following name:
/localhost/nfd/rib/announce/<params-sha256>/localhop/nfd/rib/announce/<params-sha256>The Interest's ApplicationParameters element carries the prefix announcement object.
The RIB management module converts this command into an equivalentrib/register command. The route'sOrigin is set to "prefix announcement" (=129).
The response is the same as therib/register command.
Interest Name /localhop/nfd/rib/announce/params-sha256=607a2bc7653eea18b47e92b84edc58bab5aaa321d4efb39ceeccc6cafbcbb3d1 MustBeFresh ApplicationParameters PrefixAnnouncement InterestSignatureInfo InterestSignatureValueAssuming the enclosed PrefixAnnouncement is the one shown in thePrefixAnnouncement example, the RIB management module should interpret the above command in the same way as arib/register command with the following ControlParameters:
/net/examplecommand-verb:unregister
This command removes a route from the RIB.
This command can also be accepted onndn:/localhop/nfd management prefix, in addition to the defaultndn:/localhost/nfd management prefix.
ControlParameters fields:
FaceId is the FaceId returned byFace Management. IfFaceId is omitted or is set to zero, it is implied as the requesting face (self unregistration).
Origin defaults toapp (=0).
Self unregistration is unnecessary if the client is quitting. The forwarder SHOULD automatically remove routes belonging to a closed face.
A client needs self unregistration when it stops serving a name prefix, but intends to continue execution.
If the route does not exist, this command does nothing, but is still considered successful.
If the command succeeds, <body> in ControlResponse block contains the updated ControlParameters:
app (=0) if request omitsSuccessful responses from these commands indicate that RIB Management has received and authorized the command, and will perform the requested updates shortly.
RIB and FIB updates are asynchronous, and they are not necessarily completed when the response is sent.
Routes are published as aStatus Dataset atndn:/localhost/nfd/rib/list.
Multiple routes of the same Name prefix are organized into aRIB entry. Each RIB entry is represented by aRibEntry block:
RibEntry = RIB-ENTRY-TYPE TLV-LENGTH Name 1*RouteRoute = ROUTE-TYPE TLV-LENGTH FaceId Origin Cost Flags [ExpirationPeriod]register command.RIB Management collects a list of routable prefixes and publishes it as aStatus Dataset atndn:/localhost/nfd/rib/routable-prefixes andndn:/localhop/nfd/rib/routable-prefixes.
Generally, aroutable prefix is a name prefix that satisfies one of the following:
This means, generally, a local producer can have reasonable belief that it would be able to receive Interests expressed elsewhere in the network, if it registers a prefix under a routable prefix. However, since the network is a dynamic and distributed system, global reachability cannot be guaranteed even if a routable prefix is used.
Each routable prefix is represented by aName block in the dataset.
| Type | Assigned value | Assigned value (hex) |
|---|---|---|
| RibEntry | 128 | 0x80 |
| Route | 129 | 0x81 |
Updated byDavide Pesavento7 months ago ·38 revisions