命令行配置 IP 和 DNS (Windows)

2010-11-29 Jerry 系统

配置 IP 静态地址

netsh interface ip set address name="本地连接" source=static addr=*.*.*.*

配置 IP 自动获取

netsh interface ip set address name="本地连接" source=dhcp

配置 DNS 服务器静态地址

netsh interface ip set dns name="本地连接" source=static addr=*.*.*.*

netsh interface ip add dns name="本地连接" addr=*.*.*.* index=2

配置 DNS 服务器自动获取

netsh interface ip set dns name="本地连接" source=dhcp register=PRIMARY

设置默认网关

netsh interface ip set address name="本地连接" gateway=192.168.1.1 gwmetric=0

显示连接配置

netsh interface ip show config 本地连接

参考:http://technet.microsoft.com/zh-cn/library/cc778925(WS.10).aspx

标签: Windows DNS ip


发表评论:

Powered by emlog sitemap