Set IP -- netsh command using batch processing

Source: Internet
Author: User
When using the batch processing IP address-netsh command, many people may encounter a situation where a fixed IP address is set to connect to the LAN and then to the Internet in the unit and in the laptop computer used for normal work, in some cases, you may need to set the automatic acquisition method to automatically allocate IP addresses (of course, now... when using the batch processing IP address-netsh command, many people may encounter a situation where a fixed IP address is set to connect to the LAN and then to the Internet in the unit and in the laptop computer used for normal work, in some cases, you may need to set it to the "auto get" method to automatically allocate IP addresses (of course, currently, hotels on a business trip generally use wireless devices and do not need to refer to this article). at this time, when switching, it is annoying to click here. This article introduces a simple method to simplify this operation. The method described in this article is based on the netsh command. this is an operating system command that comes with Windows XP and Windows 7. it has a rich set of functions. you can search for the information about this command by yourself. here, only the functions related to IP addresses are described. Set automatic IP and automatic DNS netsh interface ip set address name = "local connection" source = dhcpnetsh interface ip set dns name = "local connection" source = dhcp set fixed IP and fixed DNS netsh interface ip set address name = "local connection" source = static addr = 192.168.1.10 mask = 255.255.255.0netsh interface ip set address name = "local connection" gateway = 192.168.1.1 gwmetric = 0 netsh interface ip set dns name = "local connection" source = static addr = 202.96.209.5 register = PRIMARY can write these two commands in batches for processing, in In resource manager, double-click to run it! An example is as follows: netsh wlan set hostednetwork mode = allow ssid = MYSSID key = 12345678 netsh wlan start hostednetwork remember to run this wifi hotspot command in win7 as an administrator!
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.