One-click setting to easily convert IP addresses-For Windows 2000

Source: Internet
Author: User
Tags dns2

Thank you for your support.One-click setting to easily convert IP addresses. A friend sent an email asking me how to set the IP address with one click in Windows 2000 to achieve the effect of converting IP addresses easily, because the method described in the previous article cannot work in the 2000 system. So I tested it. In fact, the code is similar, and only a few modifications are needed.

The code of the 2000 program is as follows:

Code
@ Echo off
Rem eth // set the NIC name. If the English version is 2000, set eth = Local Area Connection
Set eth = "Local Connection"
Rem ip // set the IP address. To use the ip address for the first time, change it to the applicable IP address.
Set ip = 10.200.121.57
Rem gw // set the Gateway
Set gw = 10.200.121.254
Rem netmasks // sets the subnet mask.
Set netmasks = 255.255.255.0
Rem dns1 // set dns1
Set dns1 = 202.204.192.1
Rem dns2 // set dns2
Set dns2 = 202.204.193.1

Echo setting local IP address as: % ip %
Netsh interface ip set address "% eth %" static % ip % netmasks % gw % gwmetric = 1
Netsh interface ip set dns "% eth %" static % dns1 %
Netsh interface ip add dns "% eth %" % dns2 %
Ipconfig/all

Pause
Close

According to the code comment, change it to your own IP address, copy the above Code to notepad, and save it in bat format. If the IP address is automatically obtained, the Code is as follows: Code
@ Echo off
Rem eth // set the NIC name. If the English version is 2000, set eth = Local Area Connection
Set eth = "Local Connection"

Echo setting local IP address as: DHCP
Netsh interface ip set address "% eth %" DHCP
Netsh interface ip set dns "% eth %" DHCP

Pause
Close

The above program runs successfully in Windows 2000. Thank you for your question!

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.