设置DNS命令格式:
netsh interface ip set dns "本地连接" static 211.138.91.1
命令的意思是将“本地连接”的DNS设置成211.138.91.1
删除IP地址和DNS的命令是
netsh interface ip set address "本地连接" dhcp
netsh interface ip set dns "本地连接" dhcp
如果是纯DOS的话,要准备DOS的网卡程序,xxxx.dos,然后做一个 autoexec.bat 文件在 net xxxx.dos 后面加一个16进制的地址,如 0X75 等。多台计算机只需改 wattcp.cfg 文件中的 ip 即可:
IP = 192.168.100.44
NETMASK = 255.255.255.0
GATEWAY = 192.168.100.1
=================================================
在windows下的DOS窗口中
要利用Netsh命令,进入到DOS下的网络配置状态,就能实现各种网络配置。
进入IP设置模式