From Fedora Project Wiki
Line 5: Line 5:


<pre>
<pre>
# device=eth1
device=eth1
#
ip link set $device up
# ip link set $device up
</pre>
</pre>


Line 14: Line 13:


<pre>
<pre>
# ip address show dev $device
ip address show dev $device
 
</pre>
</pre>


Line 22: Line 20:


<pre>
<pre>
# ping .....
ping ...%$device
 
</pre>
</pre>


Line 29: Line 26:


<pre>
<pre>
# ping6 .....
ping6 ...
 
</pre>
</pre>


Line 38: Line 34:


<pre>
<pre>
# ping6 ....%eth0
ping6 ...%eth0
</pre>
 
=== Static runtime configuration (iproute2) ===
 
<pre>
ip address add 192.168.1.1/24 dev eth0
ip address add 2001:db8:1:2::1 dev eth0
</pre>
 
=== Dynamic IPv4 configuration ===
 
TBD
 
=== Dynamic IPv6 configuration ===
 
==== SLAAC without DNS configuration (mandatory by [http://tools.ietf.org/html/rfc4294 RFC 4294]) ====
 
/etc/radvd.conf:
 
<pre>
interface eth0 {
    AdvSendAdvert on;
    prefix 2001:db8:1:2::/64 {};
};
</pre>
 
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:
 
<pre>
interface eth0 {
    AdvSendAdvert on;
    prefix 2001:db8:1:2::/64 {};
    RDNSS 2001:db8:1:2::ab {};
    DNSSL example.net {};
};
</pre>
 
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:
<pre>
interface eth0 {
    AdvSendAdvert on;
    AdvOtherConfigFlag on;
    prefix 2001:db8:1:2::/64 {};
};
</pre>
</pre>


=== Static runtime configuration (iproute2) ===
/etc/dhcp/dhcpd6.conf:
 
<pre>
subnet6 2001:db8:1:2::/64 {
    option dhcp6.name-servers 2001:db8:1:2::ab;
    option dhcp6.domain-search "example.net";
}
</pre>
 
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:
 
<pre>
interface eth0 {
    AdvSendAdvert on;
    AdvManagedFlag on;
    prefix 2001:db8:1:2::/64 {
        AdvAutonomous off;
    };
    RDNSS 2001:abcd:1:1::ab {};
    DNSSL example.net {};
};
</pre>
 
/etc/dhcp/dhcpd6.conf:
 
<pre>
subnet6 2001:db8:1:2::/64 {
    range6 2001:db8:1:2::1:0000 2001:db8:1:2::1:ffff;
}
</pre>
 
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:
 
<pre>
interface eth0 {
    AdvSendAdvert on;
    AdvManagedFlag on;
    prefix 2001:db8:1:2::/64 {
        AdvAutonomous off;
    };
};
</pre>
 
/etc/dhcp/dhcpd6.conf:


<pre>
<pre>
# ip address add 192.168.1.1/24 dev eth0
subnet6 2001:db8:1:2::/64 {
# ip address add 2001:db8:1:2::1 dev eth0
    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;
}
</pre>
</pre>
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.

Revision as of 07:51, 13 December 2012

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

TBD

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.