    
- 帖子
- 3852
- 积分
- 13044
- 威望
- 16780
- 金钱
- 36761
- 在线时间
- 1139 小时
         
|
微软的Windows家族从Windows NT开始跨入了网络操作系统的市场,到现在的Windows 2000可以说网络功能在逐渐的完善,在这个成长过程中Windows融入了很多其他网络操作系统的功能,可以说是借鉴而来的,逐渐形成了一套功能完善的网络操作系统,这也是令SUN等各大公司所感觉到不服的原因,觉得不是微软完全自给研发的东西。不过Windows2000的功能确实是很强大的,它几乎可以象Unix和Linux一样在命令行下做很多的工作。
下面我们看一下Windows上一个可以在命令行下更改ip地址的命令,看过这个命令后大家可能会觉得这个命令很象Unix和Linux的命令,更象Cisco的路由器命令。下面是我在计算机上实际操作的回显,我会加上一些注释:
C:\>ipconfig (首先用ipconfig这个命令看一下更改之前的ip地址)
Windows 2000 IP Configuration
Ethernet adapter 本地连接:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.0.250 (本地连接更改之前的ip)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1
PPP adapter 拨号连接:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 211.149.128.147
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : 211.149.128.147
C:\>netsh (然后执行netsh这个命令)
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 192.168.0.2 255.255.255.0 192.168.0.1
1 (设置ip地址)
确定。
(注释:上面一段象不象Cisco的命令。)
interface ip>exit
C:\>ipconfig (更改后再用ipconfig命令看一下ip地址,确认一下是否更改成功)
Windows 2000 IP Configuration
Ethernet adapter 本地连接:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.0.2 (更改后的ip说明成功了)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1
PPP adapter 拨号连接:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 211.149.128.147
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : 211.149.128.147
C:\>
netsh这个命令还有好多强大的功能 如下:
C:\>netsh
netsh>?
下列指令有效:
此上下文中的命令:
.. - 移到上一层上下文级。
? - 显示命令列表。
aaaa - 更改到 `aaaa' 上下文。
abort - 丢弃在脱机模式下所做的更改。
add - 将一个配置项添加到项目列表中。
alias - 添加一个别名
bye - 退出程序。
commit - 提交在脱机模式中所做的更改。
delete - 在项目列表上删除一个配置项目。
dhcp - 更改到 `dhcp' 上下文。
dump - 显示一个配置脚本。
exec - 运行一个脚本文件。
exit - 退出程序。
help - 显示命令列表。
interface - 更改到 `interface' 上下文。
offline - 将当前模式设置成脱机。
online - 将当前模式设置成联机。
popd - 从堆栈上打开一个上下文。
pushd - 将当前上下文放推入堆栈。
quit - 退出程序。
ras - 更改到 `ras' 上下文。
routing - 更改到 `routing' 上下文。
set - 更新配置设置。
show - 显示信息
unalias - 删除一个别名。
wins - 更改到 `wins' 上下文。
下列的子上下文可用:
routing interface ras dhcp wins aaaa
若需要命令的更多帮助信息,请键入命令,后面跟 ?。
每一个子命令下面还有很多子命令。这里就不一一介绍了因为实在是功能太多了,大家可以自己研究一下。 |
|