![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-03 18:15 |
48,038 topics / 350,123 posts / today 0 new / 48,251 members |
| 其它操作系统综合讨论区 » Repost: How to change the IP address at the command line |
| Printable Version 2,430 / 5 |
| Floor1 yiyesong | Posted 2002-11-18 00:00 |
| 元老会员 Posts 632 Credits 1,987 | |
|
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. |
|
| Floor2 xiongwei2624 | Posted 2006-06-30 15:21 |
| 初级用户 Posts 44 Credits 96 From 深圳 | |
|
Just be straightforward, okay!
|
|
| Floor3 shj99422 | Posted 2006-08-08 07:09 |
| 初级用户 Posts 78 Credits 178 | |
|
Excuse me, can the above be executed in the domain?
|
|
| Floor4 sywpch | Posted 2006-09-22 21:31 |
| 新手上路 Posts 2 Credits 4 | |
|
Thanks for the hard work
|
|
| Floor5 kingchain | Posted 2006-10-15 22:18 |
| 初级用户 Posts 57 Credits 133 | |
|
Still learning
|
|
| Floor6 nxcgh2006 | Posted 2006-10-19 10:17 |
| 初级用户 Posts 22 Credits 42 | |
|
Study and learn..
Thank you for providing, the thread starter has worked hard啦 |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |