ICPMv6 messages

refer to here

Router advertisement and solicitation messages

Router advertisement and solicitation messages enable a node on a link to discover the routers on the same link.

Each configured router interface on a link sends out a router advertisement message, which has a value of 134 in the Type field of the ICMP packet header, periodically to the all-nodes link-local multicast address (FF02::1).

A configured router interface can also send a router advertisement message in response to a router solicitation message from a node on the same link. This message is sent to the unicast IPv6 address of the node that sent the router solicitation message.

At system startup, a host on a link sends a router solicitation message to the all-routers multicast address (FF01). Sending a router solicitation message, which has a value of 133 in the Type field of the ICMP packet header, enables the host to automatically configure its IPv6 address immediately instead of awaiting the next periodic router advertisement message.

Because a host at system startup typically does not have a unicast IPv6 address, the source address in the router solicitation message is usually the unspecified IPv6 address (0:0:0:0:0:0:0:0). If the host has a unicast IPv6 address, the source address is the unicast IPv6 address of the host interface sending the router solicitation message.

Neighbor advertisement and solicitation messages

Neighbor solicitation and advertisement messages enable a node to determine the link-layer address of another node (neighbor) on the same link. (This function is similar to the function provided by the Address Resolution Protocol [ARP] in IPv4.) For example, node 1 on a link wants to determine the link-layer address of node 2 on the same link. To do so, node 1, the source node, multicasts a neighbor solicitation message. The neighbor solicitation message, which has a value of 135 in the Type field of the ICMP packet header, contains the following information:

  • Source address: IPv6 address of node 1 interface that sends the message.
  • Destination address: solicited-node multicast address (FF02:0:0:0:0:1:FF00::/104) that corresponds the IPv6 address of node 2.
  • Link-layer address of node 1.
  • A query for the link-layer address of node 2.

After receiving the neighbor solicitation message from node 1, node 2 replies by sending a neighbor advertisement message, which has a value of 136 in the Type field of the ICMP packet header. The neighbor solicitation message contains the following information:

  • Source address: IPv6 address of the node 2 interface that sends the message.
  • Destination address: IPv6 address of node 1.
  • Link-layer address of node 2.

After node 1 receives the neighbor advertisement message from node 2, nodes 1 and 2 can now exchange packets on the link.

After the link-layer address of node 2 is determined, node 1 can send neighbor solicitation messages to node 2 to verify that it is reachable. Also, nodes 1, 2, or any other node on the same link can send a neighbor advertisement message to the all-nodes multicast address (FF02::1) if there is a change in their link-layer address.

Advertisements

IPv6 address types

 

::1/128 loopback address, like 127.0.0.1 in IPv4

FC00::/7 unique local address, like 192.168.0.0/16, 172,.16.0.0/12, 10.0.0.0/8

FF00::/8 multicast address, like 224.0.0.0/4

2000::/3 global unicast

2002::/16 used for 6to4 tunneling

2001:db8:cafe::/48 network specific prefix, used for nat64, IPv4/IPv6 address translation

 

EUI48 vs EUI64

refer to answer here:

https://networkengineering.stackexchange.com/questions/23566/what-are-eui-48-and-eui-64

Historically, both EUI-48 and MAC-48 were concatenations of a 24-bit OUI (Organizationally Unique Identifier) assigned by the IEEE and a 24-bit extension identifier assigned by the organization with that OUI assignment (NIC). The subtle difference between EUI-48 and MAC-48 was not well understood; as a result, the term MAC-48 is now obsolete and the term EUI-48 is used for both (but the terms “MAC” and “MAC address” are still used).

In other words, EUI-48 and the MAC number of a device represent the same thing! Usually it is represented in 12 hex (e.g. 0023.a34e.abc9), equivalent to 48 bits or 6 bytes.

By implementing the EUI-64 (64-bit Extended Unique Identifier format), a host can automatically assign itself a unique 64-bit IPv6 interface identifier without the need for manual configuration or DHCP. So it’s an IPv6 matter. Anyway, if you are interested about how it’s calculated, it is applied to a MAC address like this:

The 48-bit MAC address is split in half, the hex group FFFE is inserted in the middle (after the 24th bit), and the seventh bit is inverted.

Example:

The MAC address    0021.86b5.6e10      (48 bit) becomes 
the EUI-64 address 0221.86ff.feb5.6e10 (64 bit)