Addressing
The different addressing schemes are a bit confusing, so here I have tried to explain which addresses are possible.
- 802.15.4 Addresses:
- 16-bit short address. Basically TOS_NODE_ID.
- 64-bit address. Also known as the "802.15.4 interface identifier", "MAC", or "IEEE address"
- May be formed from a short address. The easiest way to do this is simply by padding a 16-bit address out to 64 bits with zeros. However, if the PAN ID is not zero, more complicated mappings are possible. Also, all zero addresses are not permissible.
- IPv6 Addresses:
- Basically, the whole "network" is one "hop" from an IP point of view, and thus all addresses may be link-local even though there are many potential hops.
- This is not true with the b6loWPAN implementation. Each node in the network functions as an IP router and thus IP hop (known as "route over"). The previous sentence refers to another possible implementation, which is "mesh under."
- The IPv6 link-local prefix is FE80::/64. Thus, the IPv6 address of a mote has FE80:: as the high 64-bits, and its 64 bit 802.15.4 address as the low 64 bits.
- Simple example. Whereas before I set TOS_NODE_ID to 5, I now set its short and long addresses to 5. It's IP address is FE80::5.
- Basically, the whole "network" is one "hop" from an IP point of view, and thus all addresses may be link-local even though there are many potential hops.
The Address Fields of a LoWPAN Packet From RFC4944
There are also many different places addresses can be stored. Here are some of them
- 802.15.4 frame
- Contains "link-layer" source and destination addresses, either 16-bit short addresses or 64-bit long addresses
- 6loWPAN mesh header
- One of the optional headers. Contains 802.15.4 interface identifiers (16 or 64-bit). Local to the PAN.
- IP header:
- one of the following:
- Full 16-octet source and/or destination
- 8-octet source and/or destination IP prefix
- 8-octet source and/or destination IP suffix
- none of the above
- If there is no addressing in the IP header, or there is a suffix with no prefix, the IP prefix is set to link-local (FE80::). If no suffix is present, it is set to (a) the mesh source and destination, or (b) 802.15.4 source and destination, respectively.
- one of the following:
