1. IPv6 address overview
1.1 IPv6 address model
The IPv6 address is a 128-bit identifier assigned to an interface or a set of interfaces. The IPv6 address has the following three categories: unicast address, preference address, multicast address.
Unicast Address: Assigned to a single interface, the destination address is a packet of a unicast address will be identified by the address.
ANYCAST Address: Assigned to a set of interfaces, which can belong to different nodes, and the target address is a packet of the field of fields will be sent to one of the interfaces identified by the address. The interface is one of the shortest routes determined by the distance standard in the routing protocol.
Multicast Address: Assigned to a set of interfaces that can belong to different contacts, and the target address is an interface that the multicast address will be sent to all interfaces identified by the address. There is no broadcast address in IPv6, but is replaced by the multicast address.
All types of IPv6 addresses are assigned to the interface, and all interfaces require at least one link local unicast address. A single interface may be assigned multiple IPv6 addresses of any type or range.
The IPv6 address has the characteristics of use, divided into three types of Link-local site-local global.
IPv6 addresses have the concept of life cycle,
1.2 IPv6 address syntax
The IPv6 address is in 16 bits, each 16 is one unit and in: Separates, such as: 3FFE: 3600: 4368: 1234: 0008: AB12: 98CE: 1000. At the same time, it is concluded to keep writing, stipulates that 0 of the numbers can be omitted, and the continuous unit is 0 can be used :: represents only once within an address. Such as 3FFE: 3600: 4368: 1234: 8: AB12: 98CE: 1000. Also metaphor 3ffe: 3600 :: 1 is 3FFE: 3600: 0000: 0000: Similar 3ffe: 3600 :: 3: 0000: 1 is 3ffe: 3600: 0000: 0000: 0000: 0003聽聽 聽聽 聽聽 聽聽 聽聽 聽聽 聽聽 聽聽 聽聽 聽聽 聽聽 聽聽 聽聽 聽聽 聽聽
1.3 IPv6 address prefix
IPv6 address prefix
1.4 IPv6 special address
Ø Not specified address
[0000: 0000: 0000: 0000: 0000: 0000: 0000: 0000] or [::]
Ø loopback address
[0: 0: 0: 0: 0: 0: 0: 1] or [:: 1]
Ø IPv6-compatible address
[0: 0: 0: 0: 0: 0: w.c.x.z] or [:: w.c.x.z]
Ø IPv4-mapped address
[0: 0: 0: 0: 0: fff: w.c.x.z] or [:: fff: w.c.x.z]
Ø NSAP (NetWork Service Access Point)
Prefix [0000001]
Ø IPX (InternetWork Packet Exchange)
Prefix [0000010]
2. Brief introduction of the experimental environment
This test environment is selected on the Fedora Core 1 and Windows 2003 platform, and the entire running network diagram is as follows:
3. Platform configuration
The test platform is divided into two types, one is a Windows platform, and the Windows platform is divided into Windows 2003 and Windows 2000 IPv6 patches. The other is the Linux platform, mainly for Fedora Core 1, which is described herein:
3.1 Fedora Core 1 Platform
1) Test if the Linux kernel supports IPv6
Test -f / proc / net / if_inet6 && echo "Running kernel is IPv6 ready" 2) Detecting the IPv6 module is installed in, generally installed
INSMOD IPv6
3) Detect whether IPv6 module has been hang the system
# modProbe -c | grep net-pf-10
Alias Net-PF-10 OFF If you return to OFF to open the / etc / sysconfig / network file with the VI, join the following sentence: networking_ipv6 = yes
4) Restart Network Service Service Network Restart
5) Recheck if the IPv6 module has been added:
MODPROBE-C | GREP IPv6
Alias Net-PF-10 IPv6
6) Confirm that IPv6 is installed successfully
LSMOD | grep -w 'ipv6' && echo "IPv6 Module Success,"
7) Confirm that IPv6 is installed by command
Ping6 traceroute6 telnet6 ifconfig route
Ping6 -i eth0 Fe80 :: 250: BAFF: FE69: 2D08
8) Show current IPv6 address
# ifconfig -a
# ip -6 addr show dev eth0
9) Add IPv6 address
# / sbin / ip -6 Addr add
# / sbin / ifconfig
10) Delete IPv6 Address
# / sbin / ip -6 addr
Del
# / sbin / ifconfig
Del
11) Script settings
Add to / etc / sysconfig / network-scripts / ifcfg-
IPv6init = YES
IPv6Addr = "
Add in / etc / sysconfig / network
IPv6init = YES
Networking = yes
IPv6_defaultgw = "
3.2 Install IPv6 on Windows 2003
Windows 2003 itself has fully supported IPv6, so you can directly configure it directly, click on the network neighbor, right-click Open "Local Connection", right click to open the property, click "Install", find "Agreement", click "Add" to find the "Microsoft IPv6 Agreement"
If the installation is successful, you can see the IPv6 protocol stack in the properties of the local connection, as shown below:
3.3 Install IPv6 on Windows 2000
a) Check the Windows 2000SP version
Running IPv6 on Windows 2000 usually requires a SP version. You can view the Windows version: Type Winver in the command line, indicate that the current Windows installation version is displayed, click on the desktop "My Computer" property, and open the normal, you can see the following: b) Install the patch package
From ftp://10.8.164.230, upload patch package TPIPv6-001205-sp3-ie6.zip decompressed and execute hotfix.exe under the setup directory, restart, remove all of Hotfix.exe outside HotFix.exe after restarting The file is copied to System32 in the operating system directory; simultaneously configure the Windows IPv6 protocol as WINDOWS 2003.
3.4 IPv6 installed on Windows XP
A. Run IPv6 INSTALL in the command line
B. Check if you have successful IPv6 if
3.5 Solaris 8 Install IPv6
1) View the current IPv4 configuration
# ifconfig -a get the current network card number
2) Establish a hostname6 file
# Touch Hostname6.?? For the NIC number
3) Reboot restart machine
4) VI / ETC / INET / ipnodes join a line
2001: 218: 466: 1000: A00: 20F: Fe88: A683 ITNetv6
5) Configure static addresses using ifconfig
Ifconfig bge0 inet6 Addif 2001: 250: F004: 400 :: D230: 89EA / 64 UP
Route Add -inet6 Default 2001: 250: F004: 400 :: 1 -IFP BGE0
4. Application software configuration
4.1 JDK installation
1) Download JDK
1.5.0
For Linux version
Download from ftp://10.8.164.230/software, or downloaded from java.sun.com, select 32-bit Linux RPM version. If it is self-extracting version, see Rear Self-extracting installation instructions.
2) Unstart the compressed document
Add execution permissions and execute the bin file.
# Chmod a x jdk-1_5_0-linux-i586-rpm.bin
#. / jdk-1_5_0-linux-i586-rpm.bin
Get a JDK-1_5_0-Linux-I586-RPM file in the current directory
3) Install the RPM package
Use the su command to the root user, and execute
RPM-IV JDK-1_5_0-Linux-I586-RPM
4) Exit the root account and delete bin and rpm files
5) Install the JDK of the self-extracting version can be executed directly, the default is installed in USR / JAVA / under
6) Configure java_home
Open file ETC / .profile or /Root/.bash.rc Add to Download
Export java_home = / usr / java / jdk
1.5.0
Export Path = $ PATH: $ java_home / bin
Export ClassPath = $ java_home / lib
7) Execute the test command
# java -version
# javac
#echo $ java_home
4.2 Apache HTTP Server
Apache HTTP Server is generally used in static web pages, the speed is much faster than Tomcat, so many websites are built through Apache HTTP Server and Tomcat, and Apache Http Server will use the Apache Portable Running Libray library to start support IPv6 in Fedora. Core 1 installed an apache2.0.47 default
However, it defaults to enable-v4-mapped is also to use mapping IPv6 addresses for IPv4-based address access, which is a brief description of the management method of Apache HTTP Server default installation:
1) Open, stop, restart Apache
# /etc/rc.d/init.d/httpd start
# ApachectL
# / etc / rc.d / init.d / httpd stop
# / etc / rc.d / init.d / httpd restart
2) Configure Apache
Vi /etc/httpd/conf/httpd.conf modifies some of these parameters for configuration
The Apache reinstalling the process is as follows.
Download the Apache Release Pack from the Apache website or download software from ftp://10.8.164.230/softerware, httpd-
2.0.50
-i686-pc-linux-gnu.tar.gz
1) Unzip to the specified directory such as / OPT /
Tar -zxvf httpd-
2.0.50
-i686-pc-linux-gnu.tar.gz
2) Enter the directory generated in the current directory httpd-
2.0.50
3) Perform the installation process
./configure --enable-v4-mapped = no --prefix = / usr / local / apache --enable-module = so
Make
Make Install
4) Start the Apache service
# / usr / local / apache / bin / apachectl start
5) Configure Apache
# vi /usr/local/apache/conf/httpd.conf
Join the following:
Listen 10.8.164.226:80
Listen [2001: 250: F004: 400 :: D219: 89EA]: 80
This is a single Listen
4.3 Apache Tomcat Server
Tomcat usually makes a servlet container that implements server application technology based on Java Servlet / JSP technology. So far, the development version is as follows:
Servlet specification JSP specification JDK version Tomcat version 2.4 2.0
1.5.0
5.0.25
2.3 1.2 1.4
4.1.30
2.2 1.1 1.3
3.3.2
1) Download Tomcat Software
From ftp://10.8.164.230/soft or from http:// http://jakarta.apache.org/site/binindex.cgi. Download JAKARTA-Tomcat
5.0.29
.tar.gz package
2) Install Tomcat
Copy software package to the specified installation directory
# cp jakarta-tomcat-
5.0.29
.TAR.GZ / OPT copy to the specified directory
# TAR -ZXVF JAKARTA-TOMCAT-
5.0.29
.tar.gz decompressed to the current directory
# ln -s jakarta-tomcat-
5.0.29
Tomcat creates a connection directory
3) Configure Tomcat environment variables
Add a line of export catalina_home = / opt / tomcat in ETC / .profile or /Root/.bashrc and restart the machine
4) Test service can start
Under the directory / opt / tomcat / bin ./startup.sh start or ./shutdown.sh stop If you cannot execute, you can add execution permission to the following files:
# chmod x startup.sh
# chmod x shutdown.sh
# chmod x tomcat.sh
Open the web browser to knock http: // localhost: 8080 / show Tomcat welcome interface
5. Common configuration test tool
5.1 ipv6.exe
WINDOWS XP / 2000 uses IPv6.exe to configure, open the command line window, perform IPv6, you can see the following help information, summarize some of these common commands:
USAGE: IPv6 if [ifindex]
IPv6 IFC ifindex [Forwards] [-forwards] [Advertises] [-advertises] [MTU #
BYTES] [Site Site-Identifer]
IPv6 IFD IFINDEX
IPv6 adu ifindex / address [Lifetime Validlifetime [/ preflifetime]] [Anycast
] [unicast]
IPv6 nc [ifindex [address]]
IPv6 ncf [ifindex [address]]
IPv6 rc [ifindex address]
IPv6 RCF [ifindex [address]]]
IPv6 BC
IPv6 RT
IPv6 RTU prefix ifindex [/ address] [Lifetime L] [Preference P] [Publish] [
AGE] [SPL SitePrefixlength]
IPv6 SPT
IPv6 SPU prefix ifindex [Lifetime L]
1) Install the IPv6 protocol stack
Use the IPv6 Install / Uninstall command to install and uninstall the IPv6 protocol stack in the Windows XP platform. Install the patch on Windows 2000.
2) Display interface configuration information
List all interface information Use the command IPv6 if or ipconfig / all, if you want to see the specific interface information, you can use the command IPv6 if interface ID
3) Add IPv6 address
IPv6 ADU ifindex / Address, like IPv6 ADU 6/2001: 250: F004: 400 :: D155: 89EA
4) Add route
IPv6 RTU 2001: 250: F004: 400 :: / 64 6
5) Delete IPv6 addresses
IPv6 ADU ifindex / address Life 0, like IPv6 ADU 6/2001: 250: F004: 400 :: D155: 89EA Life 0
6) View routing table
IPv6 RT
5.2 Netsh.exe
The Netsh command already exists in Windows 2000 and XP, but does not implement the configuration of IPv6, starting to unify it in NetSh in Windows 2003 for configuration. Conceptual configuration can be viewed?
5.3 Checkv4.exe
You can modify the C language program based on Windows socket development.
5.4 ping.exe / ping6.exe
The ping command is primarily used to use ping, using ping on Solaris, using ping6 on Linux / Windows. Generally, if the link address is used, you want to use a Ping Direction to send a Ping Directive, such as ping6 -i eth0 Fe80 :: 210: 5cff: FEAD : 81b8
6. Java development and IPv6
Java is based on object-oriented, and therefore, the application for application for IPv6 is relatively small, and this is mainly involved in some classes:
Representative n-InetAddress IP address, the following two sub-classes Inet4Address Inet6Address in the exact and, unless it is known in general protocol address information or request is not used subclass, add the following methods in the InetAddress: isAnyLocalAddress isLoopbackAddress isLinkLocalAddress isSiteLocalAddress isMCglobal isMCNodeLocal IsmClinkLocal Ismcorglocal getCanonicalHostName getByaddr
n Socket Serversocket DataGramsocket has no change, depending on the operating system implementation during the actual process
N MulticastSocket changes larger
N URL URI parsing reference is based on RFC 2732., that is, in IPv6 addresses []
7. Development of SNMP and IPv6
7.1 Westhawk
Based on Java implementation, free commercial support, http://snmp.westhawk.co.uk/index.html, support SNMPv1 V3, IPv6 does not support IPv6, the following basic functions are implemented:
7.2 Net-SNMP
Support IPv6 (from
5.1.1
After the version, there is a Java-based NetSnmpj
8. Database & IPv6
Sybase
12.5.2
Start full support IPv6, Oracle
10g
Release 2 starts full support IPv6, MySQL needs a patch package