3 ms·
It's done automatically by your router and your OS. By default you won't need to do anything--you plug it in and it just works. On the machine I'm writing thi
by rleigh 11y ago
It's done automatically by your router and your OS. By default you won't need to do anything--you plug it in and it just works.
On the machine I'm writing this reply on, when I boot it up (with either FreeBSD, Linux or Windows) it gets a router advertisement from the router (which is routing both IPv4 and IPv6). It gets a standard NATed DHCP lease for IPv4. For IPv6, it combines the /64 network prefix assigned by my ISP with the NIC MAC address to compute a unique (and stable) address.
There are of course alternatives. I can assign it statically, I can use privacy extensions to periodically change the address (seems to be the default on Windows for me) or I can use DHCPv6 to use DHCP-allocated addresses (my router doesn't support this though I have done it in the past with BIND).