最近因為許多政府單位,教育機構進行IPv6 升級,所以也開始摸索各種系統該如何設定IPv6
基本上Windows Vista 、Windows 7、Windows Server 2008 R2設定IPv6 都非常簡易,唯獨Windows Server 2003 設定IPv6過程較為繁瑣(只有CLI介面),以下為安裝及設定Windows Server 2003 IPv6紀錄
1. 安裝IPv6套件
2. 設定IPv6 IP & DNS IPv6
3. 增加IPv6 路由
4. 測試IPv6運作
1. 安裝IPv6套件
開始 >> 執行 >> cmd
執行netsh
C:Documents and SettingsAdministrator>netsh
執行interface
netsh>interface
執行ipv6
netsh interface>ipv6
執行install
# netsh interface ipv6>install
確定。
查詢目前介面show address,這邊可以看到我們區域網路的介面是在5
netsh interface ipv6>show address
正在查詢使用中的狀態...
介面 5: 區域連線
位址類型 DAD 狀態 有效存留時間 偏好存留時間 位址
--------- ---------- ------------ ------------ -----------------------------
連結 偏好 infinite infinite fe80::250:56ff:fe83:6455
介面 4: Teredo Tunneling Pseudo-Interface
位址類型 DAD 狀態 有效存留時間 偏好存留時間 位址
--------- ---------- ------------ ------------ -----------------------------
連結 偏好 infinite infinite fe80::ffff:ffff:fffd
介面 2: Automatic Tunneling Pseudo-Interface
位址類型 DAD 狀態 有效存留時間 偏好存留時間 位址
--------- ---------- ------------ ------------ -----------------------------
連結 偏好 infinite infinite fe80::5efe:192.168.10.53
介面 1: Loopback Pseudo-Interface
位址類型 DAD 狀態 有效存留時間 偏好存留時間 位址
--------- ---------- ------------ ------------ -----------------------------
回送 偏好 infinite infinite ::1
連結 偏好 infinite infinite fe80::1
2. 設定IPv6 IP & DNS IPv6
設定固定IPv6在系統上
執行add adddress 區域網路介面 address=ipv6 store=persistent
store=persistent 永久儲存此IP
netsh interface ipv6>add address 5 address=2001:b030:10c:10::53 store=persistent
確認是否生效
執行show interface
netsh interface ipv6>show interface
正在查詢使用中的狀態...
介面 5: 區域連線
位址類型 DAD 狀態 有效存留時間 偏好存留時間 位址
--------- ---------- ------------ ------------ -----------------------------
手動 偏好 infinite infinite 2001:b030:10c:10::53
連結 偏好 infinite infinite fe80::250:56ff:fe83:6455
介面 4: Teredo Tunneling Pseudo-Interface
位址類型 DAD 狀態 有效存留時間 偏好存留時間 位址
--------- ---------- ------------ ------------ -----------------------------
連結 偏好 infinite infinite fe80::ffff:ffff:fffd
介面 2: Automatic Tunneling Pseudo-Interface
位址類型 DAD 狀態 有效存留時間 偏好存留時間 位址
--------- ---------- ------------ ------------ -----------------------------
連結 偏好 infinite infinite fe80::5efe:192.168.10.53
介面 1: Loopback Pseudo-Interface
位址類型 DAD 狀態 有效存留時間 偏好存留時間 位址
--------- ---------- ------------ ------------ -----------------------------
回送 偏好 infinite infinite ::1
連結 偏好 infinite infinite fe80::1
設定DNS IPv6
執行add dns interface=”區域連線” address=ipv6
netsh interface ipv6>add dns interface="區域連線" address=2001:b030:10c:10::30
netsh interface ipv6>show dns
在下列介面上的 DNS 伺服器: 區域連線
索引 DNS 伺服器
----- -----------------------------------------------
1 2001:b030:10c:10::30
3. 增加IPv6 路由
接下來設定Default Gateway
執行add route ::/0 區域網路介面 GatewayIP
netsh interface ipv6>add route ::/0 5 2001:b030:10c:10::ffff
確認路由
執行show route
netsh interface ipv6>show route
正在查詢使用中的狀態...
發行 類型 公制 首碼 索引 閘道/介面名稱
------- -------- ---- ------------------------ --- ---------------------
no 手動 0 ::/0 5 2001:b030:10c:10::ffff
no 自動設定 256 ::/0 5 fe80::217:c5ff:feb0:858c
no 自動設定 8 2001:b030:10c:10::/64 5 區域連線
no 自動設定 256 ::/0 5 fe80::2b8:c9ff:fe11:239e
設定完成後,離開ipv6設定
執行exit
4. 測試IPv6運作
使用ping ::1 (loopback)確認IPv6運作正常
C:Documents and SettingsAdministrator>ping ::1
Pinging ::1 from ::1 with 32 bytes of data:
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Ping statistics for ::1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
使用ping 本身IP 確認IP
C:Documents and SettingsAdministrator>ping 2001:b030:10c:10::53
Pinging 2001:b030:10c:10::53 from 2001:b030:10c:10::53 with 32 bytes of data:
Reply from 2001:b030:10c:10::53: time<1ms
Reply from 2001:b030:10c:10::53: time<1ms
Reply from 2001:b030:10c:10::53: time<1ms
Reply from 2001:b030:10c:10::53: time=1ms
Ping statistics for 2001:b030:10c:10::53:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
使用ping DNS IP
C:Documents and SettingsAdministrator>ping 2001:b030:10c:10::ffff
Pinging 2001:b030:10c:10::30 from 2001:b030:10c:10::53 with 32 bytes of data:
Reply from 2001:b030:10c:10::30: time=1ms
Reply from 2001:b030:10c:10::30: time<1ms
Reply from 2001:b030:10c:10::30: time<1ms
Reply from 2001:b030:10c:10::30: time<1ms
Ping statistics for 2001:b030:10c:10::30:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
使用ping Gateway IP
C:Documents and SettingsAdministrator>ping 2001:b030:10c:10::ffff
Pinging 2001:b030:10c:10::ffff from 2001:b030:10c:10::53 with 32 bytes of data:
Reply from 2001:b030:10c:10::ffff: time=1ms
Reply from 2001:b030:10c:10::ffff: time<1ms
Reply from 2001:b030:10c:10::ffff: time<1ms
Reply from 2001:b030:10c:10::ffff: time<1ms
Ping statistics for 2001:b030:10c:10::ffff:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
使用ping 遠端IP,確認IPv6網路是否正常
C:Documents and SettingsAdministrator>ping ipv6.google.com
Pinging ipv6.l.google.com [2404:6800:4008:c01::68] from 2001:b030:10c:10::53 with 32 bytes of data:
Reply from 2404:6800:4008:c01::68: time=16ms
Reply from 2404:6800:4008:c01::68: time=20ms
Reply from 2404:6800:4008:c01::68: time=15ms
Reply from 2404:6800:4008:c01::68: time=15ms
Ping statistics for 2404:6800:4008:c01::68:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 15ms, Maximum = 20ms, Average = 16ms
大概到這裡,基本上IPv6已經完全通了,如果有發現IP設定錯誤可以使用del來做刪除
del ip
netsh interface ipv6>del address 5 address=2001:b030:10c:10::53 store=persistent
del dns
netsh interface ipv6>del dns interface="區域連線" address=2001:b030:10c:10::30
del route
netsh interface ipv6>del route ::/0 5 2001:b030:10c:10::ffff
清空IPv6
netsh interface ipv6>reset
移除IPv6
netsh interface ipv6>uninstall
Refer:
http://support.microsoft.com/kb/325449/zh-tw
http://note.tc.edu.tw/358.html