Using automatic link-local addresses (IPv6-only)
Link-local addresses on Ethernet work without any configuration tools except that you have to activate the interface first.
device=eth1 ip link set $device up
Kernel automatically assigns a MAC-derived link-local address to any active Ethernet interface.
ip address show dev $device
If you know another link-local address on the network, you should be able
to test it with the ping
command.
ping ...%$device
Oh, wait, ping
doesn't work. Use ping6
.
ping6 ...
Failed again. Now we're getting to the point. Link-local addresses use the same network prefix on every interface. We need to specify the local network interface to be used to contact the particular link-local address.
ping6 ...%eth0
Static runtime configuration (iproute2)
ip address add 192.168.1.1/24 dev eth0 ip address add 2001:db8:1:2::1 dev eth0
Dynamic IPv4 configuration
IPv4 DHCP example (/etc/dhcp/dhcpd.conf):
option domain-name "example.org"; option domain-name-servers 10.0.255.1; authoritative; subnet 10.0.15.0 netmask 255.255.255.0 { range 10.0.15.100 10.0.15.120; option routers 10.0.15.1; }
IPv4 static IP example:
host station { hardware ethernet 52:54:ab:15:02:22; fixed-address 10.0.15.2; }
Dynamic IPv6 configuration
SLAAC without DNS configuration (mandatory by RFC 4294)
/etc/radvd.conf:
interface eth0 { AdvSendAdvert on; prefix 2001:db8:1:2::/64 {}; };
DNS queries typically use IPv4. NetworkManager supports this configuration and it also works when device is ignored by NetworkManager.
SLAAC with RDNSS and DNSSL
/etc/radvd.conf:
interface eth0 { AdvSendAdvert on; prefix 2001:db8:1:2::/64 {}; RDNSS 2001:db8:1:2::ab {}; DNSSL example.net {}; };
The contents of host's /etc/resolv.conf is filled in by NetworkManager. Linux kernel currently supports RDNSS but not DNSSL. NetworkManager has problems with RDNSS but they have to be solved also on IETF level. DNSSL support cannot be tested in NetworkManager because of lack of kernel support. Kernel 3.5 will have DNSSL support.
SLAAC with DHCPv6 Information Request
/etc/radvd.conf:
interface eth0 { AdvSendAdvert on; AdvOtherConfigFlag on; prefix 2001:db8:1:2::/64 {}; };
/etc/dhcp/dhcpd6.conf:
subnet6 2001:db8:1:2::/64 { option dhcp6.name-servers 2001:db8:1:2::ab; option dhcp6.domain-search "example.net"; }
This is often used to supply DNS information to hosts that don't support RDNSS/DNSSL in Router Advertisements. NetworkManager works well in this scenario if DHCPv6 packets get through firewall.
There have been problems with IPv6 firewall blocking DHCPv6 exchange. Right now Fedora has two firewall configuration services. I hope to test both of them later.
DHCPv6 address-only, all other by RA
/etc/radvd.conf:
interface eth0 { AdvSendAdvert on; AdvManagedFlag on; prefix 2001:db8:1:2::/64 { AdvAutonomous off; }; RDNSS 2001:abcd:1:1::ab {}; DNSSL example.net {}; };
/etc/dhcp/dhcpd6.conf:
subnet6 2001:db8:1:2::/64 { range6 2001:db8:1:2::1:0000 2001:db8:1:2::1:ffff; }
DHCPv6 is used only for address configuration, RA does everything else. NetworkManager works in this scenario except DNSSL (see above).
Note that AdvManagedFlag implies AdvOtherConfigFlag functionality too.
DHCPv6 address and DNS configuration
/etc/radvd.conf:
interface eth0 { AdvSendAdvert on; AdvManagedFlag on; prefix 2001:db8:1:2::/64 { AdvAutonomous off; }; };
/etc/dhcp/dhcpd6.conf:
subnet6 2001:db8:1:2::/64 { option dhcp6.name-servers 2001:db8:1:2::ab; option dhcp6.domain-search "example.net"; range6 2001:db8:1:2::1:0000 2001:db8:1:2::1:ffff; }
This is a typical DHCPv6 configuration. Note that routing information are stil delivered through Router Advertisements. NetworkManager may fail in this scenario.
IPv6 reconfiguration
IPv6 automatic configuration is pretty dynamic and can change very quickly. Currently NetworkManager doesn't respond well to some dynamic changes of configuration.
Note: Current version of NetworkManager (0.9.6) doesn't reflect default gateway changes in Router Advertisements.