How to change the IP address under the command line

Source: Internet
Author: User

Microsoft's Windows family has entered the network operating system market since Windows NT, And now Windows 2000 can be said that network functions are gradually improved, during this growth process, Windows has integrated many other network operating system functions. It can be said that it has been used for reference and has gradually formed a set of fully functional network operating systems, this is why Sun and other companies are not satisfied. They feel that Microsoft is not completely self-developed. However, Windows is indeed very powerful, and it can do a lot of work in the command line like UNIX and Linux.
Next, let's take a look at a command on Windows that can change the IP address under the command line. After reading this command, you may think this command is like a Unix or Linux Command, it is more like a Cisco router command. The following is the echo of my actual operations on the computer. I will add some notes:

C: \> ipconfig (use the ipconfig command to check the IP address before the change)

Windows 2000 IP configuration

Ethernet Adapter local connection:

Connection-specific DNS suffix .:
IP address ......: 192.168.0.250 (the IP address before the local connection is changed)
Subnet Mask ......: 255.255.255.0
Default Gateway...: 192.168.0.1

PPP adapter dial-up connection:

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 the netsh command)
Interface> IP (subcommands of interface commands)
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 the DNS server mode and address.
Set wins-set the WINS server mode and address.
Interface ip> set address "Local Connection" static 192.168.0.2 255.255.255.0 192.168.0.1
1 (set IP address)
OK.

(Note: The above section does not look like a Cisco command .)

Interface ip> exit

C: \> ipconfig (use the ipconfig command to check whether the IP address is changed successfully)

Windows 2000 IP configuration

Ethernet Adapter local connection:

Connection-specific DNS suffix .:
IP address ......: 192.168.0.2 (the changed IP Address indicates that it is successful)
Subnet Mask ......: 255.255.255.0
Default Gateway...: 192.168.0.1

PPP adapter dial-up connection:

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 has the following powerful functions:

C: \> netsh
Netsh>?

The following commands are valid:

Commands in this context:
...-Move to the context level of the previous layer.
? -Display the command list.
Aaaa-change to 'aaa' context.
Abort-discard the changes made in offline mode.
Add-Add a configuration item to the project list.
Alias-add an alias
Bye-exitProgram.
Commit-submit the changes made in offline mode.
Delete-delete a configuration item from the project list.
DHCP-changed to the 'dhcp 'context.
Dump-displays a configuration script.
Exec-run a script file.
Exit-exit the program.
Help-display the command list.
Interface-changed to the 'interface' context.
Offline-set the current mode to offline.
Online-set the current mode to a VM instance.
Popd-open a context from the stack.
Pushd-push the current context into the stack.
Quit-exit the program.
Ras-changed to 'Ras 'context.
Routing-changed to the 'routing' context.
Set-Update Configuration Settings.
Show-display information
Unalias-delete an alias.
Wins-changed to the 'WINS 'context.

The following sub-contexts are available:
Routing interface Ras DHCP wins AAAA

If you need more help information, enter the command,
Followed ?.

Each sub-command contains many sub-commands. I will not describe them here because there are too many functions. You can study them yourself.
ArticleInput: dnbm responsible editor: dnbm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.