BAT文件快速配置电脑网络参数
经常上网的同志,有时需要更改自己电脑的IP地址、DNS地址。这些参数其实都是电脑网络参数的配置。下面是小编跟大家分享的是BAT文件快速配置电脑网络参数,欢迎大家来阅读学习~
BAT文件快速配置电脑网络参数
工具/原料
Win 7操作系统
操作系统控制面板
CMD命令行
BAT文件
一、不使用BAT文件的配置步骤和方法
1在“控制面板”中点击“网络和Internet”按钮,如下图红框所示。

2接着点击“查看网络状态和任务”,如下图所示。

3再点击左边栏目“更改适配器设置”,如下图所示。

4然后再点击需要查看IPv6地址的网卡图标,如下图所示的“本地连接”。

5接着点击“属性”按钮。

6然后双击“Internet协议版本 4(TCP/IPv4)”

7在出现的对话框中填写电脑需要配置的IPv4地址和DNS服务器地址,如下图所示,点击确定后电脑的网络参数就配置完成。

二、使用BAT文件的配置步骤和方法
1新建一个TXT文档,在其中填写以下内容
“netsh interface ip set address "本地连接" static 10.10.2.1 255.255.255.0 10.10.2.254
netsh interface ip set dns "本地连接" static 202.96.96.68
netsh interface ip add dns "本地连接" 8.8.8.8”如下图所示。

2把上面的TXT文档保存到电脑的桌面上,保存的文件名为“ipv4.bat”,如下图所示红框中是保存完成后电脑桌面上的“ipv4.bat”文件。

3用鼠标左键双击上图桌边上的“ipv4.bat”文件,大约过几秒钟的时间,电脑上的网络参数就配置完成了。通过在控制面板中查看网卡的网络参数也能看到和上面“一”中的步骤“7”中的相同网络参数配置,两个方法的效果是一致的,如下图所示。

三、总结
通过对上面两个方法的比较,可以发现第二种方法可以节省配置电脑网络参数的时间,提高工作效率。
2方法二中BAT文件的命令格式,必须按要求输入,不能有任何的差错,否则不能正确运行。
3电脑网络参数的配置,非专业人士不要随意进行更改,否则会导致电脑无法访问互联网。
BAT文件快速配置电脑网络参数的评论条评论