NFC technology has requirements owing to low power consumption and allowed protocol overhead. 6LoWPAN standards [
RFC 4944] [
RFC 6775] [
RFC 6282] provide useful functionality for reducing the overhead of IPv6 over NFC. This functionality consists of link-local IPv6 addresses and stateless IPv6 address autoconfiguration (see Sections [
4.2] and [
4.3]), Neighbor Discovery (see
Section 4.4), and header compression (see
Section 4.6).
Figure 3 illustrates the IPv6-over-NFC protocol stack. Upper-layer protocols can be transport-layer protocols (e.g., TCP and UDP), application-layer protocols, and other protocols capable of running on top of IPv6.
+----------------------------------------+
| Upper-Layer Protocols |
+----------------------------------------+
| IPv6 |
+----------------------------------------+
| Adaptation Layer for IPv6 over NFC |
+----------------------------------------+
| NFC Logical Link Layer |
+----------------------------------------+
| NFC Physical Layer |
+----------------------------------------+
The Adaptation Layer for IPv6 over NFC supports Neighbor Discovery, stateless address autoconfiguration, header compression, and fragmentation and reassembly, based on 6LoWPAN. Note that 6LoWPAN header compression [
RFC 6282] does not define header compression for TCP. The latter can still be supported by IPv6 over NFC, albeit without the performance optimization of header compression.
An NFC-enabled device performs stateless address autoconfiguration per [
RFC 4862]. A 64-bit IID for an NFC interface is formed by utilizing the 6-bit NFC SSAP (see
Section 3.3). In the viewpoint of address configuration, such an IID should guarantee a stable IPv6 address during the course of a single connection because each data link connection is uniquely identified by the pair of DSAP and SSAP included in the header of each LLC PDU in NFC.
Following the guidance of [
RFC 7136], IIDs of all unicast addresses for NFC-enabled devices are 64 bits long and constructed by using the generation algorithm of random identifiers (RIDs) that are stable [
RFC 7217].
The RID is an output created by the F() algorithm with input parameters. One of the parameters is Net_Iface, and the NFC Link-Layer Address (i.e., the SSAP)
MUST be a source of the Net_Iface parameter. The 6-bit address of the SSAP of NFC is short and can easily be targeted by attacks from a third party (e.g., address scanning). The F() algorithm with SHA-256 can provide secured and stable IIDs for NFC-enabled devices. In addition, an optional parameter, Network_ID, is used to increase the randomness of the generated IID with the NFC Link-Layer Address (i.e., SSAP). The secret key
SHOULD be at least 128 bits. It
MUST be initialized to a pseudorandom number [
RFC 4086].
The IPv6 Link-Local Address for an NFC-enabled device is formed by appending the IID to the prefix fe80::/64, as depicted in
Figure 4.
0 0 0 1
0 1 6 2
0 0 4 7
+----------+------------------+----------------------------+
|1111111010| zeros | Interface Identifier |
+----------+------------------+----------------------------+
. .
. <- - - - - - - - - - - 128 bits - - - - - - - - - - - -> .
. .
The "Interface Identifier" can be a random and stable IID.
Neighbor Discovery Optimization for 6LoWPANs [
RFC 6775] describes the Neighbor Discovery approach in several 6LoWPAN topologies, such as mesh topology. NFC supports mesh topologies, but most applications would use a simple multi-hop network topology or directly connected peer-to-peer network because the NFC RF range is very short.
-
When an NFC 6LN is directly connected to a 6LBR, the 6LN MUST register its address with the 6LBR by sending Neighbor Solicitation (NS) with the Extended Address Registration Option (EARO) [RFC 8505]; then Neighbor Advertisement (NA) is started. When the 6LN and 6LBR are linked to each other, an address is assigned to the 6LN. In this process, Duplicate Address Detection (DAD) is not required.
-
When two or more NFC 6LNs are connected to the 6LBR, two cases of topologies can be formed. One is a multi-hop topology, and the other is a star topology based on the 6LBR. In the multi-hop topology, 6LNs that have two or more links with neighbor nodes may act as routers. In star topology, any of 6LNs can be a router.
-
For receiving RSs and RAs, the NFC 6LNs MUST follow Sections 5.3 and 5.4 of [RFC 6775].
-
When an NFC device is a 6LR or 6LBR, the NFC device MUST follow Sections 6 and 7 of [RFC 6775].
All IPv6-over-NFC encapsulated datagrams are prefixed by an encapsulation header stack consisting of a dispatch value [
IANA-6LoWPAN]. The only sequence currently defined for IPv6 over NFC
MUST be the LOWPAN_IPHC compressed IPv6 header (see
Section 4.6) followed by a payload, as depicted in
Figure 5 and
Table 1.
+---------------+---------------+--------------+
| IPHC Dispatch | IPHC Header | Payload |
+---------------+---------------+--------------+
The dispatch value (1 octet in length) is treated as an unstructured namespace. Only a single pattern is used to represent current IPv6-over-NFC functionality.
Table 1: Dispatch Values
Other IANA-assigned 6LoWPAN dispatch values do not apply to this specification.
Header compression as defined in [
RFC 6282], which specifies the compression format for IPv6 datagrams on top of IEEE 802.15.4, is
REQUIRED in this document as the basis for IPv6 header compression on top of NFC. All headers
MUST be compressed according to the encoding formats described in [
RFC 6282].
Therefore, IPv6 header compression in [
RFC 6282]
MUST be implemented. Further, implementations
MUST also support Generic Header Compression (GHC) as described in [
RFC 7400].
If a 16-bit address is required as a short address, it
MUST be formed by padding the 6-bit NFC SSAP (NFC Link-Layer Node Address) to the left with zeros as shown in
Figure 6.
0 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Padding(all zeros)| NFC Addr. |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
IPv6 over NFC
MUST NOT use fragmentation and reassembly (FAR) at the adaptation layer for the payloads as discussed in
Section 3.4. The NFC link connection for IPv6 over NFC
MUST be configured with an equivalent MIU size to support the IPv6 MTU requirement (1280 bytes). To this end, the MIUX value is 0x480.
The address resolution procedure for mapping IPv6 non-multicast addresses into NFC Link-Layer Addresses follows the general description in Sections
4.6.1 and
7.2 of [
RFC 4861], unless otherwise specified.
The Source/Target Link-Layer Address option has the following form when the addresses are 6-bit NFC SSAP/DSAP (NFC Link-Layer Node Addresses).
0 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Length=1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+- Padding (all zeros) -+
| |
+- +-+-+-+-+-+-+
| | NFC Addr. |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
Option fields:
-
-
Type:
-
-
1:
-
This is for the Source Link-Layer Address.
-
2:
-
This is for the Target Link-Layer Address.
-
Length:
-
This is the length of this option (including the Type and Length fields) in units of 8 bits. The value of this field is 1 for 6-bit NFC node addresses.
-
NFC address:
-
The 6-bit address in canonical bit order. This is the unicast address the interface currently responds to.
The NFC Link Layer does not support multicast. Therefore, packets are always transmitted unicast between two NFC-enabled devices. Even in the case where a 6LBR is attached to multiple 6LNs, the 6LBR cannot multicast to all the connected 6LNs. If the 6LBR needs to send a multicast packet to all its 6LNs, it has to replicate the packet and unicast it on each link. However, this is not energy-efficient; the central node, which is battery-powered, must take particular care of power consumption. To further conserve power, the 6LBR
MUST keep track of multicast listeners at NFC link-level granularity (not at subnet granularity), and it
MUST NOT forward multicast packets to 6LNs that have not registered as listeners for multicast groups the packets belong to. In the opposite direction, a 6LN always has to send packets to or through the 6LBR. Hence, when a 6LN needs to transmit an IPv6 multicast packet, the 6LN will unicast the corresponding NFC packet to the 6LBR.