How does a Windows system configure an IP address with a command prompt?

Source: Internet
Author: User

Modifying an IP address can be implemented in the network and Sharing center that is brought by the system. But many users sometimes need to set up static IP to achieve normal network communication, at this time only through the "omnipotent" command line to solve the problem.

1, with the shortcut key "Win+r" open the running interface, input "cmd" return, open the command prompt.

2, in the command prompt, enter "netsh"---> "interface"---> "IP", and then return.

3, input "set address" connection name "static new IP Address Subnet mask Gateway 1", and then enter. Note that the above command needs to be modified in accordance with user requirements, the connection name can refer to the "Network connection" in the name modified to support Chinese, but the quotation marks in English. There must be a space between each item, and finally enter "1" to represent the determination. You can refer to the following example: Set Address "Ethernet 5" static 192.168.1.6 255.255.255.0 192.168.0.1 1

4, you can also put the above command at a one-time input, but to ensure that do not wrap: "netsh interface ip set address" connection name "static new IP subnet Mask Gateway 1"

Example: netsh interface ip set address "Ethernet 3" static 192.168.1.108 255.255.255.0 192.168.0.1 1

5, it should be noted that after the modification of the system IP becomes static. If you do not meet the needs of users, you can use the system's own Network "Troubleshooter" for automatic repair, restore dynamic IP. Of course, you can also restore an IP address by using the following command:

"netsh interface ip set address" connection name "DHCP"

6, can also use similar commands to modify DNS, the same format as above, as long as the "address" replaced by "DNS" can:

"netsh interface ip set DNS" Ethernet 3 "Static DNS address"

"netsh interface ip set DNS" Connection name "DHCP"

Related Article

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.