Suse Linux ( SLES10 ) IPv6 Configuration

來源:互聯網
上載者:User

文章目錄
  • Our Sample IPv6 Setup
  • Task: Adding An IPv6 Address
  • Task: Adding A Default Route
  • Task: Display your IPv6 IP addresses configuration
  • Task: Testing your 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 www.cyberciti.biz

Sample output:

PING6(56=40+8+8 bytes) 2607:f0d0:3001:9::2 --> 2607:f0d0:1002:11::416 bytes from 2607:f0d0:1002:11::4, icmp_seq=0 hlim=60 time=34.481 ms16 bytes from 2607:f0d0:1002:11::4, icmp_seq=1 hlim=60 time=34.207 ms16 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' 

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 www.cyberciti.biz
# ping6 ipv6.google.com

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

Tags Index: