Windows XPでIPv6

いっこうに普及が進まないIPv6だが、Windows XPのSP1以降は標準でIPv6に対応している。ただし標準セットアップではIPv6スタックはインストールされず、ユーザがコマンドラインでインストールする必要がある。

やることは実に簡単で、コマンドプロンプトで以下のコマンドを打つだけ。

C:\ipv6 install
Installing...
Succeeded.

C:\

IPv6ルータが同一サブネット上にいない場合、Windowsはリンクローカルアドレスだけを自分で生成する。よってこのアドレスを使えばPC同士は通信ができる。アドレスを確認するにはIPv4と同様にipconfigコマンドを使う。IPv6アドレスの最後についている%の後の数字はインターフェースを識別する連番。fe80で始まるリンクローカルアドレスはネットワークを識別できないので、インターフェースで識別する。

C:¥>ipconfig

Windows IP Configuration

Ethernet adapter wlan0:

        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . : 192.168.0.7
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        IP Address. . . . . . . . . . . . : fe80::219:7eff:fe4b:f6b%5
        Default Gateway . . . . . . . . . : 192.168.0.2

Tunnel adapter Teredo Tunneling Pseudo-Interface:

        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . : fe80::ffff:ffff:fffd%4
        Default Gateway . . . . . . . . . :

Tunnel adapter Automatic Tunneling Pseudo-Interface:

        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . : fe80::5efe:192.168.0.7%2
        Default Gateway . . . . . . . . . :

C:¥>

ちゃんと設定してあるIPv6ルータがネットワーク上にいる場合、そのルータからグローバルアドレスとデフォルトゲートウェイを取得する。つまりIPv4ではDHCPが必要だったIPアドレスとデフォルトゲートウェイの自動設定を、IPv6は標準的に実現している。

C:¥>ipconfig

Windows IP Configuration

Ethernet adapter wlan0:

        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . : 192.168.0.7
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        IP Address. . . . . . . . . . . . : fd00:192:168:0:2c9c:62b1:1de3:b294
        IP Address. . . . . . . . . . . . : fd00:192:168:0:219:7eff:fe4b:f6b
        IP Address. . . . . . . . . . . . : fe80::219:7eff:fe4b:f6b%8
        Default Gateway . . . . . . . . . : 192.168.0.2
                                            fe80::21b:78ff:fe9e:d66b%8

Tunnel adapter Teredo Tunneling Pseudo-Interface:

        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . : fe80::ffff:ffff:fffd%4
        Default Gateway . . . . . . . . . :

Tunnel adapter Automatic Tunneling Pseudo-Interface:

        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . : fe80::5efe:192.168.0.7%2
        Default Gateway . . . . . . . . . :

なおpingコマンド、tracertコマンド、telnetコマンドはそのままIPv6アドレスを使うことができる。ただし宛先がリンクローカルアドレスである場合、%数字によるインターフェース指定が必要。