由于在公司使用无线,回家没有无线路由。而又要把笔记本的网络通过无线共享给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