 |
» |
|
|
 |
Stateless address autoconfiguration requires
no manual configuration of hosts, minimal configuration of routers,
and no additional servers. The primary interface (lanX:0) is automatically assigned a link-local address by
the system when the interface is configured. This allows each IPv6 interface
to have at least one source address that can be used by Neighbor
Discovery. Therefore, it is not advisable to assign other addresses
to the primary interface besides the link-local address. See RFC
2373 “IP Version 6 Addressing Architecture” for
details.
Link-Local
Address Assigned Automatically |  |
A link-local address is formed by prepending the well-known
link-local prefix FE80::/10 to the interface identifier which is typically
64 bits long and based on EUI-64 identifiers. Link-local addresses
are sufficient for allowing communication among IPv6 hosts attached
to the same link. Figure 6-3 “Primary
Interface Address Autoconfiguration” shows the Primary
Interface Autoconfiguration steps performed after using the ifconfig command, which is as follows:
If you mark an interface “up” without assigning
a primary address, the system derives a link-local address by performing
the following 4 steps: Taking the LAN card’s 48-bit
link-level address (“MAC address” 8:0:9:78:f3:39) 0000 1000 0000 0000 0000 1001 0111 1000 1111 0011 0011 1001 | and putting it into an EUI-64 identifier by:Putting two bytes (0xffee) into the middle (bit 24) of the 48-bit link-level
address 8:0:9:ff:fe:78:f3:39; 0000 1000 0000 0000 0000 1001 1111 1111 1111 1110 0111 1000 1111 0011 0011 1001 and flipping the Universal/local bit (as described
in RFC 2373) to form a 64-bit EIU-64 interface identifier a:0:9:ff:fe:78:f3:390000 1010 0000 0000 0000 1001 1111 1111 1111 1110 0111 1000 1111 0011 0011 1001 Prepending the well-known prefix fe80::/10 Forming a 128-bit link-local
unicast address for the primary interface fe80::a00:9ff:fe78:f339
View the configuration by typing lan0: flags=4800841<UP,RUNNING,MULTICAST,ONLINK> inet6 fe80::a00:9ff:fe78:f339 prefix 10 |
Secondary
Interface Autoconfiguration |  |
If an IPv6 router on the network advertises network prefixes
in router advertisements,
IPv6 derives a second IPv6 address based on the interface identifier.
IPv6 assigns this address to a secondary interface for the network
interface. The host adds the router as one of its default gateways.
In general, there are as many secondary interfaces configured as
there are prefixes advertised by the router. Figure 6-4 “Secondary
Interface Autoconfiguration From an IPv6 Router” shows a general
example of Secondary Interface Autoconfiguration. Primary interface
comes up with the link-local address autoconfigured. Host multicasts Router Solicitation. IPv6 Router sends Router
Advertisement to host. Host autoconfigures secondary
interface (lan0:1) by prepending prefix (3ffe:2000:0:13::/64) sent by router to interface identifier (
a00:9ff:fe78:f339). Refer to RFC 2461 “Neighbor Discovery
for IP Version 6 (IPv6)” for details.
Manual
Configuration and Router Advertisements |  |
Note that even if a primary interface is manually configured,
if the host receives prefixes from router advertisements, then secondary
interfaces are autoconfigured. In this case, the addresses on the
secondary interfaces are derived from the interface ID portion of
the manually specified primary interface address. Manual
Configuration Overwriting AutoconfigurationManual configuration can overwrite autoconfiguration.
When a secondary interface is configured with a manually assigned
address, and if the user chooses an interface index number that
has been used for an already autoconfigured secondary interface,
the manual configuration overwrites the autoconfiguration. When
this happens, network connectivity through the overwritten autoconfigured
IP address is temporarily lost. At a later time, when the host receives
the next router advertisement, the host will bring up another secondary
interface with a different IP index number, but with the same IP
address, and network connectivity through that IP address is restored.
Normally, a user can avoid this by checking used IP index numbers.
However, there is always a possibility that address autoconfiguration
due to router advertisement is happening concurrently while the
user manually configures secondary interfaces. Disabling
Specific IPv6 InterfacesTo disable communication through a specific IP address on
an autoconfigured secondary interface, that secondary interface
must be marked down, not removed or overwritten with a different
IP address. If that interface is removed or overwritten, the host
will reconfigure another secondary interface with the same IP address
when it receives the next router advertisement. Alternatively, the
router can be configured to stop advertising the prefix that corresponds
to the offending IP address. A primary interface cannot be removed from the system
until all secondary interfaces are removed. You can remove secondary
interfaces from the system using the ifconfig inet6 command, as in the following example: The primary interface (for example, lan1) can then
be removed from the system with the ifconfig command, as in the following example: ifconfig lan1 inet6 unplumb |
A loopback interface does not have a hardware device
associated with it. The name of the loopback interface is lo0. A
loopback interface is automatically created by the system. You cannot
delete it.
|