Configuring Windows system TCP/IP with the Netsh tool

Source: Internet
Author: User

Sometimes you need to use the Netsh tool to configure Windows system TCP/IPon specific occasions, which briefly describes common configuration commands.

1. Set the fixed IP address, subnet mask:

netsh interface ip set address name= " Local Area Connection "Source=static addr=192.168.0.12 mask=255.255.255.0

2. Set the default gateway:

netsh interface ip set address name= " Local Area Connection "gateway=192.168.0.254 gwmetric=0

3. Set the preferred DNS:

netsh interface ip set DNS name= " Local Area Connection "Source=static addr=192.168.0.1 register=primary

4. Set up alternate DNS:

netsh interface ip add DNS name= " Local Area Connection "addr=114.114.114.114 index=2

5. Set wins:

netsh interface ip set wins name= " Local Area Connection "Source=static Addr=none

6. Set the IP address to get automatically:

netsh interface ip set address name= " Local Area Connection "Source=dhcp

7. set up auto get DNS address:

netsh interface ip set DNS name= " Local Area Connection "Source=dhcp

8. Export the import configuration:

Export the TCP/IP configuration: NETSH-C interface IP dump > c:\tcpip.txt
Import TCP/IP configuration: netsh-f c:\tcpip.txt

Note:

the above command can be combined abbreviated as: netsh interface ip set address " Local Area Connection "static 192.168.0.12 255.255.255.0192.168.0.254 0

the above command 3 can be abbreviated as: netshinterface IP Set DNS " Local Area Connection "static 192.168.0.1 Other command abbreviations are similar.

This article is from the IT Operations blog, so be sure to keep this source http://itops.blog.51cto.com/2420369/1858746

Configuring Windows system TCP/IP with the Netsh tool

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.