IPv6 configuration of network interfaces and domain name resolution under RedHat Linux
IPv6 configuration of network interfaces under RedHat Linux
IPv6 configuration of domain name resolution (DNS) under RadHat Linux
Introdution
Besides of enabled IPv6 support, operating system needs a proper IPv6 configuration of network interfaces and domain name resolution (using DNS). Bellow the relevant sections are describing how to configure these elements in RedHat Linux.
IPv6 configuration of network interfaces under RedHat Linux
Here is a list of steps that must be performed to configure network interfaces to operate in an IPv6 network.
- The /etc/sysconfig/network configuration - addition of NETWORKING_IPv6=yes entry when there is no such entry yet. Here is an example network file:
NETWORKING=yes
NETWORKING_IPv6=yes
HOSTNAME=example-name.eti.pg.gda.pl
- There are particular configuration files in /etc/sysconfig/network-scripts e.g. ifcfg-eth0 file for a network interface named eth0. For every network interface, that suppose to have an IPv6 address, there is a need of appropriate entry in that specific file. Such entries are dependent on whether the network interfaces configuration is set up dynamic (DHCP) or static (manual, detailed entries in configuration file).
- The dynamic configuration (DHCPv6):
There should be following entries in /etc/sysconfig/network-scripts/ifcfg-interface_name:
- BOOTPROTO="dhcp"
- IPV6INIT="yes"
For example: in case of eth0 the /etc/sysconfig/network-scripts/ifcfg-eth0 file should look like this:
DEVICE="eth0"
BOOTPROTO="dhcp"
HWADDR="08:00:01:31:31:31"
IPV6INIT="yes"
NM_CONTROLLED="yes"
ONBOOT="yes"
Attention! In Dual Stack mode (simultaneous support for IPv4 and IPv6) with the dynamic configuration there is a need of having two kind of DHCP servers working in the network: DHCPv4 and DHCPv6.
- The static configuration:
There should be following entries in /etc/sysconfig/network-scripts/ifcfg-interface_name:
- BOOTPROTO="static" (lub without whole BOOTPROTO entry)
- IPV6INIT="yes"
- IPV6ADDR="IPv6_address/network_mask"
- IPV6_DEFAULTGW="gateway_IPv6_adress" (in case there is no need of setting the gateway, this entry may be omitted)
For example: in case of eth0 the /etc/sysconfig/network-scripts/ifcfg-eth0 file should look like this:
DEVICE="eth0"
BOOTPROTO="static"
HWADDR="08:00:02:31:31:31"
IPV6INIT="yes"
IPV6ADDR="31de::a00:2ff:fe31:3131/96"
IPV6_DEFAULTGW="31de::a00:2ff:fe00:0001"
NM_CONTROLLED="yes"
ONBOOT="yes"
Attention! In Dual Stack mode with the static configuration there is a need of having IPv4 definition also (IPADDR, NETMASK, GATEWAY). In that case a sample definitions for eth0 interface should be as follows:
DEVICE="eth0"
BOOTPROTO="static"
HWADDR="08:00:02:31:31:31"
IPADDR="20.0.2.15"
GATEWAY="20.0.2.1"
NETMASK="255.255.255.0"
IPV6INIT="yes"
IPV6ADDR="31de::a00:2ff:fe31:3131/96"
IPV6_DEFAULTGW="31de::a00:2ff:fe00:0001"
NM_CONTROLLED="yes"
ONBOOT="yes"
- When the network interface should be enabled during operating system initialization, there is a need of following entry:
ONBOOT="yes"
- After the configuration of selected interfaces, network must be restarted:
service network restart
IPv6 configuration of domain name resolution (DNS) under RedHat Linux
The configuration of domain name resolution in Linux family operating systems resides in /etc/resolv.conf file. When the network interfaces configuration is based on DHCPv6, which broadcasts the DNS IPv6 adresses, the entries in the resolv.conf file are generated automatically. For static configuration there is a need of entering the appropriate IPv6 addresses of DNS servers. Here is a sample resolv.conf configured to operate based on DNS servers with IPv6 addresses:
nameserver 31de::a00:2ff:fe01:0053
nameserver 31de::a00:2ff:fe02:0053