cmd 脚本修改网卡dns
网卡 修改 脚本 cmd DNS
2023-09-11 14:16:16 时间
@echo off
cls
color 0A
chcp 65001
Echo *******************************************************************************
Echo Collect fault information…………
Echo *******************************************************************************
ipconfig /all > "%userprofile%"\desktop\故障处理.txt
echo. >> "%userprofile%"\desktop\故障处理.txt
echo. >> "%userprofile%"\desktop\故障处理.txt
nslookup -qt=ns 51cjml.com >> "%userprofile%"\desktop\故障处理.txt
Echo *******************************************************************************
Echo 正在修改IP地址和DNS服务器地址,请耐心等待…………
Echo *******************************************************************************
::cmd /c netsh interface ip set address name="本地连接" source=static addr=192.168.1.136 mask=255.255.255.0 gateway=192.168.0.1 gwmetric=1
cmd /c netsh interface ip set dns name="以太网" source=static addr=114.114.114.114
cmd /c netsh interface ip add dns name="以太网" addr=127.0.0.1 index=2
cmd /c netsh interface ip set dns name="本地连接" source=static addr=114.114.114.114
cmd /c netsh interface ip add dns name="本地连接" addr=127.0.0.1 index=2
cmd /c netsh interface ip set dns name="WLAN" source=static addr=8.8.8.8
cmd /c netsh interface ip add dns name="WLAN" addr=127.0.0.1 index=2
ipconfig /all
Echo *******************************************************************************
Echo OK!!已修改成功!请按任意键继续…………
Echo 超级目录
Echo *******************************************************************************
Pause
相关文章
- VMware网卡类型说明及修改(可修改为万兆网卡)
- 有两个网卡的机器,如何强制外网访问时,用其中某个网卡?(双网卡路由配置)
- 配置网卡多队列
- 多网卡的7种bond模式原理
- centos 配置静态地址并修改网卡名
- 如何实现网卡bond
- python通过snmp协议运用多线程获取多台主机网卡信息,写入数据库
- Linux查看网卡流量的shell脚本
- 修改Centos7的网卡ens32 改为eth0
- win10 如何查看电脑的网卡带宽是千兆还是百兆
- CentOS 7 修改网卡名
- vmware克隆Centos6.4虚拟机网卡无法启动问题
- 更换oracle 集群网卡(Changing a Network Interface)
- WIN7通过批处理开启/禁用无线网卡
- AM335x(TQ335x)学习笔记——Nand&&网卡驱动移植
- ifup 启动指定网卡、 ifdown 停止指定网卡
- iftop 监控网卡流量
- Centos7没有ETH0网卡