您的位置:首页 > 理论基础

修改计算机IP地址BAT命令

2013-01-11 11:21 183 查看
echo

:: 正在更换为20的IP,请稍侯... ...

netsh interface ip set dns name="本地连接" source=dhcp netsh interface ip set address name="本地连接" source=dhcp

::修改为自动连接

netsh interface ip set address name="本地连接" source=static addr=192.168.0.16 mask=255.255.255.0

::设置IP为192.168.0.16,子网掩码为255.255.255.0 netsh interface ip add address "本地连接" 192.168.168.16 255.255.255.0

::增加设置IP为192.168.168.16,子网掩码为255.255.255.0

netsh interface ip set address name="本地连接" gateway=192.168.0.10 gwmetric=0

::设置网关为192.168.0.10

netsh interface ip set dns name="本地连接" source=static addr= 202.96.128.86 register=PRIMARY

::设置首选DNS为202.96.128.86 netsh interface ip add dns "本地连接" 192.168.0.9 index=1

::增加设置首选DNS为192.168.0.9

netsh interface ip add dns name="本地连接" addr=202.96.128.166 index=2

::设置备用DNS为202.96.128.166

cls
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: