ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Net--在windows中用netsh命令来对PC的IP做相关设定

Net--在windows中用netsh命令来对PC的IP做相关设定

原创 Linux操作系统 作者:vongates 时间:2019-05-28 21:27:07 0 删除 编辑
因为家里和公司设的GW不同每天来公司或回家后都要改一下GW的设定才能连上网络,在windows中是有很好用的图形画面,但是还是有点不想点,问了以前的同事如何在命令行下设IP,同事说用netsh,自己试了一下,在Windows中用netsh来设定主机的IP 实例

D:>netsh
netsh>inte
netsh interface>ip
netsh interface ip>show address

接口 "本地连接" 的配置
DHCP 启用 否
IP 地址 10.0.0.9
子网掩码 255.0.0.0
默认网关: 10.0.0.3
GatewayMetric: 0
InterfaceMetric 0

netsh interface ip>set address name="本地连接" static 192.168.60.38 255.255.255.0 192.168.60.240 0确定。

netsh interface ip>
netsh interface ip>show address

接口 "本地连接" 的配置
DHCP 启用 否
IP 地址 192.168.60.38
子网掩码 255.255.255.0
默认网关: 192.168.60.240
GatewayMetric: 0
InterfaceMetric 0

netsh interface ip>

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29987/viewspace-51874/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 桃夭
请登录后发表评论 登录
全部评论

注册时间:2018-09-11

  • 博文量
    449
  • 访问量
    320919