A PLC node distinguishes between an IPv6 PDU and a non-IPv6 PDU based on the equivalent of an Ethertype in a Layer 2 PLC PDU. [
RFC 7973] defines an Ethertype of "A0ED" for LoWPAN encapsulation, and this information can be carried in the IE field in the MAC header of [
IEEE_1901.2] or [
ITU-T_G.9903]. And regarding [
IEEE_1901.1], the IP packet type has been defined with the corresponding MAC Service Data Unit (MSDU) type value 49. And the 4-bit Internet Protocol version number in the IP header helps to distinguish between an IPv4 PDU and an IPv6 PDU.
6LoWPAN and 6lo standards, as described in [
RFC 4944], [
RFC 6282], [
RFC 6775], and [
RFC 8505], provide useful functionality, including link-local IPv6 addresses, stateless address autoconfiguration, neighbor discovery, header compression, fragmentation, and reassembly. However, due to the different characteristics of the PLC media, the 6LoWPAN adaptation layer, as it is, cannot perfectly fulfill the requirements of PLC environments. These considerations suggest the need for a dedicated adaptation layer for PLC, which is detailed in the following subsections.
To obtain an IPv6 Interface Identifier (IID), a PLC device performs stateless address autoconfiguration [
RFC 4944]. The autoconfiguration can be based on either a long or short link-layer address.
The IID can be based on the device's 48-bit MAC address or its EUI-64 identifier [
EUI-64]. A 48-bit MAC address
MUST first be extended to a 64-bit IID by inserting 0xFFFE at the fourth and fifth octets as specified in [
RFC 2464]. The IPv6 IID is derived from the 64-bit IID by inverting the U/L (Universal/Local) bit [
RFC 4291].
For IEEE 1901.2 and ITU-T G.9903, a 48-bit "pseudo-address" is formed by the 16-bit PAN ID, 16 zero bits, and the 16-bit short address as follows:
16_bit_PAN:0000:16_bit_short_address
Then, the 64-bit IID
MUST be derived by inserting the 16-bit 0xFFFE into as follows:
16_bit_PAN:00FF:FE00:16_bit_short_address
For the 12-bit short addresses used by IEEE 1901.1, the 48-bit pseudo-address is formed by a 24-bit NID (Network Identifier, YYYYYY), 12 zero bits, and a 12-bit TEI (Terminal Equipment Identifier, XXX) as follows:
YYYY:YY00:0XXX
The 64-bit IID
MUST be derived by inserting the 16-bit 0xFFFE into this 48-bit pseudo-address as follows:
YYYY:YYFF:FE00:0XXX
As investigated in [
RFC 7136], aside from the method discussed in [
RFC 4291], other IID-generation methods defined by the IETF do not imply any additional semantics for the Universal/Local (U/L) bit (bit 6) and the Individual/Group bit (bit 7). Therefore, these two bits are not reliable indicators. Thus, when using an IID derived by a short address, the operators of the PLC network can choose whether or not to comply with the original meaning of these two bits. If they choose to comply with the original meaning, these two bits
MUST both be set to zero, since the IID derived from the short address is not global. In order to avoid any ambiguity in the derived IID, these two bits
MUST NOT be a valid part of the PAN ID (for IEEE 1901.2 and ITU-T G.9903) or NID (for IEEE 1901.1). For example, the PAN ID or NID must always be chosen so that the two bits are zeros or the high six bits in PAN ID or NID are left shifted by two bits. If they choose not to comply with the original meaning, the operator must be aware that these two bits are not reliable indicators, and the IID cannot be transformed back into a short link-layer address via a reverse operation of the mechanism presented above. However, the short address can still be obtained via the Unicast Address Mapping mechanism described in
Section 4.3.
For privacy reasons, the IID derived from the MAC address (with padding and bit clamping)
SHOULD only be used for link-local address configuration. A PLC host
SHOULD use the IID derived from the short link-layer address to configure IPv6 addresses used for communication with the public network; otherwise, the host's MAC address is exposed. As per [
RFC 8065], when short addresses are used on PLC links, a shared secret key or version number from the Authoritative Border Router Option [
RFC 6775] can be used to improve the entropy of the hash input. Thus, the generated IID can be spread out to the full range of the IID address space while stateless address compression is still allowed. By default, the hash algorithm
SHOULD be SHA256, using the version number, the PAN ID or NID, and the short address as the input arguments, and the 256-bit hash output is truncated into the IID by taking the high 64 bits.
The IPv6 link-local address [
RFC 4291] for a PLC interface is formed by appending the IID, as defined above, to the prefix FE80::/64 (see
Figure 2).
10 bits 54 bits 64 bits
+----------+-----------------------+----------------------------+
|1111111010| (zeros) | Interface Identifier |
+----------+-----------------------+----------------------------+
The address-resolution procedure for mapping IPv6 unicast addresses into PLC link-layer addresses follows the general description in
Section 7.2 of
RFC 4861. [
RFC 6775] improves this procedure by eliminating usage of multicast NS (Neighbor Solicitation). The resolution is realized by the NCEs (neighbor cache entries) created during the address registration at the routers. [
RFC 8505] further improves the registration procedure by enabling multiple LLNs to form an IPv6 subnet and by inserting a link-local address registration to better serve proxy registration of new devices.
The Source Link-Layer Address and Target Link-Layer Address options for IEEE_1901.1 used in the NS and Neighbor Advertisement (NA) have the following form.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Length=1 | NID :
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
:NID (continued)| Padding (all zeros) | TEI |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Option fields:
-
Type:
-
1 for Source Link-Layer Address and 2 for Target Link-Layer Address.
-
Length:
-
The length of this option (including Type and Length fields) in units of 8 octets. The value of this field is 1 for the 12-bit IEEE 1901.1 PLC short addresses.
-
NID:
-
24-bit Network Identifier
-
Padding:
-
12 zero bits
-
TEI:
-
12-bit Terminal Equipment Identifier
The Source Link-Layer Address and Target Link-Layer Address options for IEEE_1901.2 and ITU-T G.9903 used in the NS and NA have the following form.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Length=1 | PAN ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Padding (all zeros) | Short Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Option fields:
-
Type:
-
1 for Source Link-Layer Address and 2 for Target Link-Layer Address.
-
Length:
-
The length of this option (including Type and Length fields) in units of 8 octets. The value of this field is 1 for the 16-bit IEEE 1901.2 PLC short addresses.
-
PAN ID:
-
16-bit PAN IDentifier
-
Padding:
-
16 zero bits
-
Short Address:
-
16-bit short address
Neighbor discovery procedures for 6LoWPAN networks are described in [
RFC 6775] and [
RFC 8505]. These optimizations support the registration of sleeping hosts. Although PLC devices are electrically powered, sleeping mode
SHOULD still be used for power saving.
For IPv6 prefix dissemination, Router Solicitations (RSs) and Router Advertisements (RAs)
MAY be used as per [
RFC 6775]. If the PLC network uses route-over mode, the IPv6 prefix
MAY be disseminated by the Layer 3 routing protocol, such as RPL, which may include the prefix in the DIO (DODAG Information Object) message. As per [
RFC 9010], it is possible to have PLC devices configured as RPL-unaware leaves, which do not participate in RPL at all, along with RPL-aware PLC devices. In this case, the prefix dissemination
SHOULD use the RS/RA messages.
For dissemination of context information, RAs
MUST be used as per [
RFC 6775]. The 6LoWPAN context option (6CO)
MUST be included in the RA to disseminate the Context IDs used for prefix and/or address compression.
For address registration in route-over mode, a PLC device
MUST register its addresses by sending a unicast link-local NS to the 6LR. If the registered address is link local, the 6LR
SHOULD NOT further register it to the registrar (6LBR or 6BBR). Otherwise, the address
MUST be registered via an ARO (Address Registration Option) or EARO (Extended Address Registration Option) included in the DAR (Duplicate Address Request) [
RFC 6775] or EDAR (Extended Duplicate Address Request) [
RFC 8505] messages. For PLC devices compliant with [
RFC 8505], the 'R' flag in the EARO
MUST be set when sending NSs in order to extract the status information in the replied NAs from the 6LR. If DHCPv6 is used to assign addresses or the IPv6 address is derived from the unique long or short link-layer address, Duplicate Address Detection (DAD)
SHOULD NOT be utilized. Otherwise, DAD
MUST be performed at the 6LBR (as per [
RFC 6775]) or proxied by the routing registrar (as per [
RFC 8505]). The registration status is fed back via the DAC (Duplicate Address Confirmation) or EDAC (Extended Duplicate Address Confirmation) message from the 6LBR and the NA from the 6LR.
Section 6 of
RFC 8505 shows how devices that only behave as specified in [
RFC 6775] can work with devices that have been updated per [
RFC 8505].
For address registration in mesh-under mode, since all the PLC devices are link-local neighbors to the 6LBR, DAR/DAC or EDAR/EDAC messages are not required. A PLC device
MUST register its addresses by sending a unicast NS message with an ARO or EARO. The registration status is fed back via the NA message from the 6LBR.
IPv6 header compression in PLC is based on [
RFC 6282] (which updates [
RFC 4944]). [
RFC 6282] specifies the compression format for IPv6 datagrams on top of IEEE 802.15.4; therefore, this format is used for compression of IPv6 datagrams within PLC MAC frames. For situations when the PLC MAC MTU cannot support the 1280-octet IPv6 packet, the headers
MUST be compressed according to the encoding formats specified in [
RFC 6282], including the Dispatch Header, the LOWPAN_IPHC, and the compression residue carried inline.
For IEEE 1901.2 and ITU-T G.9903, the IP header compression follows the instruction in [
RFC 6282]. However, additional adaptation
MUST be considered for IEEE 1901.1 since it has a short address of 12 bits instead of 16 bits. The only modification is the semantics of the "Source Address Mode" and the "Destination Address Mode" when set as "10" in
Section 3.1 of
RFC 6282, which is illustrated as follows.
SAM: Source Address Mode:
If SAC=0: Stateless compression
-
10:
-
16 bits. The first 112 bits of the address are elided. The value of the first 64 bits is the link-local prefix padded with zeros. The following 64 bits are 0000:00ff:fe00:0XXX, where 0XXX are the 16 bits carried inline, in which the first 4 bits are zero.
If SAC=1: Stateful context-based compression
-
10:
-
16 bits. The address is derived using context information and the 16 bits carried inline. Bits covered by context information are always used. Any IID bits not covered by context information are taken directly from their corresponding bits in the mapping between the 16-bit short address and the IID as provided by 0000:00ff:fe00:0XXX, where 0XXX are the 16 bits carried inline, in which the first 4 bits are zero. Any remaining bits are zero.
DAM: Destination Address Mode:
If M=0 and DAC=0: Stateless compression
-
10:
-
16 bits. The first 112 bits of the address are elided. The value of the first 64 bits is the link-local prefix padded with zeros. The following 64 bits are 0000:00ff:fe00:0XXX, where 0XXX are the 16 bits carried inline, in which the first 4 bits are zero.
If M=0 and DAC=1: Stateful context-based compression
-
10:
-
16 bits. The address is derived using context information and the 16 bits carried inline. Bits covered by context information are always used. Any IID bits not covered by context information are taken directly from their corresponding bits in the mapping between the 16-bit short address and the IID as provided by 0000:00ff:fe00:0XXX, where 0XXX are the 16 bits carried inline, in which the first 4 bits are zero. Any remaining bits are zero.
The constrained PLC MAC layer provides the functions of fragmentation and reassembly. However, fragmentation and reassembly are still required at the adaptation layer if the MAC layer cannot support the minimum MTU demanded by IPv6, which is 1280 octets.
In IEEE 1901.1 and IEEE 1901.2, the MAC layer supports payloads as big as 2031 octets and 1576 octets, respectively. However, when the channel condition is noisy, smaller packets have a higher transmission success rate, and the operator can choose to configure smaller MTU at the MAC layer. If the configured MTU is smaller than 1280 octets, the fragmentation and reassembly defined in [
RFC 4944]
MUST be used.
In ITU-T G.9903, the maximum MAC payload size is fixed to 400 octets, so to cope with the required MTU of 1280 octets by IPv6, fragmentation and reassembly at the 6lo adaptation layer
MUST be provided as specified in [
RFC 4944].
[
RFC 4944] uses a 16-bit datagram tag to identify the fragments of the same IP packet. [
RFC 4963] specifies that at high data rates, the 16-bit IP identification field is not large enough to prevent frequent incorrectly assembled IP fragments. For constrained PLC, the data rate is much lower than the situation mentioned in [
RFC 4963]; thus, the 16-bit tag is sufficient to assemble the fragments correctly.