Delay-Tolerant Networking | E. Birrane |
Internet-Draft | Johns Hopkins Applied Physics Laboratory |
Intended status: Experimental | J. Mayer |
Expires: December 28, 2016 | INSYEN AG |
June 26, 2016 |
Asynchronous Management Protocol
draft-birrane-dtn-amp-03
This document describes an Asynchronous Management Protocol (AMP) in conformance with the Asynchronous Management Architecture (AMA). The AMP provides monitoring and configuration services between managing devices (Managers) and managed devices (Agents), some of which may operate on the far side of high-delay or high-disruption links. The AMP reduces the number of transmitted bytes, operates without sessions or (concurrent) two-way links, and functions autonomously when there is no timely contact with a network operator. The AMP accomplishes this without requiring mobile code.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on December 28, 2016.
Copyright (c) 2016 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
This document specifies an Asynchronous Management Protocol (AMP) that provides application-layer network management service conformant to the Asynchronous Management Architecture [AMA].
Network management protocols define the messages that implement management functions amongst managed and managing devices in a network. These functions include the definition, production, and reporting of performance data, the application of administrative policy, and the configuration of behavior based on time and state measurements.
Networks whose communication links are frequently challenged by physical or administrative effects cannot guarantee the low-latency, duplex data communications necessary to support sessions and other synchronous communication. For such networks, a new protocol is required which provides familiar network management services in the absence of sessions and operator-in-the-loop control.
AMP accomplishes the network management function using open-loop, intelligent-push, asynchronous mechanisms that better scale as link challenges scale. The protocol is designed to support several desirable properties outlined in [AMA] and briefly listed below.
+----------+----------+ | Field 1 | Field 2 | | [TYPE 1] | [TYPE 2] | | | (opt) | +----------+----------+
Figure 1: Byte Field Formatting Example
The AMP provides data monitoring, administration, and configuration for applications operating above the data link layer of the OSI networking model. While the AMP may be configured to support the management of network layer protocols, it also uses these protocol stacks to encapsulate and communicate its own messages.
It is assumed that the protocols used to carry AMP messages provide addressing, confidentiality, integrity, security, fragmentation support and other network/session layer functions. Therefore, these items are outside of the scope of this protocol.
This document describes the format of the AMP messages exchanged amongst managing and managed devices in a challenged network. This document further describes the rationale behind key design decisions to the extent that such a description informs the operational deployment and configuration of an AMP implementation. This document does not address specific data configurations of AMP-enabled devices, nor does it discuss the interface between AMP and other management protocols, such as SNMP.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
Note: The terms "Actor", "Agent", "Application Data Model", "Atomic Data", "Computed Data", "Control", "Literal", "Macro", "Manager", "Report Template", "Report Entry", and "Rule" are used without modification from the definitions provided in [AMA].
Additional terms critical to understanding the proper operation of the AMP are as follows.
This section identifies the data types used to capture information within the AMP.
Primitive types are those that are not comprised of any other set of types known to the AMP.
The AMP supports types for unsigned bytes, 32/64-bit signed and unsigned integers, 32/64-bit floating point values, and strings, as outlined in Table 1.
AMP Type | Bit Width | Description |
---|---|---|
BYTE | 8 | unsigned byte value |
INT | 32 | Signed integer in 2's complement |
UINT | 32 | Unsigned integer in 2's complement |
VAST | 64 | Signed integer in 2's complement |
UVAST | 64 | Unsigned integer in 2's complement |
REAL32 | 32 | Single-precision, 32-bit floating point value in IEEE-754 format. |
REAL64 | 64 | Double-precision, 64-bit floating point value in IEEE-754 format. |
STR | Varies | NULL-terminated series of characters in UTF-8 format. |
The data type "SDNV" refers to a Self-Delimiting Numerical Value (SDNV) described in [RFC6256]. SDNVs are used in the AMP to capture any data items that are expected to be 8 bytes or less in total length. AMP Actors MAY reject any value encoded in an SDNV that is greater than 8 bytes in length.
One popular use of SDNVs in the AMP is to compress the representation of 32/64-bit integer values. This simplifies the AMP by not having to additionally support 8/16-bit versions of integers without incurring significant transmission waste when encoding small numbers into 32/64-bit representations.
A timestamp value can represent either a relative or absolute time within the AMP. An AMP relative time is defined as the number of seconds between two AMP events (such as the receipt of a control by an agent and the execution of that control). An AMP absolute time is defined as UTC time using the Unix/POSIX Epoch.
Since timestamps are a common component in AMP messages and controls, they should be made as small as possible. Therefore, timestamps in AMP do not add a special flag to determine whether the given time is an absolute or relative time. Instead, AMP defines a simple formula to unambiguously determine the type of time represented without increasing the overall size of a timestamp.
AMP uses September 9th, 2012 as the timestamp epoch (UTC time 1347148800). Times less than this value MUST be considered a relative time. Values greater than or equal to this epoch MUST be considered as absolute times. In all cases, the AMP timestamp is encoded as an SDNV to avoid the 32-bit 2038 UTC rollover problem.
IF (timestamp < 1347148800) THEN absolute_time = current_time + timestamp ELSE absolute_time = timestamp
The absolute time associated with a timestamp can be calculated unambiguously with the following pseudocode.
Compound types are data types defined as an aggregation of other data types.
A Binary Large Object (BLOB) is an ordered collection of bytes prefaced by the number of bytes making up the BLOB. The format of a BLOB is illustrated in Figure 2. BLOBs are used in the AMP to capture variable data sets that are too large to efficiently store in an SDNV.
Binary Large Object Format
+---------+--------+--------+ +--------+ | # Bytes | BYTE 1 | BYTE 2 | ... | BYTE N | | [SDNV] | [BYTE] | [BYTE] | | [BYTE] | +---------+--------+--------+ +--------+
Figure 2: Binary Large Object Format
A Data Collection (DC) is an ordered set of BLOBs, prefaced by the number of BLOBs making up the collection. The format of a DC is illustrated in Figure 3.
Data Collection
+---------+--------+--------+ +--------+ | # BLOBs | BLOB 1 | BLOB 2 | ... | BLOB N | | [SDNV] | [BLOB] | [BLOB] | | [BLOB] | +---------+--------+--------+ +--------+
Figure 3: Data Collection Format
The Typed Data Collection (TDC) is a special kind of DC which encodes type information as the first BLOB in the collection. The TDC data type is used to capture typical "TLV" (type, length, value) information in the AMP.
The TDC format is illustrated in Figure 4
Typed Data Collection
+---------+-----------+-------------+ +-------------+ | # BLOBs | Type BLOB | Data BLOB 1 | ... | Data BLOB N | | [SDNV] | [BLOB] | [BLOB] | | [BLOB] | +---------+-----------+-------------+ +-------------+
Figure 4: Typed Data Collection Format
The TDC fields are defined as follows.
For example, consider the following set of data values: {(UINT) 3, (REAL32) 3.14, (STR) "pi"}. The corresponding TDC would have 4 BLOBs. BLOB 1 would have length 3 and contain the enumerations for UINT, REAL32, and STR - encoded in one BYTE each. BLOBs 2, 3, and 4 would hold the original data. This example is illustrated in Figure 5.
Typed Data Collection Example
Data Set TDC +---------------+ +---------------------------------+ | # Items = 3 | | # BLOBs = {4} | +---------------+ +---------------------------------+ | (UINT) 3 |--------+ | TYPE BLOB = {UINT, REAL32, STR} | +---------------+ | +---------------------------------+ | (REAL32) 3.14 |-----+ +->| DATA BLOB 1 = {3} | +---------------+ | +---------------------------------+ | (STR) "pi" |--+ +---->| DATA BLOB 2 = {3.14} | +---------------+ | +---------------------------------+ +------->| DATA BLOB 3 = {"pi"} | +---------------------------------+
Figure 5: Typed Data Collection Example
The rationale for extracting data type information into a Type BLOB and placing that BLOB at the beginning of the TDC is to enable faster performance for type validators. With the Type BLOB, a validator can inspect one BLOB to ensure that the elements within the TDC match the expected type specifications. Without a Type BLOB, type information would need to be interspersed with data values throughout the TDC. In that case, a type validator would need to scan through the entire set of bytes comprising the TDC looking for type information. This would significantly alter the speed of type checking in the AMP.
The rationale for placing data values directly in a Data BLOB is to enable rapid navigation. As mentioned in Section 1.2, every data type defined in the AMP is deterministic in length. However, this determination may require deep inspection of the data in cases of variable-length headers and optional fields. By placing the data value in a Data BLOB, the length of the value may be asserted to allow a data parser to rapidly calculate the position of data item N in the TDC. The redundancy of storing a pre-calculated length for each data value when the data value length can be calculated from the data itself is a processing tradeoff made by AMP given the relative frequency with which the TDC is used to communicate Report and Control parameters.
A TBL is a names, typed, collection of tabular data with each row represented as a DC and each column defined by both a column name and a column type. Each row in the TBL MUST have the same length and the ith BLOB of each row DC MUST correspond to the ith column in the table.
The TBL format is illustrated in Figure 6
Table
+-----------+-----------+--------+-------+ +-------+ | Col Names | Col Types | # Rows | Row 1 | | Row N | | [DC] | [BLOB] | [SDNV] | [DC] | ... | [DC] | +-----------+-----------+--------+-------+ +-------+
Figure 6: Table Format
The TBL fields are defined as follows.
+--------------------------------------+ +-----+------+------+ +----->| Col Names DC = {"Month","Ord","Days"}| |Month| Ord | Days |-----+ +--------------------------------------+ |(STR)|(UINT)|(UINT)|----------->| Col Types BLOB = {STR, UINT, UINT} | +-----+------+------+ +--------------------------------------+ |Jan | 1 | 31 |--------+ | Num Rows = 3 | +-----+------+------+ | +--------------------------------------+ |Oct | 10 | 31 |-----+ +-->| Row 1 DC = {"Jan", 1, 31} | +-----+------+------+ | +--------------------------------------+ |June | 6 | 30 |--+ +----->| Row 2 DC = {"Oct", 10, 31} | +-----+------+------+ | +--------------------------------------+ +-------->| Row 3 DC = {"June", 6, 30} | +--------------------------------------+
Figure 7: Table Example
The Figure below illustrates a table of data relating to months of the year on the left and the corresponding populated TBL structure for this table on the right.
Structures defined and exchanged within the AMP must be uniquely identifiable both within a network and (when AMP is used in an overlay) across networks. This section describes the "Managed Identifier" (MID) used to provide unique naming for the AMP structures defined in Section 4. The MID is a variable-length structure with optional fields.
The unique identifier at the core of a MID is based on the Object Identifier (OID) and its Basic Encoding Rules (BER) as identified in the ITU-T X.690 standard. The use of OIDs in the MID structure allows Agents and Managers to interface with other management schemes (such as SNMP) at management boundaries between challenged and unchallenged networks.
The MID consists of a mandatory flag BYTE, a mandatory OID, and optional annotations to assist with filtering, access control, and parameterization. The MID structure is illustrated in Figure 8.
MID format
+--------+--------+--------+--------+ | Flags | Issuer | OID | Tag | | [BYTE] | [SDNV] |[VARIED]| [SDNV] | | | (opt) | | (opt) | +--------+--------+--------+--------+
Figure 8: Managed Identifier Format
The MID fields are defined as follows.
MID Flag Format
+-----+---+---+------------+ | OID |TAG|ISS| STRUCT ID | +-----+---+---+------------+ | 7 6 | 5 | 4 | 3 2 1 0 | +-----+---+---+------------+ MSB LSB
Figure 9
+----------+ | Full OID | | [BLOB] | +----++----+ || || _____________________/ \_________________________ / \ +------------+---------+---------+ +---------+ | OID Length | Octet 1 | Octet 2 | ... | Octet N | | [SDNV] | [BYTE] | [BYTE] | | [BYTE] | +------------+---------+---------+ +---------+
Figure 10: Full OID Format
+----------+------------+ | FULL OID | Parameters | | [BLOB] | [TDC] | +----------+-----++-----+ || || __________________/ \____________________________________ / \ +----------+------------+--------+--------+ +--------+ | # Params | Parm Types | Parm 1 | Parm 2 | | Parm N | | [SDNV] | [BLOB] | [BLOB] | [BLOB] | ... | [BLOB] | +----------+------------+--------+--------+ +--------+
Figure 11: Parameterized OID Format
+----------+--------------+ | Nickname | Relative OID | | [SDNV] | [BLOB] | +----------+--------------+
Figure 12: Compressed OID Format
Compressed Parameterized OID Format
+----------+--------------+------------+ | Nickname | Relative OID | Parameters | | [SDNV] | [BLOB] | [TDC] | +----------+--------------+------------+
Figure 13: Compressed Parameterized OID Format
There are several strategies for reducing the overall size of an OID in an operational system. The AMP method for OID size reduction is to publish global enumerations that represent strategic nodes in an OID tree. This published, global enumeration is called a Nickname.
As mentioned in the discussion of compressed OIDs above, a nickname is used in lieu of a portion of the OID tree. ADMs may define their own nicknames so long as their definitions do not conflict with the definitions of nicknames in other ADMs. AMP does not provide the ability to assign nicknames dynamically.
Like other numeric types, nicknames are encoded as SDNVs allowing them to be of arbitrary length. For example, 3 bytes of SDNV can encode over 2 million nicknames. Assuming ADMs are allotted 10 nicknames each, this approach can accommodate over 200,000 ADMs before requiring a 4th byte for nickname information.
Additionally, since nicknames are globally unique, neither an AMP Agent or Manager is ever required to expand a compressed OID to assert uniqueness or perform other identification. It is recommended that compressed OIDs be used whenever possible.
Parameterized OIDs provide a powerful mechanism for customizing behavior for certain AMP structures. Parameterized values in AMP are formally defined in ADMs with a well-known, static typing. When an ADM specifies that an identified AMP structure may be parameterized, the specification MUST list the number of expected parameters and the type associated with each parameter. When a particular instance of a parameterized AMP structure is generated by an Agent or a Manager, the MID identifying that instance MUST contain a parameterized OID and the parameters associated with the OID MUST match in number and type the specification.
When parameterizing an AMP structure, some parameters may be optional with default values defined if parameters are omitted. The use of optional parameters helps keep MID values small when using default values for parameters is a common case, rather than forcing all parameters to be provided all the time.
Since each individual parameter in a TDC is represented as a BLOB, a parameter can be omitted by specifying a length of 0 BYTES for the Data BLOB holding the parameter. If a parameter is omitted and is not considered optional by the parameterized AMP structure, this MUST be considered an error.
The type value associated with the TDC in a parameter list is only used to provide type-checking safety to ensure that the given parameters match expected parameter types. It is important to understand that the types in the parameter TDC DO NOT define the parameterized interface - only the ADM defines the typed interface.
Parameters within the TDC may be represented in one of two ways: the parameter itself (parameter by value), or an expression used to determine the parameter (parameter by evaluation).
When specifying a parameter using a value, the BYTE representing the parameter type MUST be set to the expected parameter type and the BLOB representing the parameter contents MUST be the parameter value.
For example, consider a parameterized OID that takes 1 parameter, which it expects to be an unsigned integer (UINT). When populating this parameter by value, the type of the populated parameter field MUST be UINT and the parameter value MUST be the unsigned integer.
When the value of a parameter is likely to change, an Expression (EXPR) may be substituted for the parameter value. When it comes time to interpret the parameter value, the current value of the Expression is calculated and used as the parameter value.
A parameter defined by evaluation MUST be of type EXPR, and the type of the EXPR must be equal to the expected type of the parameter. Expressions and Expression types are discussed in Section 3.6.2.
NOTE: If the expected type of the parameter is already EXPR, and a parameter of type EXPR is provided, then the system MUST treat the situation as if it were a parameter by value. AMP DOES NOT support an EXPR which references another EXPR as doing so leads to significant confusion in implementations and the possibility of circular reference.
The determination of whether a parameter has been provided by value or by evaluation is made by comparing the given type of the parameter to the expected type of the parameter.
If the parameter type and the expected type match, then the parameter MUST be considered by value. If the parameter type is an EXPR and the EXPR type matches the expected type, then the parameter MUST be considered by evaluation of the EXPR. In any other case, the parameter MUST be considered invalid as being from a type mismatch.
In addition to the data types already mentioned, the following special data types are also defined.
+--------+-------+ +-------+ | # MIDs | MID 1 | ... | MID N | | [UINT] | [MID] | | [MID] | +--------+-------+ +-------+
Figure 14: MID Collection
A MID collection is comprised of a value identifying the number of MIDs in the collection, followed by each MID, as illustrated in Figure 14.
+--------+------------+ | Type | Expression | | [BYTE] | [MC] | +--------+------------+
Figure 15
Expressions apply mathematical operations to values to generate new values on an Agent. The EXPR type in AMP is a collection of MIDs that represent a postfix notation stack of data, Literal, and Operator types. For example, the infix expression A * (B * C) is represented as the sequence A B C * *. The format of an expression is illustrated in Figure 15.
Predicates are Expressions whose values are interpreted as a Boolean. The value of zero MUST be considered "false" and all other values MUST be considered "true".
This section identifies the AMP structures that implement the AMA logical data model.
The AMA defines a series of logical components that should be included as part of an AMP. These components are summarized from the AMA in the following table.
AMA Component | Summary Description | AMP Structure |
---|---|---|
Atomic Data | A typed, measured value whose definition and value determination occurs externally to the AMP. | Externally Defined Data |
Computed Data | A typed, computed value whose definition and value determination occurs within the AMP. | Variable |
Report Entry | Collection of Atomic and/or Computed data and/or other Reports. | Report Entry |
Control | Parameterized opcode for any action that can be taken by an Agent. | Control |
Rule | A pre-configured response to a pre-defined time or state on an Agent. | State-Based Rule, Time-Based Rule |
Macro | An ordered collection of Controls. | Macro |
Literal | A constant used when evaluating Rules or determining the value of Computed Data. | Literal |
Operator | An opcode representing a mathematical function known to an Agent. | Operator |
The AMP implements these logical components in largely a one-to-one fashion with a few exceptions. This section describes the format of these structures in the context of the aforementioned AMP data types. NOTE: The expression of these structures is only to describe how they appear in messages exchanged between and amongst Agents and Managers. Individual software applications may choose their own internal representation of these structures.
Externally defined data (EDD) are defined as part of ADMs for various applications and protocols. These represent values that are calculated outside of the context of Agents and Managers, such as those values measured by firmware. As such, their value is defined external to the AMP system.
+-------+ | ID | | [MID] | +-------+
Figure 16: Externally Defined Data Format
The representation of these data is simply their identifying MIDs. The representation of an EDD is illustrated in Figure 16.
Managers
Agents
Variables (VAR) are either statically defined in an ADM or dynamically defined by a particular network. They differ from EDDs in that they are completely described by other known data in the system (either other Variables, or other EDDs). For example, letting E# be a EDD item and V# be a VAR item, the following are examples of VAR definitions.
V1 = E1 * E2
V2 = V1 + E3
+------------+ | Variable | | [VAR] | +-----++-----+ || || ______________/ \_____________ / \ +-------+--------+-------------+ | ID | Type | Initializer | | [MID] | [BYTE] | [EXPR] | +-------+--------+-------------+
Figure 17: Variable Format
VARs are defined by the triplet (ID, TYPE, EXPR) as illustrated in Figure 17.
Managers
Agents
A Report is an AMP message whose format is described in Section 7.4. This message is populated with Report Entries that contain data formatted in accordance with Report Templates.
A Report Template is the ordered set of data descriptions that describe how values will be represented in a corresponding Report Entry. Templates can be viewed as a schema that describes how to interpret a Report Entry, since these entries do not embed schema or name information in them. Templates contain no values and are either defined in an ADM or configured between Managers and Agents.
A Report Entry is a set of data values populated using a given Report Template. A Report Entry contains only data values and no template definitions. By removing definition information from a Report Entry, the volume of information sent from the Agent to the Manager is greatly reduced. When a Report Entry is generated as capturing the result of a Control, the Report Template for the Control is assumed to be known to both the generating Agent and all receiving Managers.
A Report Template is modeled as a MC, as each data definition in the template is identified by a MID.
A Report Entry is a TDC identified by a MID and generated to capture the return value of a Control. Generated Report Entries MUST be collected by an Agent periodically, placed in an AMP Report message, and sent to one or more Managers.
When a Report Entry is generated in accordance with a named Report Template, the entry identifier MUST be the same as the template defining the data in the entry. When a Report Entry is generated absent a defined Report Template, then the entry identifier MUST be the MID of the Control generating the report.
+-------+--------+ | ID | Values | | [MID] | [TDC] | +-------+---++---+ || || ___________________________/ \__________________________________ / \ +----------+-------------+---------+---------+ +---------+ | # Values | Value Types | Value 1 | Value 2 | | Value N | | [SDNV] | [BLOB] | [BLOB] | [BLOB] | ... | [BLOB] | +----------+-------------+---------+---------+ +---------+
Figure 18: Report Entry Format
The definition of a Report Entry is illustrated in Figure 18.
Managers
Agents
A Control represents a pre-defined (possibly parameterized) opcode that can be run on an Agent. Controls in the AMP are always defined in the context of an ADM. There is no concept of an operator-defined Control. Since Controls are pre-configured in Agents and Managers as part of ADM support, their representation is simply the MID that identifies them, similar to EDDs.
+-------+ | ID | | [MID] | +-------+
Figure 19: Control Format
The format of a Control is illustrated in Figure 19.
Managers
Agents
A Time-Based Rule (TRL) specifies that a particular action should be taken by an Agent based on some time interval. A TRL specifies that starting at a particular START time, and for every PERIOD seconds thereafter, an ACTION should be run by the Agent until the ACTION has been run for COUNT times. When the TRL is no longer valid it MAY BE discarded by the Agent.
Examples of TRLs include:
+-------+-------+--------+--------+--------+ | ID | START | PERIOD | COUNT | ACTION | | [MID] | [TS] | [UINT] | [UINT] | [MC] | +-------+-------+--------+--------+--------+
Figure 20: Time-Based Rule Format
The format of a TRL is illustrated in Figure 20.
Managers
Agents
A State-Based Rule (SRL) specifies that a particular action should be taken by an Agent based on some evaluation of the internal state of the Agent. A SRL specifies that starting at a particular START time an ACTION should be run by the agent if some CONDITION evaluates to true, until the ACTION has been run COUNT times. When the SRL is no longer valid it MAY be discarded by the agent.
Examples of SRLs include:
+-------+-------+--------+--------+--------+ | ID | START | COND | COUNT | ACTION | | [MID] | [TS] | [PRED] | [UINT] | [MC] | | | | | | | +-------+-------+--------+--------+--------+
Figure 21: State-Based Rule Format
The format of a SRL is illustrated in Figure 21.
Managers
Agents
Macros in the AMP are ordered collections of MIDs (an MC) that contain Controls or other Macros. When run by an Agent, each MID in the MC is run in order.
Any AMP implementation MUST allow at least 4 levels of Macro nesting. Implementations MUST provide some mechanism to prevent recursive nesting of Macros.
While the MIDs representing any given Control may be parameterized, the MID associated with a Macro MAY NOT be parameterized.
+-------+------------+ | ID | Definition | | [MID] | [MC] | +-------+------------+
Figure 22: Macro Format
The format of a Macro is illustrated in Figure 22.
Managers
Agents
Literals in the AMP represent constants defined in an ADM. Examples of constants that could be defined in an ADM include common mathematical values such as PI or well-known Epochs such as the UNIX Epoch.
The ADM definition of a Literal MUST include the type of the Literal value. Since ADM definitions are preconfigured on Agents and Managers in an AMA the type information for a given Literal is therefore known by all actors in the system.
If the MID identifying the Literal encapsulates a non-parameterized OID, then the value is given in the ADM and Agents and Managers can lookup this value in their set of pre-configured data.
If the MID identifying the Literal encapsulates a parameterized OID, then the parameters to the OID define the value of the Literal. Users wishing to create a new Literal will create a MID with whatever parameters are necessary to create the value. The documentation of the ADM defining the Literal MUST describe how parameters result in the calculation of the Literal value.
+-------+ | ID | | [MID] | +-------+
Figure 23: Control Format
The format of a Literal is illustrated in Figure 23.
Managers
Agents
Operators in the AMP are always defined in the context of an ADM. There is no concept of a user-defined operator, as operators represent mathematical functions implemented by the firmware on an Agent. Since Operators are pre-configured in Agents and Managers as part of ADM support, their representation is simply the MID that identifies them.
The ADM definition of an Operator MUST specify how many parameters are expected and the expected type of each parameter. For example, the unary NOT Operator ("!") would accept one parameter. The binary PLUS Operator ("+") would accept two parameters. A custom function to calculate the average of the last 10 samples of a data item would accept 10 parameters.
+-------+ | ID | | [MID] | +-------+
Figure 24: Operator Format
Operators are always evaluated in the context of an Expression. The format of an Operator is illustrated in Figure 24.
Managers
Agents
This section lists the IDs and enumerations for data types outlined in this section. IDs are the text abbreviations used in this specification and in ADMs to identify data types. Enumerations associate data types with a numeric value. These enumerations MUST be used whenever a data type is represented as a numerical representation.
NOTE: Type enumerations are always represented as a BYTE in the AMP.
IDs and enumerations are grouped by the kind of data they represent, as follows. AMP structure identifiers occupy enumerations 0 - 8 and represent AMP data structures that are formally identified by a MID. Basic data types occupy enumerations 9-18 and represent primitive data types in the AMP specification. Compound and special types occupy enumerations 19-25 and represent other data types known to the AMP specification.
AMP Structure | ID | Enumeration | Numeric |
---|---|---|---|
Externally Defined Data | EDD | 0 | No |
Variable | VAR | 1 | No |
Report | RPT | 2 | No |
Control | CTRL | 3 | No |
State-Based Rule | SRL | 4 | No |
Time-Based Rule | TRL | 5 | No |
Macro | MACRO | 6 | No |
Literal | LIT | 7 | No |
Operator | OP | 8 | No |
Basic Data Type | ID | Enumeration | Numeric |
---|---|---|---|
BYTE | BYTE | 9 | No |
Signed 32-bit Integer | INT | 10 | Yes |
Unsigned 32-bit Integer | UINT | 11 | Yes |
Signed 64-bit Integer | VAST | 12 | Yes |
Unsigned 64-bit Integer | UVAST | 13 | Yes |
Single-Precision Floating Point | REAL32 | 14 | Yes |
Double-Precision Floating Point | REAL64 | 15 | Yes |
Self-Delineating Numerical Value | SDNV | 16 | No |
Timestamp | TS | 17 | No |
Character String | STR | 18 | No |
Compound/Special Data Type | ID | Enumeration | Numeric |
---|---|---|---|
Binary Large Object | BLOB | 19 | No |
Managed Identifier | MID | 20 | No |
MID Collection | MC | 21 | No |
Expression | EXPR | 22 | No |
Data Collection | DC | 23 | No |
Typed Data Collection | TDC | 24 | No |
Table | TBL | 25 | No |
When attempting to evaluate operators of different types, wherever possible, an Agent MAY need to promote operands until they are of the correct type. For example, if an Operator is given both an INT and a REAL32, the INT SHOULD be promoted to a REAL32 before the Operator is applied.
INT UINT VAST UVAST REAL32 REAL64 +--------+--------+--------+--------+--------+--------+ INT | INT | INT | VAST | UNK | REAL32 | REAL64 | UINT | INT | UINT | VAST | UVAST | REAL32 | REAL64 | VAST | VAST | VAST | VAST | VAST | REAL32 | REAL64 | UVAST | UNK | UVAST | VAST | UVAST | REAL32 | REAL64 | REAL32 | REAL32 | REAL32 | REAL32 | REAL32 | REAL32 | REAL64 | REAL64 | REAL64 | REAL64 | REAL64 | REAL64 | REAL64 | REAL64 | +--------+--------+--------+--------+--------+--------+
Figure 25: AMP Numeric Promotions
The listing of legal promotions in the AMP are listed in Figure 25. In this Figure, operands are listed across the top row and down the first column. The resultant type of the promotion is listed in the table at their intersection.
AMP does not permit promotions between non-numeric types, and numeric promotions not listed in this section are not allowed in the AMP. Any attempt to perform an illegal promotion in the AMP SHOULD result in an error.
Variables, Expressions, and Predicates in the AMP are typed values. When attempting to assign a value of a different type, a numeric conversion must be performed. Any numeric type may be converted to any other numeric type in accordance with the C rules for arithmetic type conversions.
An application data model (ADM) specifies the set of AMP components associated with a particular application or protocol. The purpose of the ADM is to provide a guaranteed interface for the management of an application or protocol over AMP that is independent of the nuances of its software implementation. In this respect, the ADM is conceptually similar to the Managed Information Base (MIB) used by SNMP, but contains additional information relating to command opcodes and more expressive syntax for automated behavior.
Any implementation claiming compliance with a given ADM must collect all identified EDDs, compute all identified Variables, perform identified Controls and Macros, generate Report Entries to defined Report Templates, and understand identified Literals and Operators.
Each ADM specifies the globally unique identifiers and descriptions for all EDDs, Variables, Controls, Literals, Macros, Report Templates, and Operators associated with the application or protocol managed by the ADM.
ADM metadata consist of the items necessary to uniquely identify the ADM itself. The required metadata items include the following.
Item | Type | Description | Req. |
---|---|---|---|
Name | STR | The human-readable name of the ADM. | Y |
Version | STR | Version of the ADM encoded as a string. | Y |
OID Nickname N | OID | ADMs provide an ordered list of nicknames that can be used by other MIDs in the ADM definition to defined compressed OIDs. There can an arbitrary number of nicknames defined for an ADM. | N |
The ADM Data Section consist of all components in the "data" category associated with the managed application or protocol. The information that must be provided for each of these items is as follows.
The full set of EDDs, Variables, Report Templates, Controls, Rules, Macros, Literals, and Operators that can be understood by an AMP Agent have been separated into an AMP Agent ADM. Just as the AMP uses ADMs to manage applications and protocols, the ADM model is also used to implement the functionality of the Agent.
This section describes the format of the messages that comprise the AMP protocol. The AMP message specification is limited to three basic communications:
The entire management of a network can be performed using these three messages and the configurations from associated ADMs.
+--------+-----------+-----------+ +-----------+ | # Msgs | Timestamp | Message 1 | ... | Message N | | [SDNV] | [TS] | [VARIES] | | [VARIES] | +--------+-----------+-----------+ +-----------+
Figure 26: AMP Message Group Format
Individual messages within the AMP are combined into a single group for communication with another AMP Actor. Messages within a group MUST be received and applied as an atomic unit. The format of a message group is illustrated in Figure 26. These message groups are assumed communicated amongst Agents and Managers as the payloads of encapsulating protocols which MAY provide additional security and data integrity features.
+--------+----------+----------+ | Header | Body | Trailer | | [BYTE] | [VARIES] | [VARIES] | | | | (opt.) | +--------+----------+----------+
Figure 27: AMP Message Format
+--------+----+---+-----------+ |ACL Used|Nack|Ack| Opcode | +--------+----+---+-----------+ | 7 | 6 | 5 | 4 3 2 1 0 | +--------+----+---+-----------+ MSB LSB
Figure 28: AMP Common Message Header
Each message identified in the AMP specification adheres to a common message format, illustrated in Figure 27, consisting of a message header, a message body, and an optional trailer.
+----------+ | Agent ID | | [BLOB] | +----------+
Figure 29: Register Agent Message Body
The Register Agent message is used to inform an AMP Manager of the presence of another Agent in the network.
Reports capture information generated by Agents and transmitted to Managers in the AMP. Since the AMP is an asynchronous protocol there is no explicit association between the contents of a Report and a generating action by either a Manager or an Agent.
+------+---------+-----------+---------+ +---------+ | Time | RX Name | # Entries | ENTRY 1 | | ENTRY N | | [TS] | [BLOB] | [SDNV] | [RPTE] |...| [RPTE] | +------+---------+-----------+---------+ +---------+
Figure 30: Data Report Message Body
Reports are an ordered collection of Report Entries collected from a managed device.
+-------+-----------+ | Start | Controls | | [TS] | [MC] | +-------+-----------+
Figure 31: Perform Control Message Body
The perform control message causes the receiving AMP Actor to run one or more pre-configured Controls provided in the message.
At this time, this protocol has no fields registered by IANA. However, such a registry MUST be established to capture certain data elements provided in ADMs, such as nicknames and root OIDs.
Security within the AMP exists in two layers: transport layer security and access control.
Transport-layer security addresses the questions of authentication, integrity, and confidentiality associated with the transport of messages between and amongst Managers and Agents. This security is applied before any particular Actor in the system receives data and, therefore, is outside of the scope of this document.
Finer grain application security is done via ACLs provided in the AMP message headers.
[AMA] | Birrane, E., "Asynchronous Management Architecture", Internet-Draft draft-birrane-dtn-ama-00, August 2015. |
[I-D.irtf-dtnrg-dtnmp] | Birrane, E. and V. Ramachandran, "Delay Tolerant Network Management Protocol", Internet-Draft draft-irtf-dtnrg-dtnmp-01, December 2014. |
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997. |
[RFC6256] | Eddy, W. and E. Davies, "Using Self-Delimiting Numeric Values in Protocols", RFC 6256, DOI 10.17487/RFC6256, May 2011. |
The following participants contributed technical material, use cases, and useful thoughts on the overall approach to this protocol specification: Jeremy Pierce-Mayer of INSYEN AG contributed the concept of the typed data collection and early type checking in the protocol and has agreed to document the access control list and error reporting portion of the specification.