Project

General

Profile

PrefixAnnouncement » History » Version 10

Junxiao Shi, 08/19/2023 01:58 AM

1 8 Junxiao Shi
2 1 Junxiao Shi
# Prefix Announcement Protocol
3
4
The **prefix announcement protocol** allows registering prefixes using a *prefix announcement object*. It is an alternative to NFD [[RibMgmt|RIB Management protocol]]'s `rib/register` verb.
5
6 10 Junxiao Shi
As of 2023-Aug, this protocol is only implemented in YaNFD; it is not implemented in NFD.
7
8 1 Junxiao Shi
## Prefix Announcement object
9
10 2 Davide Pesavento
The **prefix announcement object** is a Data packet that represents an application's intent of registering a prefix toward itself. A Data packet that satisfies the following requirements is a prefix announcement object:
11 1 Junxiao Shi
12 7 Davide Pesavento
* Name starts with the announced prefix, followed by a fixed `32=PA` keyword name component, followed by a version component and a segment component as defined by the [NDN Naming Conventions](https://named-data.net/publications/techreports/ndn-tr-22-ndn-memo-naming-conventions/). In the current revision of this specification, the segment number MUST be zero.
13
* ContentType MUST be 5 (prefix announcement).
14
* Content contains a sequence of TLV elements, including at least an ExpirationPeriod element. Ordering of these TLV elements is insignificant. Unrecognized non-critical TLV elements are permitted and MUST be ignored.
15 1 Junxiao Shi
16 3 Junxiao Shi
**Validity period** of a prefix announcement object is given in ExpirationPeriod and ValidityPeriod elements in its Content.
17 1 Junxiao Shi
18 3 Junxiao Shi
* ExpirationPeriod gives the duration for which the prefix announcement remains valid. The duration begins when a node or program receives the prefix announcement. This element is required.
19
* ValidityPeriod gives the absolute time range in which the prefix announcement remains valid. It is ignored if the receiving node does not have a UnixTime clock. This element is optional.
20 7 Davide Pesavento
* When both ExpirationPeriod and ValidityPeriod are present, the most restrictive constraint applies.
21 1 Junxiao Shi
22 9 Davide Pesavento
The trust model of a prefix announcement is to be defined by the application.
23 3 Junxiao Shi
24
### Example
25
26
```
27
Data
28 4 Junxiao Shi
  Name /net/example/32=PA/%FD%01/%00%00
29 3 Junxiao Shi
  MetaInfo
30 4 Junxiao Shi
    ContentType 5 (prefix announcement)
31 1 Junxiao Shi
  Content
32 3 Junxiao Shi
    ExpirationPeriod 3600000
33 5 Junxiao Shi
    ValidityPeriod
34
      NotBefore 20181030T000000
35
      NotAfter  20181124T235959
36 3 Junxiao Shi
  SignatureInfo
37
  SignatureValue 
38
```
39 1 Junxiao Shi
40 9 Davide Pesavento
This prefix announcement object announces the prefix `/net/example`. It is valid for one hour from its receipt, between the dates 2018-10-30 and 2018-11-24 (included).
41 1 Junxiao Shi
42
## Command Verb: 'announce'
43
44 9 Davide Pesavento
This command announces a prefix using a prefix announcement object. NFD-RIB accepts this command as a *signed Interest* with the following name:
45 1 Junxiao Shi
46
```
47
/localhost/nfd/rib/announce/<params-sha256>
48 8 Junxiao Shi
/localhop/nfd/rib/announce/<params-sha256>
49 1 Junxiao Shi
```
50
51 8 Junxiao Shi
The Interest's ApplicationParameters element carries the prefix announcement object.
52 9 Davide Pesavento
NFD-RIB converts this command into an equivalent `rib/register` command. The route's *origin* is set to "prefix announcement" (=129).
53 1 Junxiao Shi
54 9 Davide Pesavento
The response is the same as the `rib/register` command.
55 1 Junxiao Shi
56 8 Junxiao Shi
Note: There is no 'unannounce' command. Instead, use `rib/unregister` command.
57 1 Junxiao Shi
58 8 Junxiao Shi
### Example
59
60
```
61
Interest
62
  Name /localhop/nfd/rib/announce/params-sha256=607a2bc7653eea18b47e92b84edc58bab5aaa321d4efb39ceeccc6cafbcbb3d1
63
  MustBeFresh
64
  ApplicationParameters
65
    PrefixAnnouncement
66
  InterestSignatureInfo
67 1 Junxiao Shi
  InterestSignatureValue 
68 8 Junxiao Shi
```
69
70
Assuming the enclosed PrefixAnnouncement is the one shown in the previous example, NFD-RIB should interpret this command same as `rib/register` command with the following ControlParameters:
71
72
* Name: `/net/example`
73
* Origin: 129
74 9 Davide Pesavento
* ExpirationPeriod: 3600000; optionally, constrained by the ValidityPeriod of the PrefixAnnouncement