Suse Linux ( SLES10 ) IPv6 Configuration

How do I configure IPv6 networking under SUSE Linux Enterprise Server (SLES v10.2) or OpenSuse Linux by Novell?

IPv6 support under YaST is not upto date. You need to manually edit the configuration files. This is NOT recommended as YaST may get confused later on.

SLES10 IPv6 Configuration From The Command Line

Use the following command to set new IPv6 address using ip command under Suse Linux.

Our Sample IPv6 Setup

  • IPv6 IP : 2607:f0d0:1002:0011:0000:0000:0000:0002/64
  • IPv6 Default Router IP : 2607:f0d0:1002:0011:0000:0000:0000:0001

Task: Adding An IPv6 Address

Type the following command:
ip -6 address add {IPv6-Address}/{NetMask} dev {device-name}
To add 2607:f0d0:1002:0011:0000:0000:0000:0002/64 IP to eth0, enter:
# ip -6 address add 2607:f0d0:1002:0011:0000:0000:0000:0002/64 dev eth0

Task: Adding A Default Route

Type the following command:
ip -6 route add default via {IP6-Router-IP} dev {device-name}
Add a default IPv6 router IP 2607:f0d0:1002:0011:0000:0000:0000:0001, enter:
# ip -6 route add default via 2607:f0d0:1002:0011:0000:0000:0000:0001 dev eth0

Task: Display your IPv6 IP addresses configuration

Type the following command:
# ip -6 address show dev eth0
To review your IPv6 routing table, enter:
# ip -6 route show

Task: Testing your IPv6 Configuration

Type the following command:
# ping6 ipv6.google.com
# ping6 sxi.io

Sample output:

PING6(56=40+8+8 bytes) 2607:f0d0:3001:9::2 --> 2607:f0d0:1002:11::4
16 bytes from 2607:f0d0:1002:11::4, icmp_seq=0 hlim=60 time=34.481 ms
16 bytes from 2607:f0d0:1002:11::4, icmp_seq=1 hlim=60 time=34.207 ms
16 bytes from 2607:f0d0:1002:11::4, icmp_seq=2 hlim=60 time=33.994 ms

Persistence IPv6 Configuration

Above commands will not keep IPv6 configuration across reboots unless the configuration files are updated accordingly. You need to update the following IPv6 configurations under SLES / OpenSuse Linux:

  • eth0 IPv6 configuration file : /etc/sysconfig/network/ifcfg-eth-id-${ETHIDFILE}
  • Default IPv6 routing configuration file : /etc/sysconfig/network/routes

You can find out the value of ETHIDFILE by typing the following command:
# ip link show dev eth0 | awk '/link/{ print $2 }'
# ETHIDFILE=$(ip link show dev eth0 | awk '/link/{ print $2 }')

Now, open configuration file, enter:
# cp /etc/sysconfig/network/ifcfg-eth-id-${ETHIDFILE} /root/ifcfg-eth-id-${ETHIDFILE}.bak
vi /etc/sysconfig/network/ifcfg-eth-id-${ETHIDFILE}

Add configuration as follows:

LABEL_0='0'
IPADDR_0='2607:f0d0:1002:0011:0000:0000:0000:0002'
PREFIXLEN_0='64'

LABEL_0=’0′
IPADDR_0=’2607:f0d0:1002:0011:0000:0000:0000:0002′
PREFIXLEN_0=’64’

Save and close the file. Now, update default IPv6 routing:
# cp /etc/sysconfig/network/routes /root/routes.bak
# echo 'default 2607:f0d0:1002:0011:0000:0000:0000:0001 - -' >> /etc/sysconfig/network/routes

Finally, restart the networking under SLES10:
# service network restart
Test your setup, enter:
# ping6 sxi.io
# ping6 ipv6.google.com

Posted by: SXI ADMIN

The author is the creator of SXI LLC and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.