DOS命令改IP的方法.

来源:百度知道 编辑:UC知道 时间:2024/06/14 16:57:04
想知道怎样用DOS命令修改IP,是自动获取IP的.
有一个命令好像可以重新获取IP,但我忘记了,好像有个RENEW的词吧.
成功的话,会加分的!!
帮忙!!
我所指的DOS命令在开始--运行里面弄的,不是纯DOS.

ipconfig /renew 就行了

netsh interface ip set address name="本地连接" source = static addr = 192.168.1.4 mask=255.255.255.0
netsh interface ip set address name="本地连接" gateway = 192.168.1.1 gwmetric =0
netsh interface ip set dns name="本地连接" source = static addr = 221.4.102.162 register=PRIMARY
netsh interface ip add dns name="本地连接" addr = 210.51.176.71 index=2
**********【批处理设置静态IP】**********

netsh interface IP set address name="本地连接" source=dhcp
netsh interface ip set dns name="本地连接" source=dhcp
**********【批处理设置动态IP】**********

如果是纯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设置模式