Some additional information about IPv6 support and configuration is available from the CentOS wiki at:
http://wiki.centos.org/FAQ/CentOS5
These are the steps I followed to get IPv6 to work.
Edit the network file:
vi /etc/sysconfig/network
Set IPv6 networking to ‘yes’:
NETWORKING_IPV6=yes
Exit and save these changes.
Option 1, EUI-64 auto-assigned IPv6 address:
Edit the interface file:vi /etc/sysconfig/network-scripts/ifcfg-eth0
If you want to have an auto-assigned IPv6 address based on EUI-64 auto-configuration:
DEVICE=eth0 ONBOOT=yes BOOTPROTO=none HWADDR=00:13:21:0D:0D:B9 # Required for EUI-64 auto addressing. DHCP_HOSTNAME=v6LAB-WWW1.opr.test.statefarm.org IPV6INIT=yes # Enables IPv6 addressing on interface. IPV6_AUTOCONF=yes # Enables EUI 64 auto-addressing. #IPV6ADDR= #IPV6_DEFAULTGW=
HWADDR and DHCP_HOSTNAME should be updated to match the specifics of each server but is likely automatically configured from install.
Exit and save these changes.
Option 2, static IPv6 address:
Edit the interface file:vi /etc/sysconfig/network-scripts/ifcfg-eth0
So it the file should look something like this:
DEVICE=eth0 ONBOOT=yes BOOTPROTO=none HWADDR=00:13:21:0D:0D:B9 # Required for EUI-64 auto addressing. # Optional for static. DHCP_HOSTNAME=v6LAB-WWW1.opr.test.statefarm.org IPV6INIT=yes # Enables IPv6 addressing on interface. IPV6_AUTOCONF=no IPV6ADDR=AAAA::260:3EFF:FE11:5001 IPV6_DEFAULTGW=AAAA::260:3EFF:FE11:6780
HWADDR, DHCP_HOSTNAME , IP6ADDR, and IPV6_DEFAULTGW should be updated to match the specifics of each server.
Exit and save these changes.
Restart the interfaces with the new options:
service network restart
If there is no error message, IPv6 setup is complete. Jump to IPv6 Test and Validation.
If you get this kernel error:
CRITICAL : [ipv6_test] Kernel is not compiled with IPv6 support
See the section for Enabling IPv6 on CentOS 5.6 Kernal (if needed).
Enabling IPv6 on CentOS 5.6 Kernal (if needed)
The kernel options to support IPv6 on the Ethernet modules need to be enabled. Edit the module probe configuration file:vi /etc/modprobe.conf
Search for these two lines and comment them out if they exist:
#alias net-pf-10 off #alias ipv6 off
And change this one from ‘1’ to ‘0’:
options ipv6 disable=0
So these lines look like this:
#Uncomment the next two lines to disable IPv6 support at boot. #alias net-pf-10 off #alias ipv6 off #Swap commented/uncommented lines below to disable IPv6 support at boot. #options ipv6 disable=1 options ipv6 disable=0
The only way for the new module options to take place is by a reboot:
shutdown –r now
IPv6 Test and Validation
With IPv6 enabled, we can confirm the interface has at least two IPv6 addresses. A global and a link(local) address:[root@v6LAB-W1 ~]# ifconfig eth0 Link encap:Ethernet HWaddr 00:13:21:0D:0D:B9 inet6 addr: aaaa::213:21ff:fe0d:db9/64 Scope:Global inet6 addr: fe80::213:21ff:fe0d:db9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:63 errors:0 dropped:0 overruns:0 frame:0 TX packets:96 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:6813 (6.6 KiB) TX bytes:15909 (15.5 KiB) Interrupt:209 Memory:fdef0000-fdf00000
We can ping the router (like Windows, the command is ping6):
[root@v6LAB-W1 ~]# ping6 aaaa::260:3eff:fe11:6780 PING aaaa::260:3eff:fe11:6780(aaaa::260:3eff:fe11:6780) 56 data bytes 64 bytes from aaaa::260:3eff:fe11:6780: icmp_seq=0 ttl=64 time=0.594 ms 64 bytes from aaaa::260:3eff:fe11:6780: icmp_seq=1 ttl=64 time=0.541 ms 64 bytes from aaaa::260:3eff:fe11:6780: icmp_seq=2 ttl=64 time=0.529 ms 64 bytes from aaaa::260:3eff:fe11:6780: icmp_seq=3 ttl=64 time=0.546 ms --- aaaa::260:3eff:fe11:6780 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3001ms rtt min/avg/max/mdev = 0.529/0.552/0.594/0.034 ms, pipe 2 [root@v6LAB-W1 ~]#
If we console into the router, we can ping our new server:
v6LAB-R1# v6LAB-R1#ping aaaa::213:21ff:fe0d:db9 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to AAAA::213:21FF:FE0D:DB9, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/4 ms v6LAB-R1#
And ssh to it:
v6LAB-R1# v6LAB-R1#ssh -l root aaaa::213:21ff:fe0d:db9 Password: Last login: Wed May 25 05:48:50 2011 from localhost6.localdomain6 [root@v6LAB-W1 ~]# [root@v6LAB-W1 ~]#
Apache/HTTPD configuration
No special configuration is necessary to enable IPv6 requests on Apache.After installing Apache, it needs to be set to start at boot using this command:
[root@v6LAB-W1 ~]#chkconfig --level 2345 httpd on