脚本以切换IPv4 IP地址,在“自动获取IP地址”之间设置,以及Windows CMD中的特定IP地址和子网掩码
我正在寻找一种将IPv4 IP地址设置更改为特定IP和子网掩码的方法,但也将其更改以自动获取IP地址。我看到了很多用于在Windows CMD中设置IPv4 IP和DNS设置的资源,但是我看不到在哪里可以将其更改为“自动获取IP地址”设置。
基本上,我需要快速将设置从默认的IP WiFi设置转换为特定的IP地址和子网蒙版(嗯,默认设置,但是在更改IPv4设置时需要设置它),并在需要时返回。
I am looking for a way to change the IPV4 IP address settings to a specific IP and Subnet mask, but also to change it to get the IP address automatically. I see plenty of resources for setting the IPV4 IP and DNS settings in windows cmd, but I don't see where i can change it to the "Obtain IP address automatically" setting.
Basically, I need to quickly switch my settings from the default IP wifi settings to a specific IP address and subnet mask (well, the default one, but it needs to be set when changing IPV4 settings), and back when I need it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
DHCP用于自动获取IP地址。当您要将接口还原以再次使用DHCP时,只需运行以下命令。
DHCP is used to obtain IP address automatically. When you'd want to revert the interface to using DHCP again, just run the following commands.