netsh 查本机IP的方法如下:开始》运行>CMD>netsh interface ip show address

netsh即network shell,是一个windows系统本身提拱的功能强大的网络配置命令:

导出配置脚本:netsh -c interface ip dump > c:\ip.txt

导入配置脚本:netsh -f c:\ip.txt.

查看netsh指令:netsh > help >? -显示指令列表

1)  netsh配置ip、网关:

net interface ip set address "本地连接" static 192.168.2.101 255.255.255.0 192.168.2.1

2) netsh配置静态IP,DNS 及wins:

netsh interface ip set address "本地连接" static 192.168.2.100

netsh interface ip set dns "本地连接" static 202.102.128.68

netsh interface ip set wins "本地连接" static 192.168.2.101

3)配置自动获取IP,dns, wins地址:

netsh interface ip set address "本地连接" dhcp

netsh interface ip set dns "本地连接" dhcp

netsh interface ip set wins "本地连接" dhcp

4)防火墙

查看状态:netsh firewall show state

禁用:netsh firewall set opmode disable

启用:netsh firewall set opmode enable