IP config with Netsh under windows

Source: Internet
Author: User

=================================================

Chinaunicome.bat

Route Delete 0.0.0.0 Mask 0.0.0.0 10.125.22.254
REM (Delete intranet gateway)

Route change 0.0.0.0 Mask 0.0.0.0 111.195.179.64 metric 2
REM (Change the default extranet gateway priority to 2,111.195.179.64 for the IP address assigned to the extranet)

Route add 10.0.0.0 Mask 255.0.0.0 10.125.22.254 metric 1
REM (Add internal network by point, and priority set to 1)

=================================================

REM MAC 18-a9-05-87-0a-71
Ipconfig/all >ipconfig.log
netsh interface ip set address "Local Area Connection" static 10.118.48.84 255.255.255.0 10.118.48.254 1
netsh interface ip set DNS "Local Area Connection" static 10.118.1.1 Primary
netsh interface ip add DNS "Local Area Connection" 10.118.5.1
Ipconfig/all

=================================================

REM Local area Connection
Ipconfig/all >ipconfig.log
netsh interface ip set address "Local Area Connection" static 10.120.20.251 255.255.255.0 10.120.20.254 1
Ipconfig/all

=================================================

REM Local area Connection
Ipconfig/all >ipconfig.log
netsh interface ip set address "Local Area Connection" static 10.125.22.170 255.0.0.0 10.125.22.254 1
netsh interface ip set DNS "Local Area Connection" static 219.141.136.10 Primary
netsh interface ip add DNS "Local Area Connection" 8.8.8.8
Ipconfig/all

=================================================

Automatic. bat

REM Local area Connection
Ipconfig/all >ipconfig.log
netsh interface ip set address "Local Area Connection" Source=dhcp
netsh interface ip set DNS "Local Area Connection" Source=dhcp
REM Ipconfig/all

IP config with Netsh under windows

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.