我們在 Windows 2000 的 cmd shell 下,輸入 netsh 就出來:netsh> 提示符, 輸入 int ip 就顯示: interface ip> 然后輸入 dump ,我們就可以看到當前系統的網絡配置:
# ---------------------------------- # Interface IP Configuration # ---------------------------------- pushd interface ip
# Interface IP Configuration for "Local Area Connection"
set address name = "Local Area Connection" source = static addr = 192.168.1.168 mask = 255.255.255.0 add address name = "Local Area Connection" addr = 192.1.1.111 mask = 255.255.255.0 set address name = "Local Area Connection" gateway = 192.168.1.100 gwmetric = 1 set dns name = "Local Area Connection" source = static addr = 202.96.209.5 set wins name = "Local Area Connection" source = static addr = none
popd # End of interface IP configuration
上面介紹的是通過交互方式操作的一種辦法。 我們可以直接輸入命令: "netsh interface ip add address "Local Area Connection" 10.0.0.2 255.0.0.0" 來添加 IP 地址。