0

我想使用 netsh 设置 IP 地址、子网和网关。我的电脑上有 Windows XP。当我键入命令时:

set address "Local Area Connection" static ipAdd sub gateway

我收到此错误:

环境变量地址“本地连接”静态ipAdd子网关未定义

当我输入:

netsh interface ip  set address "Local Area Connection" static ipAdd sub gateway

我得到一个不同的错误:

the following command was not found.

DNS 和 WINS 详细信息已成功设置,我可以通过在 Internet 协议面板中键入它们来设置 IP 设置。

4

1 回答 1

1

通过 netsh 设置 ip 地址命令的正确语法是:

netsh interface ip set address name="Local Area Connection" static 192.168.0.20 255.255.255.0 192.168.0.1 1

并使用下一行设置 dns:

netsh interface ip set dns "Local Area Connection" static 192.168.0.200 primary

添加辅助 dns:

netsh interface ip add dns "Local Area Connection" 192.168.0.201 index=2

这是一个链接

于 2011-11-02T08:25:14.283 回答