Microsoft's Windows family entered the market of network operating systems starting from Windows NT. Up to Windows 2000 now, it can be said that the network functions are gradually improving. In this growth process, Windows has incorporated many functions of other network operating systems, which can be said to be borrowed, and has gradually formed a complete set of network operating systems. This is also the reason why major companies such as SUN feel dissatisfied, thinking that it is not something completely independently developed by Microsoft. However, the functions of Windows 2000 are indeed very powerful. It can almost do many things at the command line like Unix and Linux.
Now let's take a look at a command on Windows that can change the IP address at the command line. After seeing this command, everyone may feel that this command is very similar to the commands of Unix and Linux, and more like the commands of Cisco routers. The following is the echo of my actual operation on the computer, and I will add some comments:
C:\>ipconfig (First use the ipconfig command to see the IP address before the change)
Windows 2000 IP Configuration
Ethernet adapter 本地连接:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.0.250 (IP before change of local connection)
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 (Then execute the netsh command)
netsh>interface (Subcommand of netsh command)
interface>ip (Subcommand of interface command)
interface ip>set (Subcommand of interface ip command)
The following commands are valid:
Commands in this context:
set address - Set the IP address or default gateway of the specified interface.
set dns - Set DNS server mode and address.
set wins - Set WINS server mode and address.
interface ip>set address "本地连接" static 192.168.0.2 255.255.255.0 192.168.0.1 1 (Set IP address)
Ok.
(Comment: Does the above paragraph look like the command of Cisco.)
interface ip>exit
C:\>ipconfig (Use the ipconfig command again after the change to see the IP address and confirm whether the change is successful)
Windows 2000 IP Configuration
Ethernet adapter 本地连接:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.0.2 (IP after change indicates success)
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:\>
The netsh command also has many powerful functions as follows:
C:\>netsh
netsh>?
The following commands are valid:
Commands in this context:
.. - Move to the upper-level context level.
? - Display command list.
aaaa - Change to `aaaa' context.
abort - Discard changes made in offline mode.
add - Add a configuration item to the item list.
alias - Add an alias
bye - Exit the program.
commit - Commit changes made in offline mode.
delete - Delete a configuration item on the item list.
dhcp - Change to `dhcp' context.
dump - Display a configuration script.
exec - Run a script file.
exit - Exit the program.
help - Display command list.
interface - Change to `interface' context.
offline - Set the current mode to offline.
online - Set the current mode to online.
popd - Open a context from the stack.
pushd - Push the current context into the stack.
quit - Exit the program.
ras - Change to `ras' context.
routing - Change to `routing' context.
set - Update configuration settings.
show - Display information
unalias - Delete an alias.
wins - Change to `wins' context.
The following sub-contexts are available:
routing interface ras dhcp wins aaaa
For more help information about a command, type the command followed by ?.
There are many sub-commands under each sub-command. I won't introduce them one by one here because there are really too many functions. Everyone can study it by themselves.
Now let's take a look at a command on Windows that can change the IP address at the command line. After seeing this command, everyone may feel that this command is very similar to the commands of Unix and Linux, and more like the commands of Cisco routers. The following is the echo of my actual operation on the computer, and I will add some comments:
C:\>ipconfig (First use the ipconfig command to see the IP address before the change)
Windows 2000 IP Configuration
Ethernet adapter 本地连接:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.0.250 (IP before change of local connection)
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 (Then execute the netsh command)
netsh>interface (Subcommand of netsh command)
interface>ip (Subcommand of interface command)
interface ip>set (Subcommand of interface ip command)
The following commands are valid:
Commands in this context:
set address - Set the IP address or default gateway of the specified interface.
set dns - Set DNS server mode and address.
set wins - Set WINS server mode and address.
interface ip>set address "本地连接" static 192.168.0.2 255.255.255.0 192.168.0.1 1 (Set IP address)
Ok.
(Comment: Does the above paragraph look like the command of Cisco.)
interface ip>exit
C:\>ipconfig (Use the ipconfig command again after the change to see the IP address and confirm whether the change is successful)
Windows 2000 IP Configuration
Ethernet adapter 本地连接:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.0.2 (IP after change indicates success)
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:\>
The netsh command also has many powerful functions as follows:
C:\>netsh
netsh>?
The following commands are valid:
Commands in this context:
.. - Move to the upper-level context level.
? - Display command list.
aaaa - Change to `aaaa' context.
abort - Discard changes made in offline mode.
add - Add a configuration item to the item list.
alias - Add an alias
bye - Exit the program.
commit - Commit changes made in offline mode.
delete - Delete a configuration item on the item list.
dhcp - Change to `dhcp' context.
dump - Display a configuration script.
exec - Run a script file.
exit - Exit the program.
help - Display command list.
interface - Change to `interface' context.
offline - Set the current mode to offline.
online - Set the current mode to online.
popd - Open a context from the stack.
pushd - Push the current context into the stack.
quit - Exit the program.
ras - Change to `ras' context.
routing - Change to `routing' context.
set - Update configuration settings.
show - Display information
unalias - Delete an alias.
wins - Change to `wins' context.
The following sub-contexts are available:
routing interface ras dhcp wins aaaa
For more help information about a command, type the command followed by ?.
There are many sub-commands under each sub-command. I won't introduce them one by one here because there are really too many functions. Everyone can study it by themselves.
http://dos.e-stone.cn/dosbbs
uploadImages/200311161145850422.swf
uploadImages/200311161145850422.swf

