Subject: NA question (ICMPv6 option)

From: Ming-Hong Wu <[email-masked]>
Date: Wed, 26 Dec 2012 10:53:24 +0800

Hi all,

    As we know, when doing ARP in IPv6, said A pings B, B will reply an NA
with ICMPv6 option: Target Link-Layer Address.

   The packet format is as follows:

    In RFC, it says, Length is in multiple of 8 octets, so in MAC, this
seems very OK.
    Type; 1 byte
    Length: set to 1 ( meaning 8 bytes in total )
    LLA: 6 bytes (MAC)

    What will happen if LLA isn't 6 bytes, for example a 8-bytes MAC like
Zigbee, this will form a total bytes as 10
    In this case, how do we set Type and Length ?

-- 
Sincerely,
minhong

---

From: Fernando Gont <[email-masked]>
Date: Wed, 26 Dec 2012 23:00:55 -0300

On 12/25/2012 11:53 PM, Ming-Hong Wu wrote:
>     What will happen if LLA isn't 6 bytes, for example a 8-bytes MAC
> like Zigbee, this will form a total bytes as 10

"Type" should be the same, and "length" would be the one appropriate for
the underlying link-layer technology. Since you know the underlying
link-layer, you'd always validate the TLLA option to be of the
appropriate length.

Cheers,
-- 
Fernando Gont
e-mail: [email-masked] || [email-masked]
PGP Fingerprint: 7809 84F5 322E 45C7 F1C9 3945 96EE A9EF D076 FFF1

---

From: "Manfredi, Albert E" <[email-masked]>
Date: Wed, 26 Dec 2012 17:39:43 -0600

First, you’re talking about IPv6 Neighbor Discovery, right? Not ARP.

If you look at RFC 4861, Section 4.6, it says:

Link-Layer Address
                     The variable length link-layer address.

                     The content and format of this field (including
                     byte and bit ordering) is expected to be specified
                     in specific documents that describe how IPv6
                     operates over different link layers.  For instance,
                     [IPv6-ETHER].

So padding is needed, if the LLA doesn’t line up nicely on a 64-bit boundary, and that comment tells you to check the RFC that described IPv6 over Zigbee to get the details.

RFC 4944 says how it’s done, in Section 8, Unicast Address Mapping.

The short answer is, you give the ND message Option Type 1 or 2 a length of 2 (128 bits), you place the EUI-64 bits immediately following the Length byte, and then you pad the rest with zeroes.

Bert

From: [email-masked] [mailto:[email-masked]] On Behalf Of Ming-Hong Wu
Sent: Tuesday, December 25, 2012 9:53 PM
To: [email-masked]
Subject: NA question (ICMPv6 option)

Hi all,

    As we know, when doing ARP in IPv6, said A pings B, B will reply an NA with ICMPv6 option: Target Link-Layer Address.

    In RFC, it says, Length is in multiple of 8 octets, so in MAC, this seems very OK.
    Type; 1 byte
    Length: set to 1 ( meaning 8 bytes in total )
    LLA: 6 bytes (MAC)

    What will happen if LLA isn't 6 bytes, for example a 8-bytes MAC like Zigbee, this will form a total bytes as 10
    In this case, how do we set Type and Length ?

--
Sincerely,
minhong