由于在公司使用无线,回家没有无线路由。而又要把笔记本的网络通过无线共享给iTouch上网 。所以要经常更换无线网卡ip的配置(在公司自动获取ip,在家要手动配置 )。所以在网上搜索相关信息,根据自己实际情况稍做修改。如下是使用的bat文件。
HomeIP.bat
netsh interface ip delete dns "Wireless Network Connection" addr=all
netsh interface ip add dns "Wireless Network Connection" addr=192.168.0.1
netsh interface ip add address "Wireless Network Connection" 192.168.0.1 255.255.255.0
ipconfig /flushdns
CompIP.bat
netsh interface ip delete dns "Wireless Network Connection" addr=all
netsh interface ip set address name="Wireless Network Connection" source=dhcp
ipconfig /flushdns
本文介绍了一种通过批处理脚本(bat文件)来快速切换无线网卡IP配置的方法,适用于需要在家和公司间频繁切换网络设置的场景。文中提供了两个具体的bat文件示例:HomeIP.bat用于家庭网络的手动配置,而CompIP.bat则用于自动获取公司网络的IP。

1万+

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



