RFC 5497
Representing Multi-Value Time in Mobile Ad Hoc Networks (MANETs)
RFC 5497 ๐ Representing Multi-Value Time in Mobile Ad Hoc Networks (MANETs)
Okay, so here's the title block, bestie ๐ :
- Network Working Group ๐
- Request for Comments: 5497 ๐ฆ
- Category: Standards Track โจ
- Authors: T. Clausen (LIX, Ecole Polytechnique) and C. Dearlove (BAE Systems ATC) ๐
- Date: March 2009 ๐ธ
- Obsoletes / Updates: the title block doesn't list any RFCs that this one obsoletes or updates ๐
Status of This Memo
This document specifies an Internet standards track protocol for the Internet community, and it's asking for discussion and suggestions for improvements ๐ซถ. For the standardization state and status of this protocol, check the current edition of the "Internet Official Protocol Standards" (STD 1). Distribution of this memo is unlimited ๐.
Copyright Notice
Copyright (c) 2009 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, as they stand on the date this document was published (http://trustee.ietf.org/license-info). Please read those carefully, because they spell out your rights and restrictions for this document ๐.
This document may include material from IETF Documents or IETF Contributions that were published or made publicly available before November 10, 2008. The people who control the copyright in some of that material may not have given the IETF Trust permission to allow modifications outside the IETF Standards Process. Unless you get an adequate license from those copyright holders, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process. The one exception is formatting it for publication as an RFC, or translating it into languages other than English ๐.
Abstract
This document describes a general and flexible TLV (type-length-value structure) for representing time-values, like an interval or a duration. It uses the generalized Mobile Ad hoc NETwork (MANET) packet/message format ๐ง. It defines two Message TLVs and two Address Block TLVs for representing validity and interval times for MANET routing protocols โจ.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Motivation and Rationale . . . . . . . . . . . . . . . . . 3
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5
3. Applicability Statement . . . . . . . . . . . . . . . . . . . 6
4. Protocol Overview and Functioning . . . . . . . . . . . . . . 6
5. Representing Time . . . . . . . . . . . . . . . . . . . . . . 6
6. General Time TLV Structure . . . . . . . . . . . . . . . . . . 7
6.1. Single-Value Time TLVs . . . . . . . . . . . . . . . . . . 8
6.2. Multi-Value Time TLVs . . . . . . . . . . . . . . . . . . 9
7. Message TLVs . . . . . . . . . . . . . . . . . . . . . . . . . 10
7.1. INTERVAL_TIME TLV . . . . . . . . . . . . . . . . . . . . 10
7.2. VALIDITY_TIME TLV . . . . . . . . . . . . . . . . . . . . 10
8. Address Block TLVs . . . . . . . . . . . . . . . . . . . . . . 10
8.1. INTERVAL_TIME TLV . . . . . . . . . . . . . . . . . . . . 10
8.2. VALIDITY_TIME TLV . . . . . . . . . . . . . . . . . . . . 11
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11
9.1. Expert Review: Evaluation Guidelines . . . . . . . . . . . 11
9.2. Message TLV Types . . . . . . . . . . . . . . . . . . . . 12
9.3. Address Block TLV Types . . . . . . . . . . . . . . . . . 12
10. Security Considerations . . . . . . . . . . . . . . . . . . . 13
11. References . . . . . . . . . . . . . . . . . . . . . . . . . . 13
11.1. Normative References . . . . . . . . . . . . . . . . . . . 13
11.2. Informative References . . . . . . . . . . . . . . . . . . 13
Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 14
1. Introduction โจ
The generalized packet/message format in [RFC5444] is a signaling format that MANET routing protocols can use to swap protocol information ๐ . It lets you attach attributes to packets, messages, or addresses using a general TLV (type-length-value) mechanism ๐.
This document specifies a general Time TLV structure. Any MANET routing protocol can use it when it needs to express either single time-values, or a set of time-values where each time-value is tied to a range of hop counts, which the Message Header of [RFC5444] provides ๐ง. This means a receiving node can work out a single time-value if it knows its hop count from the originator node, or if the Time TLV only specifies one time-value to begin with ๐ซถ.
A time-value, in this context, is not an "absolute point in time" ๐ โโ๏ธ. It's an interval or a duration, so a Time TLV can say something like "10 seconds" โฑ๏ธ.
This document also specifies two Message TLV Types that use the TLV structure proposed here. They're INTERVAL_TIME and VALIDITY_TIME. INTERVAL_TIME gives the maximum time before another message of the same type as this message, from the same originator, should be received. VALIDITY_TIME gives the duration for which the information in this message is valid after receipt ๐. Note that if both are present, the latter will usually be greater than the former, so there's room for possible message loss ๐ญ.
This document also specifies two Address Block TLV Types that use the TLV structure proposed here. They're INTERVAL_TIME and VALIDITY_TIME too, and they're defined the same way as the two Message TLVs with the same names ๐ฆ.
1.1. Motivation and Rationale ๐
The Time TLV structure in this document is meant to be used as a component of a MANET routing protocol ๐ธ. For example, it can show the expected spacing between successive transmissions of a given Message Type, by including a Time TLV in transmitted messages ๐จ.
Some MANET routing protocols might use very short spacing for some messages and very long spacing for others. They might also change the message transmission rate based on what they observe ๐. For example, if a network is seen to have a highly dynamic topology at some point, a very short (sub-second) message spacing could be appropriate. But if the network later settles down, multi-hour message spacing may become appropriate ๐. Different MANET routing protocols, and different deployments of them, may have different granularity requirements and bounds on the shortest and longest spacing between successive message transmissions ๐.
MANET routing protocol deployments typically use bandwidth-limited wireless network interfaces ๐ถ. So they'd rather trade computational complexity for a saving in the number of bits transmitted ๐ง . That works here, because the intended uses of Time TLVs, including the specified examples of message interval time and information validity time, don't need high-precision time values ๐ .
The Time TLV structure in this document caters to these characteristics by:
- encoding time-values, like an interval or a duration, in an 8-bit field; while
- allowing these time-values to range from "very small" (e.g., 1/1024 second) to "very long" (e.g., 45 days); and
- allowing a MANET routing protocol, or a deployment, to parameterize this (e.g., to get finer granularity at the expense of a lower upper bound) through a single parameter, C.
The parameter C must be the same for all MANET routers in the same deployment ๐ฅ.
The TLV mechanism in [RFC5444] lets you associate a "value" with a packet, a message, or addresses ๐. The data structure for doing that, the TLV, is identical in all three cases. But the TLV's position in a received packet tells you whether it's a "Packet TLV" (it appears in the Packet Header, before any messages), a "Message TLV" (it appears in the TLV Block right after a Message Header), or an "Address Block TLV" (it appears in the TLV Block right after an Address Block) ๐ต๏ธโโ๏ธ.
TLVs can be structurally identical while meaning totally different things ๐. What they express depends on the kind (packet, message, or Address Block) and the type of the TLV. For example, one TLV might attach a lifetime to an address, another a content sequence number to a message, and another a cryptographic signature to a packet ๐. That's why [RFC5444] specifies separate registries for Packet TLV Types, Message TLV Types, and Address Block TLV Types, and why it doesn't specify any structure in the TLV Value field ๐๏ธ.
The TLVs defined in this document basically say that "this information will be refreshed within X seconds" and that "this information is valid for X seconds after being received". Each one lets the "X seconds" be specified as a function of the number of hops from the originator of the information ๐งฎ. This document specifies a general format for expressing and encoding this as the value field of a TLV ๐ซ. The representation uses a compact (8-bit) form of time, since message size is an issue in many MANETs, and the offered precision and range suit MANET routing protocols ๐ฏ.
A TLV in this format may be used for packets, messages, or addresses ๐. For example, a proactive MANET routing protocol that periodically reports link-state information could include a TLV in this format as a Message TLV ๐ก. That could mean a different periodicity in different scopes: frequently up to a few hops, less frequently beyond that, because some messages may be sent with limited scope, as specified in [RFC5444] ๐ญ. A reactive MANET routing protocol could include a TLV in this format as an Address Block TLV to report the lifetime of routes to individual addresses ๐ฃ๏ธ.
Besides defining the general format above, this document requests IANA assignments for the INTERVAL_TIME and VALIDITY_TIME TLVs ๐ท๏ธ. These assignments are requested here so that unrelated MANET protocols don't depend on each other. It also keeps them from using up the TLV Type spaces by each requesting types for essentially identical data structures ๐. Only Message TLVs and Address Block TLVs are requested, since those are the ones where a need has been demonstrated ๐ .
2. Terminology ๐
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119] ๐.
This document also uses terminology from [RFC5444], and introduces the following terminology ๐ง:
- hop count - the number of hops from the message originator to the message recipient. This is defined to equal the
<msg-hop-count>field in the<msg-header>element defined in [RFC5444], if present, after it is incremented on reception. If the<msg-hop-count>field is not present, or in a Packet TLV, then hop count is defined to equal 255 ๐ข. - time-value - a time, measured in seconds โฐ.
- time-code - an 8-bit field, representing a time-value ๐.
3. Applicability Statement ๐ฆ
okay so this section is where we figure out when this TLV stuff is actually useful, bestie ๐ It applies whenever you need a single time-value, or a time-value that changes depending on how many hops away the message came from, in a protocol using the generalized MANET packet/message format [RFC5444]. hop-count main character energy ๐ง
Some examples of time-values a protocol message might carry:
- The maximum time interval until the next message of the same type is to be generated by the message's originator node.
- The validity time of the information with which the time-value is associated.
Either of these can vary with the hop count between the originating and receiving nodes, like if messages of the same type get sent with different hop limits as defined in [RFC5444] ๐ธ
Parts of this document were generalized from material in the proactive MANET routing protocol OLSR (Optimized Link State Routing Protocol) [RFC3626]. iykyk ๐ซถ
4. Protocol Overview and Functioning โจ
no protocol here, just vibes and encoding ๐ This document does not specify a protocol, and it does not mandate specific node or protocol behavior. What it does do is outline mechanisms for encoding time-values using the TLV mechanism of [RFC5444].
5. Representing Time โฐ
okay this is the fun part, bestie ๐ This document specifies a TLV structure where each time-value is represented by an 8-bit time-code, and one or more of those may be used in a TLV's <value> field. Of those 8 bits, the least significant 3 bits are the mantissa (a), and the most significant 5 bits are the exponent (b), so that:
time-value := (1 + a/8) * 2^b * C
time-code := 8 * b + a
All nodes in the MANET MUST use the same value of the constant C, which is specified in seconds, so all time-values are in seconds too ๐ฆ C MUST be greater than 0 seconds. Also, ascending time-codes mean ascending time-values, so you can compare time-values just by comparing their time-codes. literally so easy ๐
An algorithm for computing the time-code representing the smallest representable time-value not less than the time-value t is:
- find the largest integer b such that
t/C >= 2^b; - set
a := 8 * (t / (C * 2^b) - 1), rounded up to the nearest integer; - if
a = 8, then setb := b + 1and seta := 0; - if
0 <= a <= 7, and0 <= b <= 31, then the required time-value can be represented by the time-code8 * b + a, otherwise it cannot.
The minimum time-value you can represent this way is C. The maximum is 15 * 2^28 * C, or about 4.0 * 10^9 * C. For example, if C = 1/1024 second, that's about 45 days ๐ญ
A protocol using this time representation MUST define the value of C. A protocol using this specification MAY specify that the all-bits zero time-value (0) represents a time-value of zero, and/or that the all-bits one time-value (255) represents an indefinitely large time-value โจ
6. General Time TLV Structure ๐ง
this structure lets you store a single time-value, or a default time-value plus pairs of (time-value, hop count) for when the time-value depends on hop count. The time-values are stored as time-codes, as defined in Section 5. This <time-data> structure is written using the regular expression syntax of [RFC5444] like this:
<time-data> = (<time-code><hop-count>)*<time-code>
where:
<time-code>is an 8-bit unsigned integer field containing a time-code as defined in Section 5.<hop-count>is an 8-bit unsigned integer field specifying a hop count from the message originator.
A <time-data> structure always has an odd number of octets. With a repetition factor of n for the (time, hop count) pairs, it has 2n+1 octets. When receiving, n is figured out from the length ๐
A <time-data> field looks like this:
<t_1><d_1><t_2><d_2> ... <t_i><d_i> ... <t_n><d_n><t_default>
<d_1>, ... <d_n>, if present, MUST be a strictly increasing sequence, with <d_n> < 255. Then, at the receiving node's hop count from the originator node, the time-value is the one represented by:
<t_1>, ifn > 0and hop count<= <d_1>;<t_i+1>, ifn > 1and<d_i> < hop count <= <d_i+1>for some i such that1 <= i < n;<t_default>otherwise, i.e. ifn = 0or hop count> <d_n>.
If it's included in a message without a <msg-hop-count> field in its Message Header, or in a Packet TLV, then the form of this structure with a single time-code in <time-data> (so n = 0) SHOULD be used ๐
6.1. Single-Value Time TLVs ๐ซ
The point of a single-value Time TLV is to let a node receiving an entity with the Time TLV figure out a single time-value, based on its hop count from the entity's originator. The Time TLV can have info that makes that time-value depend on hop count, so different receiving nodes might figure out different time-values.
A single-value Time TLV can be a Packet TLV, a Message TLV, or an Address Block TLV.
A Time TLV with the tismultivalue flag cleared ('0') in its <tlv-flags> field, as defined in [RFC5444], contains a single <time-data> (as defined above) in its <value> field. For such a Time TLV:
- The
<length>field in the TLV MUST contain the value2n+1, with n being the number of (time-value, hop count) pairs in the Time TLV. - The number of (time-value, hop count) pairs MUST be identified by inspecting the
<length>field in the TLV. The number of such pairs, n, is:n := (<length> - 1) / 2
This MUST be an integer value.
6.2. Multi-Value Time TLVs ๐
The point of a multi-value Time TLV is to link a set of <time-data> structures to an identically sized set of addresses, as described in [RFC5444]. For each of those <time-data> structures, a receiving node can figure out a single time-value based on its hop count from the entity's originator. The Time TLV can contain info that makes that time-value depend on hop count, so different receiving nodes might figure out different time-values.
Multi-value Time TLVs MUST be Address Block TLVs. A multi-value Time TLV MUST NOT be a Packet TLV or a Message TLV ๐
A Time TLV with the tismultivalue flag set ('1') in its <tlv-flags> field, as defined in [RFC5444], contains a sequence of <time-data> structures (as defined above) in its <value> field. For such a Time TLV:
- The
<length>field in the TLV MUST contain the valuem * (2n+1), with n being the number of (time-value, hop count) pairs in the Time TLV, and m being number-values as defined in [RFC5444]. - The number of
<time-data>structures in the<value>field is equal to number-values as defined in [RFC5444]. - The number of (time-value, hop count) pairs in each
<time-data>structure MUST be the same, and MUST be identified by inspecting the<length>field in the TLV and using number-values as defined in [RFC5444]. The number of such pairs in each<time-data>structure, n, is:n := ((<length> / number-values) - 1) / 2
This MUST be an integer value. The lists of hop count values MAY be different ๐ฆ
7. Message TLVs ๐
Two Message TLVs are defined, for signaling message interval (INTERVAL_TIME) and message validity time (VALIDITY_TIME).
7.1. INTERVAL_TIME TLV โณ
An INTERVAL_TIME TLV is a Message TLV that defines the maximum time before another message of the same type as this message, from the same originator, should be received. This interval time MAY be specified to depend on the hop count from the originator. (This is useful if messages are sent with different hop limits, so receiving nodes at greater hop counts get an increased interval time.)
A message MUST NOT include more than one INTERVAL_TIME TLV.
An INTERVAL_TIME TLV is an example of a Time TLV specified as in Section 5.
7.2. VALIDITY_TIME TLV ๐ฐ๏ธ
A VALIDITY_TIME TLV is a Message TLV that defines the validity time of the information carried in the message it's contained in. After this time, the receiving node MUST consider the message content to no longer be valid (unless it's repeated in a later message). The validity time of a message MAY be specified to depend on the hop count from its originator. (This is useful if messages are sent with different hop limits, so receiving nodes at greater hop counts receive info less often and have to treat it as valid for longer.)
A message MUST NOT include more than one VALIDITY_TIME TLV.
A VALIDITY_TIME TLV is an example of a Time TLV specified as in Section 5.
8. Address Block TLVs ๐ฎ
Two Address Block TLVs are defined, for signaling address advertisement interval (INTERVAL_TIME) and address validity time (VALIDITY_TIME).
8.1. INTERVAL_TIME TLV ๐
An INTERVAL_TIME TLV is an Address Block TLV that defines the maximum time before this address, from the same originator, should be received again. This interval time MAY be specified to depend on the hop count from the originator. (This is useful if addresses are contained in messages sent with different hop limits, so receiving nodes at greater hop counts get an increased interval time.)
A protocol using this TLV and the same-named Message TLV MUST specify how to interpret the case when both are present (typically, the former overrides the latter for the addresses covered by the former) ๐
An INTERVAL_TIME TLV is an example of a Time TLV specified as in Section 5.
8.2. VALIDITY_TIME TLV ๐ง
A VALIDITY_TIME TLV is an Address Block TLV that defines the validity time of the addresses it's associated with. After this time, the receiving node MUST consider the addresses to no longer be valid (unless they're repeated in a later message). The validity time of an address MAY be specified to depend on the hop count from its originator. (This is useful if addresses are contained in messages sent with different hop limits, so receiving nodes at greater hop counts receive info less often and have to treat it as valid for longer.)
A protocol using this TLV and the same-named Message TLV MUST specify how to interpret the case when both are present (typically, the former overrides the latter for the addresses covered by the former).
A VALIDITY_TIME TLV is an example of a Time TLV specified as in Section 5.
9. IANA Considerations ๐๏ธ
This specification defines two Message TLV Types, which have been allocated from the "Assigned Message TLV Types" repository of [RFC5444] as specified in Table 1, and two Address Block TLV Types, which have been allocated from the "Assigned Address Block TLV Types" repository of [RFC5444] as specified in Table 2.
IANA has assigned the same numerical value to the Message TLV Type and the Address Block TLV Type with the same name ๐ธ
9.1. Expert Review: Evaluation Guidelines ๐
For the registries for TLV Type Extensions where an Expert Review is required, the designated expert SHOULD take the same general recommendations into consideration as are specified by [RFC5444] ๐
9.2. Message TLV Types ๐
okay so this table is the Message TLV type lineup, and it's giving organized ๐. Type 0 is INTERVAL_TIME, which tells you the maximum time before another message of the same type from the same originator should be received. Type 1 is VALIDITY_TIME, which is how long the info in a message stays valid after you receive it. Anything not assigned yet goes to Expert Review for extension values 1-223, and 224-255 is set aside for Experimental Use ๐งช.
+---------------+------+-----------+--------------------------------+
| Name | Type | Type | Description |
| | | Extension | |
+---------------+------+-----------+--------------------------------+
| INTERVAL_TIME | 0 | 0 | The maximum time before |
| | | | another message of the same |
| | | | type as this message from the |
| | | | same originator should be |
| | | | received |
| Unassigned | 0 | 1-223 | Expert Review |
| | | 224-255 | Experimental Use |
| VALIDITY_TIME | 1 | 0 | The time from receipt of the |
| | | | message during which the |
| | | | information contained in the |
| | | | message is to be considered |
| | | | valid |
| Unassigned | 1 | 1-223 | Expert Review |
| | | 224-255 | Experimental Use |
+---------------+------+-----------+--------------------------------+
Table 1
9.3. Address Block TLV Types ๐ธ
Same vibe, but for Address Block TLVs ๐ . INTERVAL_TIME (type 0, extension 0) is the max time before another message of the same type from the same originator and containing this address should be received. VALIDITY_TIME (type 1, extension 0) is the time from receipt of the address during which the info about that address is valid. The unassigned rows and the Expert Review and Experimental Use ranges are laid out exactly as shown below.
+---------------+------+-----------+--------------------------------+
| Name | Type | Type | Description |
| | | extension | |
+---------------+------+-----------+--------------------------------+
| INTERVAL_TIME | 0 | 0 | The maximum time before |
| | | | another message of the same |
| | | | type as this message from the |
| | | | same originator and containing |
| | | | this address should be |
| | | | received |
| Unassigned | 0 | 1-223 | Expert Review |
| | | 224-255 | Experimental Use |
| VALIDITY_TIME | 1 | 0 | The time from receipt of the |
| | | | address during which the |
| | | | information regarding this |
| | | | address is to be considered |
| | | | valid |
| Unassigned | 0 | 1-223 | Expert Review |
| | | 224-255 | Experimental Use |
+---------------+------+-----------+--------------------------------+
Table 2
10. Security Considerations ๐
okay this part is serious bestie, so read it carefully ๐ซถ. This doc specifies how to add TLVs (data structures) that carry timing info to packets and messages made with [RFC5444]. Specifically, you can attach validity durations and reporting intervals.
The main security threats are the general ones that apply to [RFC5444], and those are integrity and confidentiality problems. For integrity, if someone messes with a Time TLV, the info can end up with a wrong validity time or a wrong expected interval. That can cause the protocol to perform incorrectly ๐ฌ. Adding or changing timed info can also pile on work for the protocol, especially if the validity time is really short, and it can eat up storage, especially if the validity time is really long ๐พ.
To deal with all of this, the security suggestions in [RFC5444], about using authentication and encryption, are the right move ๐.
11. References ๐
11.1. Normative References
- [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
- [RFC5444] Clausen, T., Dearlove, C., Dean, J., and C. Adjih, "Generalized Mobile Ad Hoc Network (MANET) Packet/Message Format", RFC 5444, February 2009.
11.2. Informative References
- [RFC3626] Clausen, T. and P. Jacquet, "The Optimized Link State Routing Protocol", RFC 3626, October 2003.
Appendix A. Acknowledgements ๐ซถ
the authors want to give a big shoutout to Brian Adamson and Justin Dean (both NRL) and Ian Chakeres (Motorola) for their contributions ๐. They also thank Alan Cullen (BAE Systems) and Jari Arkko (Ericsson, Finland) for their careful reviews of this spec. Literally the best reviewers ๐ .
Authors' Addresses ๐ฆ
Thomas Heide Clausen
LIX, Ecole Polytechnique, France
Phone: +33 6 6058 9349
EMail: T.Clausen@computer.org
URI: http://www.ThomasClausen.org/
Christopher Dearlove
BAE Systems Advanced Technology Centre
Phone: +44 1245 242194
EMail: chris.dearlove@baesystems.com
URI: http://www.baesystems.com/
๐ฆ where this page comes from
- ietf: rfc5497 2009-03
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms