1.无线网络
使用指定ip
@echo off
netsh interface ip set address "无线网络连接" static 192.168.0.111 255.255.255.0 192.168.0.1
netsh interface ip set dns "无线网络连接" static 202.106.0.20 primary
使用自动ip
@echo off
netsh interface ip set address "无线网络连接" source=dhcp
netsh interface ip set dns "无线网络连接" source=dhcp
2.有线网络
使用指定ip
@echo off
netsh interface ip set address "本地连接" static 192.168.0.175 255.255.255.0 192.168.0.1
netsh interface ip set dns "本地连接" static 202.106.0.20 primary
使用自动ip
@echo off
netsh interface ip set address "本地连接" source=dhcp
netsh interface ip set dns "本地连接" source=dhcp
本文介绍了如何通过命令行工具netsh手动设置无线网络和有线网络的静态IP地址及DNS,同时也提供了设置自动获取IP地址和DNS的方法。
2624

被折叠的 条评论
为什么被折叠?



