Atmel AVR2070 User Manual

Page of 93
 
62 
AVR2070 
8240B-AVR-06/09 
10.  Node is now on the network. 
It can be seen how IPv6 simplifies auto-configuration of network addresses. Nodes no 
longer require DHCP to acquire an address. IPv6 does support DHCPv6 (called 
stateful auto-configuration) should the extra features be required. 
C.5 6LoWPAN Basics 
Consider that the IPv6 header alone is 40 bytes long, and IPv6 specifies that a packet 
may be at least 1280 bytes. At first glance it would seem crazy to attempt to combine 
this with 802.15.4, who’s maximum packet size is 127 bytes. The header alone would 
take 31% of the entire packet, not even including the 802.15.4 header. However 
6LoWPAN bridges these two technologies seamlessly, taking advantage of a number 
of features of IPv6 to transmit the packets without substantial overhead.  
Many of the fields in the IPv6 header are often certain values, and do not require the 
range of data which is given to them. For instance the ‘flow label’ is 20 bits, but is 
often zero. Hence a single bit can be used to indicate if the ‘flow label’ is zero, and if it 
is zero it is not transmitted.  
The previously mentioned way in which IPv6 can auto-configure addresses based on 
the physical address is also used. The 802.15.4 header already has the destination 
and source address of a packet, but this is the physical address. Since the IPv6 
addresses are often based on these physical addresses, there may be no need to 
transmit the IPv6 addresses. In the best case a 40-byte IPv6 header can be 
compressed to two bytes.  
To do this address compression, 6LoWPAN relies on the notion of “context”. Here 
“context” means the node knows what address or prefix to use based on the context 
of the conversation. For example one of the context’s the node knows is the prefix of 
the local network. There would never be a need to transmit this, since all nodes on 
the network already know this prefix.  
As an example, consider if a node has an IP address of: 
2001:db8:1e1:1:baad:ff:fe00:1 
The address can be split as follows: 
 
2001:db8:1e1:     This is the IPv6 prefix for the network (64 bits) 
 
baad 
 
   This is the 802.15.4 PANID (16 bits) 
 
ff:fe00   
   This is a fixed bit-sequence (32 bits) 
 
1 
 
   This is the 802.15.4 short address for the node (16-bit) 
From this it can be seen how the IPv6 address can be directly written from the 
802.15.4 short address of the node. To send to the node with an IPv6 address of 
2001:db8:1e1:1:baad:ff:fe00:5, it means the node with the short address of 5 is the 
destination node. 
C.5.1 Draft-ietf-6lowpan-hc01 
The exact version of the “header compression” used in this project is HC01, available 
at 
http://tools.ietf.org/html/draft-hui-6lowpan-hc-01
. Since the standard is evolving, 
this is not the most recent version of the header-compression standard. The most 
recent version will be available at 
http://tools.ietf.org/wg/6lowpan
. The following 
quickly describes what features are present in HC01, and supported by this code: