利用netsh工具配置Windows系统TCP/IP
2016-10-04 21:10
651 查看
在特定场合有时需要使用netsh工具配置Windows系统TCP/IP,下面简要说明常用配置命令。
1.设置固定IP地址、子网掩码:
netsh interface ip set address name="本地连接"source=static addr=192.168.0.12 mask=255.255.255.0
2.设置默认网关:
netsh interface ip set address name="本地连接"gateway=192.168.0.254 gwmetric=0
3.设置首选DNS:
netsh interface ip set dns name="本地连接"source=static addr=192.168.0.1 register=primary
4.设置备用DNS:
netsh interface ip add dns name="本地连接"addr=114.114.114.114 index=2
5.设置WINS:
netsh interface ip set wins name="本地连接"source=static addr=none
6.设置自动获取IP地址:
netsh interface ip set address name="本地连接"source=dhcp
7.设置自动获取DNS地址:
netsh interface ip set dns name="本地连接"source=dhcp
8.导出导入配置:
导出TCP/IP配置:netsh -c interface ip dump > c:\tcpip.txt
导入TCP/IP配置:netsh -f c:\tcpip.txt
备注:
上述命令1,2可合并简写为:netsh interface ip set address "本地连接" static 192.168.0.12 255.255.255.0192.168.0.254 0
上述命令3可简写为:netshinterface ip set dns "本地连接" static 192.168.0.1 其它命令简写类似。
1.设置固定IP地址、子网掩码:
netsh interface ip set address name="本地连接"source=static addr=192.168.0.12 mask=255.255.255.0
2.设置默认网关:
netsh interface ip set address name="本地连接"gateway=192.168.0.254 gwmetric=0
3.设置首选DNS:
netsh interface ip set dns name="本地连接"source=static addr=192.168.0.1 register=primary
4.设置备用DNS:
netsh interface ip add dns name="本地连接"addr=114.114.114.114 index=2
5.设置WINS:
netsh interface ip set wins name="本地连接"source=static addr=none
6.设置自动获取IP地址:
netsh interface ip set address name="本地连接"source=dhcp
7.设置自动获取DNS地址:
netsh interface ip set dns name="本地连接"source=dhcp
8.导出导入配置:
导出TCP/IP配置:netsh -c interface ip dump > c:\tcpip.txt
导入TCP/IP配置:netsh -f c:\tcpip.txt
备注:
上述命令1,2可合并简写为:netsh interface ip set address "本地连接" static 192.168.0.12 255.255.255.0192.168.0.254 0
上述命令3可简写为:netshinterface ip set dns "本地连接" static 192.168.0.1 其它命令简写类似。
相关文章推荐
- 搭建Windows系统下php开发环境有很多种方式,比如LAMP的配置、php IDE和调试工具的选择等等。根据每个人喜好不同有很多配置方式。这里主要介绍的是利用XAMPP集成安装和配置apache、
- windows下,用命令行进行系统的TCP/IP设置
- Redhat中通过命令工具和配置文件设置TCP/IP参数的方法
- 利用Windows自带磁盘清理工具给系统“瘦身”
- Windows Server 2008系统如何配置TCP/IP
- Windows 网络命令行配置工具 netsh
- 用Netsh快速切换网络TCP/IP配置(from:http://www.aspxboy.com/private/showthread.asp?postid=419)
- [转]Windows下netsh配置网络DNS,IP,Gateway
- 使用netsh.exe配置TCP/IP
- windows系统手动配置ipv6地址(使用netsh)图文教程
- 使用Netsh命令修改Windows系统的ip、网关及DNS
- Windows TCP/IP 故障排除工具
- Redhat中通过命令工具和配置文件设置TCP/IP参数的方法
- 使用netsh.exe配置TCP/IP
- Linux网络管理员手册(5) 第五章 配置TCP/IP网络 proc文件系统 设置主机名 分配IP地址 IP的接口配置 以太网接口
- 利用协议分析工具学习TCP/IP并捕获内网用户密码
- Windows 2000或Windows NT的TCP/IP和NBT配置参数
- Redhat中通过命令工具和配置文件设置TCP/IP参数的方法
- 修改windows、linux、aix等系统TCP/IP 参数
- Redhat中通过命令工具和配置文件设置TCP/IP参数