Project

General

Profile

Actions

RibMgmt » History » Revision 2

« Previous | Revision 2/31 (diff) | Next »
Lan Wang, 04/18/2014 04:22 AM


RIB Management

RIB Management is a module of NFD Management protocol.
It provides:

  • commands to register and unregister routes
  • commands to advertise and withdraw prefix with a routing protocol

RIB Management commands are published in namespace ndn:/localhost/nfd/rib.

Route

A route, or a routing entry, indicates that contents under a certain name prefix may be available via a certain face.

A route contains:

  • Name prefix
  • nexthop FaceId
  • cost
  • route inheritance flags

Cost indicates the preference among multiple routes with same Name prefix.
The nexthop face on a route with lower cost is preferred.

Unlike IP routing, the nexthop face to use is decided by forwarding strategy.
Routing cost is a suggestion to strategy; strategy MAY consider routing cost when making forwarding decisions.

Route inheritance

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; overrides CHILD_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
  • Interest /A/P can go to face 1 and 3.
    • It cannot go to face 2, because that route has CHILD_INHERIT=no.
  • Interest /A/B/C/Q can go to face 1, 3, and 4.
  • Interest /D/R can go to face 5 and 6.
    • It cannot go to face 1, because one of the routes on /D sets CAPTURE=yes.
  • Interest /S can go to face 1 and 2.

Control Commands

ControlCommand management-module: rib

Register a route

command-verb: register

This command adds a route to the RIB.

ControlParameters fields:

  • Name (required)
  • FaceId (optional)
  • Flags (optional)
  • Cost (optional)
  • ExpirationPeriod (optional)

FaceId is the FaceId returned in Face Management.
If FaceId is omitted or is set to zero, it is implied as the requesting face (self registration).

If face does not exist, the command fails with code 410.

Flags is an inclusive OR of route inheritance flags.
CHILD_INHERIT=1, CAPTURE=2.
It defaults to CHILD_INHERIT.

Cost defaults to zero.

ExpirationPeriod indicates the duration (in milliseconds) in which this route is effective.
After ExpirationPeriod is elapsed, or when the face fails, the route is removed.
ExpirationPeriod defaults to Infinity when FaceId is omitted or is set to zero; otherwise, it defaults to 1 hour.

If a route of same Name and FaceId exists, its Flags and Cost are updated, and its lifetime is extended to now + ExpirationPeriod.

If the command succeeds, <Body> in ControlResponse block contains updated ControlParameters.

  • Name: Name prefix
  • FaceId: nexthop FaceId
  • Flags: inclusive OR of route inheritance flags
  • Cost: routing cost
  • ExpirationPeriod: remaining lifetime (in milliseconds)

Unregister a route

command-verb: unregister

This command removes a route from the RIB.

ControlParameters fields:

  • Name (required)
  • FaceId (required)

FaceId is the FaceId returned in Face Management.
If FaceId is omitted or is set to zero, it is implied as the requesting face (self deregistration).

Self deregistration is unnecessary if client is quitting. NFD automatically removes routes belonging to a failed face.
Client needs self deregistration when it stops serving a name prefix, but intends to continue execution.

If face or route does 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: unchanged if request specifies non-zero; requesting FaceId if request omits or specifies zero

Advertise a prefix

command-verb: advertise

Withdraw a prefix

command-verb: withdraw

Updated by Lan Wang about 10 years ago · 2 revisions