(After this process, a couple of additional DHCP packets are sent to make sure that no other device is using the same address.)
However, in IPv6 the most common method is through Router Advertisements. This is a "push" process: the router announces its presence with a special packet that is multicast to all nodes, and they then join the network, as shown below.
(After this process, a couple of additional Neighbor Discovery packets are sent to make sure that no other device is using the same address.)
A Routing Advertisement packet is shown below. Notice these elements, outlined in red:
ifconfig eth0
Find the HWaddr value, which is highlighted in the figure
below on this page. Record this value--you will need it later.
scapy
a = IPv6()
a.dst = "ff02::1"
a.display()
Your IPv6 object should now have both the src and dst fields filled in,
as shown below on this page.
If the colors are difficult to see, adjust them by clicking Edit, "Profile Preferences", Colors. I used "Black on light yellow".
b = ICMPv6ND_RA()
b.display()
Your ICMPv6 Router Advertisement object should have a type of Router Advertisement,
as shown below on this page:
c = ICMPv6NDOptSrcLLAddr()
c.lladdr = "00:50:56:24:3b:c0"
c.display()
The lladdr value should match your HWaddr,
as shown below on this page:
d = ICMPv6NDOptMTU()
d.display()
The mtu value should be 1280,
as shown below on this page:
e = ICMPv6NDOptPrefixInfo()
e.prefixlen = 64
e.prefix = "d00d::"
e.display()
The prefixlen and prefix values should be correct,
as shown below on this page:
In the new Terminal window, execute this command:
wireshark
Wireshark shows a couple of warning messages,
saying that it's not recommended to run it as
root.
Press Enter to close them. In the Wireshark window, click eth0 to highlight it, as shown below.
Then click Start.
send(a/b/c/d/e)
You should see a message saying "Sent 1 packets".
The Wireshark window should show the Router Advertisement packet. Click it in the upper pane to select it, and expand the middle pane so the Prefix: d00d:: information is visible, as shown below on this page:
ifconfig eth0
You should see an automatically configured IPv6 address starting with the
d00d:: prefix, as shown below on this page:
http://www.packetlevel.ch/html/scapy/scapyipv6.html