Skip to content

在 Windows Server 中设置 IP 地址

在这篇文章中

信息

Netsh 实用程序用于在 Windows Server 操作系统中配置 IP 地址。

如何配置 DHCP

警告

根据服务条款及网站使用条款,禁止在外部以太网接口上启用 DHCP 服务。

安装自动启动类型的 DHCP 服务:

netsh interface ip set address "LOCAL_AREA_CONNECTION" dhcp

如何设置静态 IP 地址

netsh interface ip set address "YOUR_IP_ADRESS" "SUBNET_MASK"

默认子网掩码为 - 255.255.255.0。

DNS 服务器配置:

netsh interface ip set dns "INTERFACE_NAME" static 10.10.10.1

应用配置

您应输入以下命令以检查静态 IP 地址是否正确配置:

ipconfig /all
netsh interface ip set address auto
netsh interface ip set address ""INTERFACE_NAME"" dhcp
question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×