IPv6测试环境的配置手顺

装机器: 三台PC机器,

通过1个hub连接,1windows,安装成双网卡,1个网卡连接外网,1个网卡连接IPv6环网。系统版本:xp sp3 for japan

2linux机器。操作系统版本:

LSB Version:    :core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-no

arch:printing-4.0-ia32:printing-4.0-noarch

Distributor ID: RedHatEnterpriseServer

Description:    Red Hat Enterprise Linux Server release 6.0 (Santiago)

Release:        6.0

Codename:       Santiago

 

windows机器上的操作步骤 

1.安装ipv6协议栈操作命令如下:

C:\Documents and Settings\Administrator>cd \

cd \

C:\> IPv6 install

 

验证:

C:\>ipconfig | find “fe80”——如果出现fe80的本地链路地址,就表明成功安装

 

2.连到环网网卡手动添加ipv6 global地址 (此处是2块网卡,确定连到环网的网卡很重要 )注:通常的,安装IPv6协议栈后,一块网卡默认网络接口有4个,但是有的时候显示多个,是因为其中一块网卡禁掉了IPv4或者有多块网卡。

查看网卡接口:

C:\>ipv6 if | find “Interface”

Interface 5: Ethernet: Network Connect Adapter

Interface 4: Ethernet: ローカルエリア接続

Interface 3: 6to4 Tunneling Pseudo-Interface

Interface 2: Automatic Tunneling Pseudo-Interface

Interface 1: Loopback Pseudo-Interface

 

interface 1用于回环接口,

interface 2用于自动隧道虚拟接口,

interface 3用于6to4隧道虚拟接口,

interface 4用于正常的网络连接接口,即IPv6地址的单播接口。

 

3.给指定接口配置IPv6地址,操作样例如下:C:\>IPv6 adu 4/3eff:124e::1 //给索引号为4的接口界面配置IPv6地址3eff:124e::1,同样的可以把这个改成其他的global地址

 

验证:

C:\>ping6 2000:3440::1

出现如下信息,即表示配置成功:

Pinging 2000:3440::::1

from 2000:3440::::1 with 32 bytes of data:

 

Reply from 2000:3440::1: bytes=32 time<1ms

Reply from 2000:3440::1: bytes=32 time<1ms

Reply from 2000:3440::1: bytes=32 time<1ms

 

Ping statistics for 2000:3440::1:

    Packets: Sent = 3, Received = 3, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

    Minimum = 0ms, Maximum = 0ms, Average = 0ms

 

4.打开接口4ipv6转发功能C:\>IPv6 ifc 4 forwards

 

5.修改windows的路由表项:示例如下:

C:\> IPv6 rtu 2000:3440::/64   4 //为接口4添加一条路由

 

linux机器上的操作步骤: 1.禁用IPv4(这个为什么要禁用,可以不操作) 2.然后使用ping6分别对链路地址和回环地址进行ping6验证[root@RHEL62GA ~]# ping6 ::1

PING ::1(::1) 56 data bytes

64 bytes from ::1: icmp_seq=1 ttl=64 time=0.028 ms

64 bytes from ::1: icmp_seq=2 ttl=64 time=0.019 ms

2000:3440::64 bytes from ::1: icmp_seq=3 ttl=64 time=0.018 ms

64 bytes from ::1: icmp_seq=4 ttl=64 time=0.037 ms

64 bytes from ::1: icmp_seq=5 ttl=64 time=0.018 ms

64 bytes from ::1: icmp_seq=6 ttl=64 time=0.022 ms

64 bytes from ::1: icmp_seq=7 ttl=64 time=0.028 ms

64 bytes from ::1: icmp_seq=8 ttl=64 time=0.019 ms

64 bytes from ::1: icmp_seq=9 ttl=64 time=0.022 ms

64 bytes from ::1: icmp_seq=10 ttl=64 time=0.025 ms

64 bytes from ::1: icmp_seq=11 ttl=64 time=0.020 ms

64 bytes from ::1: icmp_seq=12 ttl=64 time=0.019 ms

64 bytes from ::1: icmp_seq=13 ttl=64 time=0.021 ms

^C

— ::1 ping statistics —

13 packets transmitted, 13 received, 0% packet loss, time 12016ms

rtt min/avg/max/mdev = 0.018/0.022/0.037/0.007 ms

 

[root@RHEL62GA ~]# ping6 -I eth0 fe80::219:99ff:fe97:7570

PING fe80::219:99ff:fe97:7570(fe80::219:99ff:fe97:7570) from fe80::219:99ff:fe97:7570 eth0: 56 data bytes

64 bytes from fe80::219:99ff:fe97:7570: icmp_seq=1 ttl=64 time=0.034 ms

64 bytes from fe80::219:99ff:fe97:7570: icmp_seq=2 ttl=64 time=0.058 ms

64 bytes from fe80::219:99ff:fe97:7570: icmp_seq=3 ttl=64 time=0.045 ms

64 bytes from fe80::219:99ff:fe97:7570: icmp_seq=4 ttl=64 time=0.046 ms

64 bytes from fe80::219:99ff:fe97:7570: icmp_seq=5 ttl=64 time=0.046 ms

64 bytes from fe80::219:99ff:fe97:7570: icmp_seq=6 ttl=64 time=0.045 ms

^C

— fe80::219:99ff:fe97:7570 ping statistics —

6 packets transmitted, 6 received, 0% packet loss, time 5987ms

rtt min/avg/max/mdev = 0.034/0.045/0.058/0.010 ms

 

3.给网卡添加IPv6 global地址 (默认网卡名为eth0,根据实际情况酌情换成eth1或者eth2)ifconfig eth0 add 2000:3440::2/64

 

②然后进行回环验证:

[root@RHEL62GA ~]# ping6 2000:3440::2

PING 2000:3440::2(2000:3440::2) 56 data bytes

64 bytes from 2000:3440::2: icmp_seq=1 ttl=64 time=0.024 ms

64 bytes from 2000:3440::2: icmp_seq=2 ttl=64 time=0.033 ms

64 bytes from 2000:3440::2: icmp_seq=3 ttl=64 time=0.034 ms

64 bytes from 2000:3440::2: icmp_seq=4 ttl=64 time=0.032 ms

64 bytes from 2000:3440::2: icmp_seq=5 ttl=64 time=0.035 ms

^C

— 2000:3440::2 ping statistics —

5 packets transmitted, 5 received, 0% packet loss, time 4895ms

rtt min/avg/max/mdev = 0.024/0.031/0.035/0.007 ms

 

最后进行3台机器的对ping

:如果添加错误,需要删除:

ifconfig eth0 del 2000:3440::2/64

 

如何判定三者是否连通当然对ping也可以,查看所有接口的邻居缓存,类似于ipv4中的arp缓存(笔者的理解是使用ipv6  nc查看ipv6的临节点,如果环网中的机器硬件地址和状态列匹配,就说明三者可以连通的)

C:\>ipv6 nc

5: fe80::2ff:30ff:fea7:6c89                   incomplete

4: fe80::4637:e6ff:fe29:d451 44-37-e6-29-d4-51 permanent

2: fe80::5efe:10.167.228.103 127.0.0.1         permanent

1:            fe80::1                   permanent

1:                ::1                   permanent

4: 2000:3440::::1  00-AC-01-02-03-58     stale

4: 2000:3440::::2  00-BC-01-ad-03-58     stale

4: 2000:3440::::2  00-BC-02-ad-03-58     permanent

 

windows客户端的使用windows远程操作客户端,这里笔者推荐使用putty6windowslinux机器上传输东西的话,推荐使用winscp3或者使用mount –t cifs(这点在RHEL5上不行,RHEL6暂时未知),当然其他的ftp工具也是可以的,比如psftp。关键step如下,putty界面如图所示:

step1:连接的setting设置成Auto或者IPv6,一般默认为Auto

 

 

step2

 

 

step3

 

 

其他注意事项: 1.默认语言的设置linux装机的时候,请把默认语言设置成日文。如果实在没设置成日文,那么请在安装日文软件之前修改/etc/sysconfig/i18n中的lang值为ja_JP.UTF-8

2.问题点:昨天在默认语言为zh_CN.UTF-8的情况下,装了IAS,之后又卸载,这样第二次再安装IS会不会出现问题,还没有验证。建议对策:安装虚拟机,使用VM-workstation进行管理虚拟机,如果出错了,直接恢复环境,不用再重装系统。

 ping6  -s  sourcelinkadress  fe80::4216:9fff:fef2:8caf

声明:本文采用 BY-NC-SA 协议进行授权,本文链接:IPv6测试环境的配置手顺

发表评论