RFC 9034
Packet Delivery Deadline Time in the Routing Header for IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs)
๐ฌ RFC 9034: Packet Delivery Deadline Time in the Routing Header for IPv6 over 6LoWPANs ๐
okay bestie, this one is about giving packets a deadline ๐ญโฐ. The header info is:
- RFC number: 9034
- Title: Packet Delivery Deadline Time in the Routing Header for IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs)
- Authors: L. Thomas (C-DAC), S. Anamalamudi (SRM University-AP), S.V.R. Anand and M. Hegde (Indian Institute of Science), and C. Perkins (Lupin Lodge)
- Category: Standards Track, so it's an Internet Standards Track document ๐
- ISSN: 2070-1721
- Date: June 2021
- Obsoletes / Updates: the header doesn't list any, so this doc doesn't obsolete or update anything ๐ธ
Abstract โจ
this doc specs a brand new type for the 6LoWPAN routing header that carries the deadline time for data packets ๐ฐ๏ธ. it's built for constrained networks, so it's lowkey perfect for tiny devices. the deadline time helps with forwarding and scheduling decisions for time-critical machine-to-machine (M2M) apps running on internet-enabled devices inside time-synchronized networks ๐ค๐ . it also defines a way to represent those deadline time values in these networks ๐ฆ.
Status of This Memo
this is an Internet Standards Track document ๐.
it's a product of the Internet Engineering Task Force (IETF), so it represents the consensus of the IETF community ๐ซถ. it got public review and was approved for publication by the Internet Engineering Steering Group (IESG) โ . if you want more on Internet Standards, check out Section 2 of RFC 7841 ๐.
for info on the current status, errata, and how to give feedback, go to https://www.rfc-editor.org/info/rfc9034 ๐.
Copyright Notice
Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved. ยฉ๏ธ๐
this doc is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication. please actually read these, bestie, because they explain your rights and restrictions for this doc ๐. code components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they're provided without warranty as described in the Simplified BSD License ๐.
Table of Contents ๐ง
1. Introduction
2. Terminology
3. 6LoRHE Generic Format
4. Deadline-6LoRHE
5. Deadline-6LoRHE Format
6. Deadline-6LoRHE in Three Network Scenarios
6.1. Scenario 1: Endpoints in the Same DODAG (N1)
6.2. Scenario 2: Endpoints in Networks with Dissimilar L2
Technologies
6.3. Scenario 3: Packet Transmission across Different DODAGs (N1
to N2)
7. IANA Considerations
8. Synchronization Aspects
9. Security Considerations
10. References
10.1. Normative References
10.2. Informative References
Appendix A. Modular Arithmetic Considerations
Acknowledgments
Authors' Addresses
1. Introduction ๐ธ
Low-Power and Lossy Networks (LLNs) are likely to get deployed for real-time industrial apps that need end-to-end delay guarantees [RFC8578] ๐ญ. a Deterministic Network ("DetNet") usually needs some packets to reach their receivers within strict time bounds โฑ๏ธ. intermediate nodes use the deadline info to make the right forwarding and scheduling choices so they can hit those time bounds ๐ .
this doc specs a new type for the Elective 6LoWPAN Routing Header (6LoRHE), called Deadline-6LoRHE ๐. this way the deadline time (basically, the time of latest acceptable delivery) for data packets can be put inside the 6LoRHE โจ. [RFC8138] specs the 6LoWPAN Routing Header (6LoRH), compression schemes for RPL (Routing Protocol for Low-Power and Lossy Networks) source routing [RFC6554], header compression of RPL packet information [RFC6553], and IP-in-IP encapsulation ๐ฆ. this doc also covers how the deadline time is handled when packets go through time-synchronized networks that run in different time zones or use different reference clocks ๐. time-synchronization techniques themselves are outside the scope of this doc ๐. there are a bunch of standards for that, including IEEE 1588 [IEEE.1588.2008], IEEE 802.1AS [IEEE.802.1AS.2011], IEEE 802.15.4-2015 Time-Slotted Channel Hopping (TSCH) [IEEE.802.15.4], and more ๐ฐ๏ธ.
the Deadline-6LoRHE can be used in any time-synchronized 6LoWPAN network ๐ซถ. a 6TiSCH (IPv6 over the TSCH mode of IEEE 802.15.4) network is used to describe how the Deadline-6LoRHE gets implemented, but that doesn't stop it from being used in other scenarios besides 6TiSCH ๐ฆ. for example, there's growing interest in using 6LoWPAN over a Bluetooth Low Energy (BLE) mesh network [6LO-BLEMESH] in industrial IoT (Internet of Things) [IEEE-BLE-MESH] ๐ญ๐. the Bluetooth community is also exploring BLE mesh time synchronization ๐. there are cases under consideration in Wi-SUN too [PHY-SPEC] [Wi-SUN] ๐.
2. Terminology ๐
the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this doc are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here ๐ฅ. they only count as BCP 14 key words in all caps, so lowercase versions are just regular words, bestie ๐.
this doc uses the terminology defined in [RFC6550] and [RFC9030] ๐.
3. 6LoRHE Generic Format ๐ง
Note: this section is not normative and is included for convenience ๐ก. the generic header format of the 6LoRHE is specified in [RFC8138]. Figure 1 shows the 6LoRHE generic format ๐ .
0 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- ... -+
|1|0|1| Length | Type | Options |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- ... -+
<--- length --->
Figure 1: 6LoRHE Format
Length: the length of the 6LoRHE, in bytes, not counting the first 2 bytes ๐. this lets a node skip a 6LoRHE whose Type it doesn't recognize or support ๐.
Type (variable length): the type of the 6LoRHE (see Section 7) ๐ท๏ธ.
4. Deadline-6LoRHE ๐
the Deadline-6LoRHE (see Figure 3) is a 6LoRHE [RFC8138] that gives the Deadline Time (DT) for an IPv6 datagram in a compressed form ๐๏ธ. along with the DT, the header can include the Origination Time Delta (OTD) packet, which holds the time the packet got enqueued for transmission (written as a value to be subtracted from DT) ๐ฐ๏ธ. this lets you get a close estimate of the total delay a packet picked up ๐. the sender initializes the OTD field based on the current time at the outgoing network interface the packet gets forwarded through ๐ค. since the OTD is a delta, the OTD field's length (OTL) needs fewer bits than the DT field's length (DTL) ๐ง โจ.
the DT field has the deadline time for the packet, aka the time by which the app expects the packet to reach the receiver ๐ฏ.
packet_deadline_time = packet_origination_time + max_delay
to support delay-sensitive, deterministic apps, all nodes in the network should process the Deadline-6LoRHE ๐ . the DT and OTD packets are represented in time units set by a scaling parameter in the Routing Header ๐. the Network ASN (Absolute Slot Number) can be used as a time unit in a time-slotted synchronized network, like a 6TiSCH network where global time is kept in units of slot lengths at a certain resolution ๐ฐ.
the delay packets experience in the network is a useful metric for network diagnostics and performance monitoring ๐. whenever a packet crosses into a network that uses a different reference clock, the DT field gets updated so it still represents the same deadline time, just expressed with the reference clock of the interface into the new network ๐. the origination time is then the current time when the packet is transmitted into the new network, minus the delay the packet already experienced (called 'current_dly') ๐ซ . so inside the new network, the packet appears to have originated 'current_dly' time units earlier, relative to the new network's reference clock ๐ช.
new_network_origin_time = time_now_in_new_network - current_dly
the example below shows these calculations when a packet travels between three networks, each in a different time zone (TZ) ๐. 'x' can be 1, 2, or 3 ๐ข. say the deadline time measured in TZ1 is 1050, and the origination time is 50 ๐. the difference between TZ2 and TZ1 is 900, and the difference between TZ2 and TZ3 is 3600 โ. in the figure, OT is the origination time measured in the current time zone, and it equals DT - OTD, which is DT - 1000 ๐งฎ. Figure 2 uses these abbreviations:
- TxA: time of arrival of the packet in network 'x' ๐ฌ
- TxD: departure time of the packet from network 'x' ๐ซ
- dlyx: delay the packet experienced in the previous network(s) โณ
- TZx: the time zone of network 'x' ๐บ๏ธ
TZ1 TZ2 TZ3
T1A=50| | |
|---- dly1=50 | |
| \ | |
| \ | |
| \ T1D=100 |T2A=1000 |
| -------->|----- dly2=450 |
| | \ |
| | \ |
| | \ T2D=1400 | T3A=5000
| | ------------------->|---------->
| | |
v v v
dly0 = 0 dly1 = T1D-OT1 dly2 = T2D-OT2
= 100-50 = 1400 - 950
= 50 = 450
OT1 = T1A-dly0 OT2 = T2A-dly1 OT3 = T3A-dly2
= 50 = 1000-50 = 5000 - 450
= 950 = 4550
Figure 2: Deadline Time Update Example
there are a bunch of ways a packet can get delayed, including queuing delay, Media Access Control (MAC) layer contention delay, serialization delay, and propagation delay ๐ข. sometimes processing delays happen too ๐ ๏ธ. for the purpose of figuring out whether the deadline has already passed, these different delays are not told apart ๐คทโโ๏ธโจ.
to be continued, bestie! ๐ part 2 picks up with Section 5, the Deadline-6LoRHE Format ๐๐ฆ
5. Deadline-6LoRHE Format โจ
okay bestie, this is where the Deadline-6LoRHE gets its outfit ๐ Here's the layout, and yes, the bit numbers matter so don't skip this figure ๐
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1|0|1| Length | 6LoRH Type |D| TU| DTL | OTL | BinaryPt |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| DT (variable length) | OTD(variable length)(optional)|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 3: Deadline-6LoRHE Format
Here's the field-by-field breakdown, no cap ๐ง
- Length (5 bits):
Lengthis the total length of the Deadline-6LoRHE Type, measured in octets. Lowkey the most important number to get right ๐ธ - 6LoRH Type:
7(see Section 7). ๐ - D flag (1 bit): The
Dflag is set by the sender, and it decides what happens when a 6LoWPAN Router (6LR) notices the deadline time has already passed. ๐ฆ- If
Dis1, the 6LR MUST drop the packet once the deadline time has elapsed. Bye bye packet ๐ - If
Dis0, the packet MAY be forwarded on an exception basis, but only if the forwarding node is NOT in a situation of constrained resource, and only if there are reasons to suspect that downstream nodes might find it useful (delay measurements, interpolations, etc.). It's giving "maybe, if you've got the room" ๐ซถ
- If
- TU (2 bits): This tells you the time units for the
DTandOTDfields. Both fields use the same time units and precision. The encodings are:00: time represented in seconds and fractional seconds ๐ฐ๏ธ01: Reserved10: Network ASN โญ11: Reserved
- DTL (4 bits): The length of the
DTfield, as an unsigned 4-bit integer. It encodes the field length in hex digits, minus one. Yes, minus one, don't ask me why, it's the vibe ๐ - OTL (3 bits): The length of the
OTDfield, as an unsigned 3-bit integer. It encodes the field length in hex digits. IfOTL == 0, theOTDfield is not present. The value ofOTLMUST NOT exceed the value ofDTLplus one. Main character rule: no going over the limit ๐- For example,
DTL = 0b0000means theDTfield in the 6LoRHE is 1 hex digit (4 bits) long. AndOTL = 0b111means theOTDfield is 7 hex digits (28 bits) long. ๐
- For example,
- BinaryPt (6 bits): If it's zero, the number of bits for the integer part of the
DTequals the number of bits for its fractional part. If it's nonzero,BinaryPtis a (2's complement) signed integer that sets where the binary point sits inside theDTvalue. That letsBinaryPtrange over[-32,31]. ๐- If
BinaryPtis positive, the integer part ofDTgets that many extra bits, and the fractional part gets correspondingly fewer. That boosts the range ofDT๐ - If
BinaryPtis negative, the integer part ofDTloses that many bits, and the fractional part gains them. That boosts the precision of the fractional seconds inDT๐ฌ
- If
- DT Value (4..64 bits): An unsigned integer of
DTL+1hex digits, giving theDTvalue. โฐ - OTD Value (4..28 bits): If it's present, this is an unsigned integer of
OTLhex digits, giving the origination time as a negative offset from theDTvalue. ๐๏ธ
Whenever a sender starts up the IP datagram, it includes the Deadline-6LoRHE along with its other 6LoRH information. For what the time-synchronization requirements between sender and receiver look like, check out Section 8 ๐ซถ
Next up, the compressed time representation. For the chosen time unit, the originating application figures out how many time bits it needs to show the gap between the moment the packet launches and the deadline time, fractional units included. Call that number N_bits. It sets DTL like this: DTL = ((N_bits - 1) / 4) โจ
The bits picked by DTL can count any number of fractional time units inside the range of interest set by DT and OT. Let's call that count Epoch_Range(DTL), where Epoch_Range is a function of DTL: Epoch_Range(DTL) = 2^(4*(DTL+1)) ๐ง
Every point in time between OT and DT gets written as a time unit plus a fractional time unit. In this section, that combo is called a rational time unit (RTU). 1 RTU is the smallest fractional time you can show between two points in the epoch (so, inside the range of interest). ๐
DT - OT can't go past 2^(4*(DTL+1)) == 16^(DTL+1). A low DTL means a tiny Epoch_Range. If DTL = 0, you only get 16 RTUs inside the Epoch_Range (Epoch_Range(DTL) = 16^1) for any TU. The values you can show in the current epoch sit in the range [0, (Epoch_Range(DTL) - 1)]. ๐
If wraparound doesn't happen, OT is represented by (OT mod Epoch_Range), and DT is represented by (DT mod Epoch_Range). All the arithmetic is done modulo Epoch_Range(DTL), which means DT - OT always comes out positive ๐
Now for fine-grained control over the deadline time. The DT and OTD fields use fractional seconds. A binary point decides how many bits go to the fractional part, so every fraction has to be a negative power of 2. Each point of time between OT and DT is then a time unit (seconds or ASNs) plus a fractional time unit. ๐ฆ
Let OT_abs, DT_abs, and CT_abs be the true (absolute) values of OT, DT, and the current time, all on the synchronized timelines. Let N be the number of bits used for the integer parts of OT_abs, DT_abs, and CT_abs:
N = {4*(DTL+1)/2} + BinaryPt
The originating node has to pick a segment size (2^N) so that DT_abs - OT_abs < 2^N, and so that intermediate network nodes can tell whether CT_abs > DT_abs. ๐ฅ
Once you have N, the DT value in the deadline-time format is DT = (DT_abs mod 2^N). DT is usually written as a positive value, even though negative modular values make sense too. Also, OT = OT_abs mod 2^N and CT = CT_abs mod 2^N, and both OT and CT are treated as non-negative. ๐ธ
When the originating node launches the packet, CT_abs == OT_abs and CT == OT. For a given N, downstream nodes can only tell whether the deadline has expired (that is, whether DT_abs > CT_abs) if this holds:
Assumption 1: DT_abs - OT_abs < 2^N.
If that breaks, the ambiguity in the modulus math that produces OT and DT will cause failure, because you can't measure time differences bigger than 2^N using numbers from a time segment shorter than 2^N. Yikes ๐ญ
When Assumption 1 holds, downstream nodes have to check whether their current time is later than DT. But DT has to be inferred from the DT in the 6LoRHE, which is a number less than 2^N. That inference can't be counted on to work reliably unless Assumption 1 is valid, which means the originating node has to be careful to pick proper values for DTL and BinaryPt. Choose wisely, bestie ๐
OT isn't always provided in the 6loRHE, so there's a possible ambiguity. When DT = CT, the deadline time is expiring and the packet should be dropped, no debate. But what if an intermediate node measures CT = DT+1? Did the packet launch just a short time before it arrived at that node, or did the current time wrap around so that CT_abs - OT_abs > 2^N? That's the plot twist ๐ฑ
To solve this, a safety margin has to be provided, on top of requiring DT_abs - OT_abs < 2^N. The size of this margin is proportional to 2^N and is set by a new parameter called the "SAFETY_FACTOR". So, for safety, the originating node MUST further ensure that (DT_abs - OT_abs) < 2^N*(1-SAFETY_FACTOR). Safety first, always ๐ก๏ธ
Each intermediate node that receives a packet with the Deadline-6LoRHE must determine whether ((CT - DT) mod 2^N) > SAFETY_FACTOR*2^N. If that test condition is not satisfied, the deadline time has expired. Appendix A has more explanation about the test condition if you want the deep dive ๐ง All nodes that receive a packet with a Deadline-6LoRHE included MUST use the same value for the SAFETY_FACTOR. No mixing and matching, periodt ๐
The SAFETY_FACTOR is chosen so that a packet with the Deadline-6LoRHE included gets tested against the current time at least once during every subinterval of length SAFETY_FACTOR*2^N. That way, it's guaranteed that the packet gets tested often enough to be dropped whenever CT_abs > DT_abs. The value of SAFETY_FACTOR is specified in this document to be 20% โจ
Here's an example to make it click ๐
Example: Consider a 6TiSCH network with time-slot length of 10 ms.
Let the time units be ASNs (TU == (binary)0b10). Let the current
ASN when the packet is originated be 54400, and the maximum
allowable delay (max_delay) for the packet delivery be 1 second
from the packet origination, then:
deadline_time = packet_origination_time + max_delay
= 0xD480 + 0x64 (Network ASNs)
= 0xD4E4 (Network ASNs)
Then, the Deadline-6LoRHE encoding with nonzero OTL is:
DTL = 3, OTL = 2, TU = 0b10, BinaryPt = 8, DT = 0xD4E4,
OTD = 0x64
6. Deadline-6LoRHE in Three Network Scenarios ๐ง
okay so in this section we look at how the Deadline-6LoRHE works in three network scenarios. Let's start with the first one, a constrained time-synchronized LLN that has two subnets, N1 and N2. They're connected through 6LoWPAN Border Routers (6LBRs) [RFC8929] and run on different reference clock times, T1 and T2. Picture it like this ๐
+-------------------+
| Time-Synchronized |
| Network |
+---------+---------+
|
|
|
+--------------+--------------+
| |
+-----+ +-----+
| | Backbone | | Backbone
o | | router | | router
+-----+ +-----+
o o o
o o o o o o o o o
o LLN o o LLN o o
o o o o o o o o o
6LoWPAN Network (subnet N1) 6LoWPAN Network (subnet N2)
Figure 4: Intra-Network Time Zone Scenario
6.1. Scenario 1: Endpoints in the Same DODAG (N1) ๐ฆ
Okay so Scenario 1 (see Figure 5) is when the Sender 'S' has an IP datagram to send to a Receiver 'R' inside the same DODAG (Destination-Oriented Directed Acyclic Graph) ๐ธ. For the route segment from the sender to the 6LBR, the sender includes a Deadline-6LoRHE by encoding the deadline time contained in the packet โฐ. After that, each 6LR does hop-by-hop routing to forward the packet toward the 6LBR. Once the 6LBR gets the IP datagram, it sends the packet downstream toward 'R' ๐.
In the case of a network running in RPL non-storing mode, the 6LBR generates an IPv6-in-IPv6 encapsulated packet when sending the packet downwards to the receiver [RFC9008] ๐ง. The 6LBR copies the Deadline-6LoRHE from the sender-originated IP header to the outer IP header. The Deadline-6LoRHE contained in the inner IP header is removed โ๏ธ.
+-------+
^ | 6LBR | |
| | | |
| +-------+ |
Upward | / /| \ | Downward
routing | (F) / | \ | routing
| / \ (C) | (D) |
| / \ | | / |\ |
| (A) (B) : (E) : R |
| /|\ | \ / \ |
| S : : : : : : v
Figure 5: Endpoints within the Same DODAG (Subnet N1)
At the tunnel endpoint of the encapsulation, the Deadline-6LoRHE is copied back from the outer header to inner header, and the inner IP packet is delivered to 'R' ๐.
6.2. Scenario 2: Endpoints in Networks with Dissimilar L2 Technologies โจ
In Scenario 2 (see Figure 6), the Sender 'S' (belonging to DODAG 1) has an IP datagram to be routed to a Receiver 'R' over a time-synchronized IPv6 network ๐ฐ๏ธ. For the route segment from 'S' to 6LBR, 'S' includes a Deadline-6LoRHE. Then each 6LR does hop-by-hop routing to forward the packet toward the 6LBR. Once the deadline time information reaches the 6LBR, the packet gets encoded according to the mechanism prescribed in the other time-synchronized network, which is depicted as "Time-Synchronized Network" in Figure 6 ๐ฆ. The specific data encapsulation mechanisms followed in the new network are beyond the scope of this document ๐.
+----------------+
| Time- |
| Synchronized |------R
| Network |
+----------------+
|
|
----------+-----------
^ |
| +---+---+
| | 6LBR |
Upward | | |
routing | +------++
| (F)/ /| \
| / \ / | \
| / \ (C) | (D)
| (A) (B) | | / |\
| /|\ |\ : (E) : :
| S : : : : / \
: :
Figure 6: Packet Transmission in Dissimilar L2 Technologies or
Internet
For instance, the IP datagram could be routed to another time-synchronized, deterministic network using the mechanism specified in In-situ Operations, Administration, and Maintenance (IOAM) [IOAM-DATA]. After that, the deadline time would be updated according to the measurement of the current time in the new network ๐.
6.3. Scenario 3: Packet Transmission across Different DODAGs (N1 to N2) ๐
Let's look at the scenario in Figure 7, where the Sender 'S' (belonging to DODAG 1) has an IP datagram to send to Receiver 'R', who belongs to another DODAG (DODAG 2) ๐ฏ. This scenario can be broken down into a combination of Scenarios 1 and 2, so it's giving building blocks ๐งฑ. For the route segment from 'S' to 6LBR1, 'S' includes the Deadline-6LoRHE. Then each 6LR does hop-by-hop operations to forward the packet toward 6LBR1. Once the IP datagram reaches 6LBR1 of DODAG1, 6LBR1 applies the same rule as described in Scenario 2 while routing the packet to 6LBR2 over a (likely) time-synchronized wired backhaul. The wired side of 6LBR2 can be mapped to the receiver of Scenario 2. Once the packet reaches 6LBR2, it updates the Deadline-6LoRHE by adding or subtracting the difference of time of DODAG2 and sends the packet downstream toward 'R' ๐.
Time-Synchronized Network
-+---------------------------+-
| |
DODAG1 +---+---+ +---+---+ DODAG2
| 6LBR1 | | 6LBR2 |
| | | |
+-------+ +-------+
(F)/ /| \ (F)/ /| \
/ \ / | \ / \ / | \
/ \ (C) | (D) / \ (C) | (D)
(A) (B) | | / |\ (A) (B) | | |\
/|\ |\ : (E) : : /|\ |\ : (E) : :
S : : : : / \ : : : : : / \
: : : R
Network N1, time zone T1 Network N2, time zone T2
Figure 7: Packet Transmission in Different DODAGs (N1 to N2)
Let's do an example ๐. Picture a 6TiSCH network where S in DODAG1 generates the packet at ASN 20000 to R in DODAG2. Let the maximum allowable delay be 1 second โณ. The time-slot length in DODAG1 and DODAG2 is assumed to be 10 ms. Once the deadline time is encoded in Deadline-6LoRHE, the packet is forwarded to 6LBR1 of DODAG1. Suppose the packet reaches 6LBR1 of DODAG1 at ASN 20030. Here's the math:
current_time = ASN at 6LBR * slot_length_value
remaining_time = deadline_time - current_time
= ((packet_origination_time + max_delay) - current time)
= (20000 + 100) - 20030
= 30 (in Network ASNs)
= 30 * 10^3 milliseconds
Once the deadline time information reaches 6LBR2, the packet gets encoded according to the mechanism prescribed in the other time-synchronized network ๐.
7. IANA Considerations ๐
This document defines a new Elective 6LoWPAN Routing Header Type, and IANA has assigned the value 7 from the 6LoWPAN Dispatch Page 1 number space for this purpose ๐.
+=======+=================+===========+
| Value | Description | Reference |
+=======+=================+===========+
| 7 | Deadline-6LoRHE | RFC 9034 |
+-------+-----------------+-----------+
Table 1: Entry in the "Elective
6LoWPAN Routing Header Type"
Registry
8. Synchronization Aspects โฑ๏ธ
The document supports time representation of the deadline and origination times carried in the packets traversing networks of different time zones, which have different time-synchronization mechanisms ๐. For instance, in a 6TiSCH network where the time is maintained as ASN time slots, the time synchronization is achieved through beaconing among the nodes, as described in [RFC7554] ๐. There could be 6lo networks that employ NTP, where the nodes are synchronized with an external reference clock from an NTP server โ. The specification of the time-synchronization method that needs to be followed by a network is beyond the scope of the document ๐.
The number of hex digits chosen to represent DT, and the portion of that field allocated to represent the integer number of seconds, determines the meaning of t_0, i.e., the meaning of DT == 0 in the chosen representation ๐. If DTL == 0, then there are only 4 bits that can be used to count the time units, so DT == 0 can never be more than 16 time units (or fractional time units) in the past. This then requires that the time synchronization between sender and receiver be tighter than 16 units ๐ฌ. If the binary point were moved so that all the bits were used for fractional time units (e.g., fractional seconds or fractional ASNs), the time-synchronization requirement would be correspondingly tighter ๐.
A 4-bit field for DT allows up to 16 hex digits, which is 64 bits ๐ . That is enough to represent the NTP 64-bit timestamp format [RFC5905], which is more than enough for the purposes of establishing deadline times ๐. Unless the binary point is moved, this is enough to represent time since year 1900 ๐๏ธ.
For example, suppose that DTL = 0b0000 and the DT bits are split evenly. Then we can count up to 3.75 seconds by quarter-seconds ๐ญ.
If DTL = 3 and the DT bits are again split evenly, then we can count up to 256 seconds (in steps of 1/256 of a second) ๐.
In all cases, t_0 is defined as specified in Section 5 ๐.
t_0 = [current_time - (current_time mod (2^(4*(DTL+1))))]
regardless of the choice of TU ๐ซ.
For TU = 0b00, the time units are seconds. With DTL == 15, and BinaryPt == 0, the epoch is (by default) January 1, 1900, at 00:00 UTC. The resolution is then 2^-32 seconds, which is the maximum possible. This time format wraps around every 2^32 seconds, which is roughly 136 years ๐ฐ๏ธ.
For TU = 0b10, the time units are ASNs. The start time is relative, and it's updated by a mechanism that is out of scope for this document ๐. With 10 ms slots, DTL = 15, and BinaryPt == 0, it would take over a year for the ASN to wrap around. Typically, the number of hex digits allocated for TU = 0b10 would be less than 15 ๐ฅน.
9. Security Considerations โจ
okay bestie, the security section is SERIOUS and I'm here for it ๐๐ Honestly, the security stuff for this one is mostly "go read the security sections of the RFCs we're built on," because 6LoRHE doesn't invent a brand-new threat. Like, the compressed format is logically the same as the full inline format, so it does not open a new door for attackers compared to [RFC6550], [RFC6553], and [RFC6554]. Lowkey iconic that it just inherits everything. ๐ซถ
The security considerations of [RFC4944] (Section 13), [RFC6282] (Section 6), and [RFC6553] (Section 5) apply. โจ
Now the vibe check: this stuff is designed for controlled operational environments, like industrial process control and automation ๐ญ. Because deadline info could be misused to launch a Denial of Service (DoS) attack ๐ญ, the deadline time mechanism only works properly if the network resources are provisioned and managed. That means setting aside resources for traffic flows with deadlines, doing performance monitoring, and enforcing admission control policy. This provisioning can be centralized or distributed, totally your call ๐. For example, tracks in a 6TiSCH network could be set up by a centralized Path Computation Element (PCE), as described in the 6TiSCH architecture [RFC9030]. ๐ธ
The security considerations of DetNet architecture [RFC8655] (Section 5) mostly apply here too ๐ฆ. To secure the request and control of resources allocated for tracks, you can use authentication and authorization for each device and for the network controller devices. With distributed control protocols, security is expected to come from the security properties of the protocols in use. ๐
Also, identifying deadline-bearing flows on a per-flow basis may give attackers extra information about the data flows, compared to networks that don't do per-flow identification ๐. The security implications of disclosing that extra information deserve consideration when you implement this deadline specification. Not me overthinking this, but it's important! ๐
Last but DEFINITELY not least: because the protocol needs precise time synchronization, the accuracy, availability, and integrity of time synchronization is of critical importance ๐จโฐ. There's an extensive discussion of this topic in [RFC7384]. Go read it, periodt. ๐
10. References โญ
10.1. Normative References ๐
- [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <https://www.rfc-editor.org/info/rfc2119>.
- [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, "Transmission of IPv6 Packets over IEEE 802.15.4 Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007, <https://www.rfc-editor.org/info/rfc4944>.
- [RFC5905] Mills, D., Martin, J., Ed., Burbank, J., and W. Kasch, "Network Time Protocol Version 4: Protocol and Algorithms Specification", RFC 5905, DOI 10.17487/RFC5905, June 2010, <https://www.rfc-editor.org/info/rfc5905>.
- [RFC6282] Hui, J., Ed. and P. Thubert, "Compression Format for IPv6 Datagrams over IEEE 802.15.4-Based Networks", RFC 6282, DOI 10.17487/RFC6282, September 2011, <https://www.rfc-editor.org/info/rfc6282>.
- [RFC6550] Winter, T., Ed., Thubert, P., Ed., Brandt, A., Hui, J., Kelsey, R., Levis, P., Pister, K., Struik, R., Vasseur, JP., and R. Alexander, "RPL: IPv6 Routing Protocol for Low-Power and Lossy Networks", RFC 6550, DOI 10.17487/RFC6550, March 2012, <https://www.rfc-editor.org/info/rfc6550>.
- [RFC6553] Hui, J. and JP. Vasseur, "The Routing Protocol for Low-Power and Lossy Networks (RPL) Option for Carrying RPL Information in Data-Plane Datagrams", RFC 6553, DOI 10.17487/RFC6553, March 2012, <https://www.rfc-editor.org/info/rfc6553>.
- [RFC6554] Hui, J., Vasseur, JP., Culler, D., and V. Manral, "An IPv6 Routing Header for Source Routes with the Routing Protocol for Low-Power and Lossy Networks (RPL)", RFC 6554, DOI 10.17487/RFC6554, March 2012, <https://www.rfc-editor.org/info/rfc6554>.
- [RFC7384] Mizrahi, T., "Security Requirements of Time Protocols in Packet Switched Networks", RFC 7384, DOI 10.17487/RFC7384, October 2014, <https://www.rfc-editor.org/info/rfc7384>.
- [RFC7554] Watteyne, T., Ed., Palattella, M., and L. Grieco, "Using IEEE 802.15.4e Time-Slotted Channel Hopping (TSCH) in the Internet of Things (IoT): Problem Statement", RFC 7554, DOI 10.17487/RFC7554, May 2015, <https://www.rfc-editor.org/info/rfc7554>.
- [RFC8138] Thubert, P., Ed., Bormann, C., Toutain, L., and R. Cragie, "IPv6 over Low-Power Wireless Personal Area Network (6LoWPAN) Routing Header", RFC 8138, DOI 10.17487/RFC8138, April 2017, <https://www.rfc-editor.org/info/rfc8138>.
- [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <https://www.rfc-editor.org/info/rfc8174>.
- [RFC8655] Finn, N., Thubert, P., Varga, B., and J. Farkas, "Deterministic Networking Architecture", RFC 8655, DOI 10.17487/RFC8655, October 2019, <https://www.rfc-editor.org/info/rfc8655>.
- [RFC9030] Thubert, P., Ed., "An Architecture for IPv6 over the Time-Slotted Channel Hopping Mode of IEEE 802.15.4 (6TiSCH)", RFC 9030, DOI 10.17487/RFC9030, May 2021, <https://www.rfc-editor.org/info/rfc9030>.
10.2. Informative References ๐
- [6LO-BLEMESH] Gomez, C., Darroudi, S. M., Savolainen, T., and M. Spoerk, "IPv6 Mesh over BLUETOOTH(R) Low Energy using IPSP", Work in Progress, Internet-Draft, draft-ietf-6lo-blemesh-10, 22 April 2021, <https://tools.ietf.org/html/draft-ietf-6lo-blemesh-10>.
- [IEEE-BLE-MESH] Leonardi, L., Patti, G., and L. Lo Bello, "Multi-Hop Real-Time Communications Over Bluetooth Low Energy Industrial Wireless Mesh Networks", IEEE Access, Vol 6, pp. 26505-26519, DOI 10.1109/ACCESS.2018.2834479, May 2018, <https://doi.org/10.1109/ACCESS.2018.2834479>.
- [IEEE.1588.2008] IEEE, "IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems", DOI 10.1109/IEEESTD.2008.4579760, July 2008, <https://doi.org/10.1109/IEEESTD.2008.4579760>.
- [IEEE.802.15.4] IEEE, "IEEE Standard for Low-Rate Wireless Networks", IEEE Standard 802.15.4-2015, DOI 10.1109/IEEESTD.2016.7460875, April 2016, <https://ieeexplore.ieee.org/document/7460875>.
- [IEEE.802.1AS.2011] IEEE, "IEEE Standard for Local and Metropolitan Area Networks - Timing and Synchronization for Time-Sensitive Applications in Bridged Local Area Networks", IEEE Std 802.1AS-2011, DOI 10.1109/IEEESTD.2011.5741898, March 2011, <https://doi.org/10.1109/IEEESTD.2011.5741898>.
- [IOAM-DATA] Brockners, F., Ed., Bhandari, S., Ed., and T. Mizrahi, Ed., "Data Fields for In-situ OAM", Work in Progress, Internet-Draft, draft-ietf-ippm-ioam-data-12, 21 February 2021, <https://tools.ietf.org/html/draft-ietf-ippm-ioam-data-12>.
- [PHY-SPEC] Wi-SUN Alliance, "Wi-SUN PHY Specification V1.0", March 2016, <http://wi-sun.org>.
- [RFC8578] Grossman, E., Ed., "Deterministic Networking Use Cases", RFC 8578, DOI 10.17487/RFC8578, May 2019, <https://www.rfc-editor.org/info/rfc8578>.
- [RFC8929] Thubert, P., Ed., Perkins, C.E., and E. Levy-Abegnoli, "IPv6 Backbone Router", RFC 8929, DOI 10.17487/RFC8929, November 2020, <https://www.rfc-editor.org/info/rfc8929>.
- [RFC9008] Robles, M.I., Richardson, M., and P. Thubert, "Using RPI Option Type, Routing Header for Source Routes, and IPv6-in-IPv6 Encapsulation in the RPL Data Plane", RFC 9008, DOI 10.17487/RFC9008, April 2021, <https://www.rfc-editor.org/info/rfc9008>.
- [Wi-SUN] Harada, H., Mizutani, K., Fujiwara, J., Mochizuki, K., Obata, K., and R. Okumura, "IEEE 802.15.4g Based Wi-SUN Communication Systems", IEICE Transactions on Communications, Volume E100.B, Issue 7, pp. 1032-1043, DOI 10.1587/transcom.2016SCI0002, January 2017, <https://doi.org/10.1587/transcom.2016SCI0002>.
Appendix A. Modular Arithmetic Considerations ๐งฎโจ
okay bestie, this appendix is where the timing math gets so deep, and I'm obsessed. ๐ญ๐ Let's go through it together.
Graphically, one might visualize the timeline as follows: ๐ฆ
OT_abs CT_abs DT_abs
-------|-------------|-------------|------------------>
Figure 8: Absolute Timeline Representation
In Figure 8, the value of CT_abs is envisioned as traveling to the right as time progresses, getting farther away from OT_abs and getting closer to DT_abs. ๐๐ The timeline is considered to be subdivided into time subintervals [i,j] starting and ending at absolute times equal to k*(2^N), for integer values of k. Let I_k = k*(2^N) and I_(k+1) = (k+1)*2^N. Intervals starting at I_k and I_(k+1) may occur at various placements in the above timeline. Even though OT_abs is _always_ less than DT_abs, it could be that DT < OT because of the way that DT and OT are represented within the range [0, 2^N), and similarly for CT_abs and CT compared to OT and DT. ๐ wild, right? the wrapping is literally the whole plot. ๐
Representing the above situation in time segments of length 2^N (and values OT, CT, DT) results in several cases where the deadline time has not elapsed: ๐ธ
- OT < CT < DT (e.g., I_k < OT_abs < CT_abs < DT_abs < I_(k+1) )
- DT < OT < CT (e.g., I_k < OT_abs < CT_abs < I_(k+1) < DT_abs )
- CT < DT < OT (e.g., I_k < OT_abs < I_(k+1) < CT_abs < DT_abs )
In the following cases, the deadline time has elapsed and the packet should be dropped. ๐ no thank you, bye packet.
- DT < CT < OT
- OT < DT < CT
- CT < OT < DT
Again in Figure 8, consider CT_abs as time moving away from OT_abs and towards DT_abs. For times CT_abs before the expiration of the deadline time, we also have CT_abs - OT_abs == CT - OT mod 2^N and similarly for DT_abs - CT_abs. โจ
As time proceeds, DT_abs - CT_abs gets smaller. When the deadline time expires, DT_abs - CT_abs begins to grow negative. A proper selection for SAFETY_FACTOR allows it to go _slightly negative_ but for an intermediate point to _detect_ that it has gone negative. Note that in modular arithmetic, "slightly negative" means _exactly_ the same as "almost as large as the modulus (i.e., 2^N)". ๐คฏ Now consider the test condition ((CT - DT) mod 2^N) > SAFETY_FACTOR*2^N.
(DT_abs - OT_abs) < 2^N*(1-SAFETY_FACTOR) satisfies the test condition when CT_abs == OT_abs (i.e., when the packet is launched). In modular arithmetic, 2^N*(1-SAFETY_FACTOR) == 2^N - 2^N*SAFETY_FACTOR == -2^N*(SAFETY_FACTOR). Then DT_abs - OT_abs < -2^N*(1-SAFETY_FACTOR). Inverting the inequality, OT_abs - DT_abs > 2^N*(1-SAFETY_FACTOR), and thus at launch CT_abs - DT_abs > 2^N*(1-SAFETY_FACTOR). ๐ง ๐ okay this part is a little spicy, but the vibes are that at launch you're safely on the good side.
As CT_abs grows larger, CT_abs - DT_abs gets LARGER in (non-negative) modular arithmetic until the time at which CT_ABS == DT_ABS, and suddenly CT_ABS - DT_abs becomes zero. Also suddenly, the test condition is no longer fulfilled. ๐ฑ๐
As CT_abs grows still larger, CT_abs > DT_abs, and we need to detect this condition as soon as possible. Requiring the SAFETY_FACTOR enables this detection until CT_abs exceeds DT_abs by an amount equal to SAFETY_FACTOR*2^N. ๐ฏ๐ซถ
A note about "inverting the inequality". Observe that a < b implies that -a > -b on the real number line. Also, (a - b) == -(b - a). These facts hold also for modular arithmetic. ๐๐
During the times prior to the expiration of the deadline, for Safe = 2^N*SAFETY_FACTOR we have: ๐
(DT_abs - 2^N) < OT_abs < CT_abs < DT_abs < DT_abs+Safe
Naturally, DT_abs - 2^N == DT_abs mod 2^N == DT. ๐ง
Again considering Figure 8, it is easy to see that {CT_abs - (DT_abs - 2^N)} gets larger and larger until the time at which CT_abs = DT_abs, which is the first time at which CT - DT == 0 mod 2^N. As CT_abs increases past the deadline time, 0 < CT_abs - DT_abs < Safe. In this range, any intermediate node can detect that the deadline has expired. ๐ As CT_abs increases past DT_abs+Safe, it is no longer possible for an intermediate node to determine with certainty whether or not the deadline time has expired. These statements also apply when reduced to modular arithmetic in the modulus 2^N. ๐ฅ
In particular, the test condition no longer allows detection of deadline expiration when the current time becomes later than (DT_abs+Safe). In order to maintain correctness even for packets that are forwarded after expiration (i.e., the 'D' flag), N has to be chosen to be so large that the test condition will not fail -- i.e., that in all scenarios of interest, the packet will be dropped before the current time becomes equal to DT_abs+2^N*SAFETY_FACTOR. ๐ โ ๏ธ this is the part where you really don't want to mess up the sizing, bestie.
Acknowledgments ๐ซถ๐
The authors thank Pascal Thubert for suggesting the idea and encouraging the work. Thanks to Shwetha Bhandari's suggestions, which were instrumental in extending the timing information to heterogeneous networks. The authors acknowledge the 6TiSCH WG members for their inputs on the mailing list. Special thanks to Jerry Daniel, Dan Frost (Routing Directorate), Charlie Kaufman (Security Directorate), Seema Kumar, Tal Mizrahi, Avinash Mohan, Shalu Rajendran, Anita Varghese, and Dale Worley (General Area Review Team (Gen-ART) review) for their support and valuable feedback. ๐ the whole squad got a shoutout, iconic.
Authors' Addresses ๐
Lijo Thomas Centre for Development of Advanced Computing Vellayambalam Trivandrum 695033 India
Email: lijo@cdac.in
Satish Anamalamudi SRM University-AP Amaravati Campus Amaravati, Andhra Pradesh 522 502 India
Email: satishnaidu80@gmail.com
S.V.R. Anand Indian Institute of Science Bangalore 560012 India
Email: anandsvr@iisc.ac.in
Malati Hegde Indian Institute of Science Bangalore 560012 India
Email: malati@iisc.ac.in
Charles E. Perkins Lupin Lodge 20600 Aldercroft Heights Rd. Los Gatos, CA 95033 United States of America
Email: charliep@computer.org
that's the whole thing, bestie! the squad that wrote this is literally legends ๐๐โจ
๐ฆ where this page comes from
- ietf: rfc9034 2021-06
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms