文档介绍:用DOS命令设置ip地址及DNS
设置/修改IP地址,子网掩码,网关的格式:
netsh interface ip set address "本地连接" static auto
命令的意思是将“本地连接”的
ip地址设置成
子网掩码是
网关设置成 并且自动跃点数
注意:"本地连接"处请根据自己的情况修改
设置DNS命令格式:
netsh interface ip set dns "本地连接" static
命令的意思是将“本地连接”
删除IP地址和DNS的命令是
netsh interface ip set address "本地连接" dhcp
netsh interface ip set dns "本地连接" dhcp
C:\>ipconfig (首先用ipconfig这个命令看一下更改之前的ip地址)
Windows 2000 IP Configuration
adapter 本地连接:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : (本地连接更改之前的ip)
Mask . . . . . . . . . . . :
Default Gateway . . . . . . . . . :
PPP adapter 拨号连接:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . :
Mask . . . . . . . . . . . :
Default Gateway . . . . . . . . . : .
C:\>netsh (sh这个命令)
netsh>interface (netsh命令的子命令)
interface>ip (interface命令的子命令)
interface ip>set (interface ip命令的子命令)
下列指令有效:
此上下文中的命令:
set address - 设置指定的接口的 IP 地址或默认网关。
set dns - 设置 DNS 服务器模式和地址。
set wins - 设置 WINS 服务器模式和地址。
interface ip>set address "本地连接" static
1 (设置ip地址)
确定。
(注释:上面一段象不象Cisco的命令。)
interface ip>exit
C:\>ipconfig (更改后再用ipconfig命令看一下ip地址,确认一下是否更改成功)
Windows 2000