Windows在DOS下配置静态ipv4

1.cmd进入DOS界面

2.查看ipv4配置

net interface ipv4 show interface
注释:这里我需要设置对应ip相应的名称为以太网有的电脑为“本地连接”

在这里插入图片描述

3.配置静态ip

netsh interface ipv4 set address name=“以太网” static 192.168.53.105 255.255.255.0 192.168.53.1
注释:
ip地址:192.168.53.105
子网掩码:255.255.255.0
网关:192.168.53.1
这里完成后ping 192.168.53.1看看能不能ping通,ping通后也可能依然上不了网需要改一下DNS。

在这里插入图片描述

4.配置DNS

netsh interface ipv4 set dns name=“以太网” source=static addr=8.8.8.8
注释:
我这里用的比较通用的8.8.8.8若不能用可尝试其他的,上网搜一下一般本省的比较快。

在这里插入图片描述

发布了54 篇原创文章 · 获赞 17 · 访问量 9164

猜你喜欢

转载自blog.csdn.net/qq_41979513/article/details/103475448