Set DNS address under command

Source: Internet
Author: User

C:\Documents and Settings\as>netsh interface IP set DNS "Local Area Connection" static 192.168.1.1 Primary
Are you sure.

This is OK, set DNS to static address 192.168.1.1, hey, if set error can not access the Internet.

Reference:

C:\Documents and Settings\as>netsh interface IP set/?

The following instructions are valid:

Commands in this context:
Set address-Sets the IP or default gateway for the specified interface.
Set DNS-sets the DNS server mode and address.
Set wins-sets the WINS server mode and address.

C:\Documents and Settings\as>netsh interface IP set DNS/?

Usage: Set DNS [name=]<string> [source=]dhcp|static [Addr=]<ip Address>|none
[[Register=]none|primary|both]

Parameters:

Flag value
Name-Names of the interfaces.
Source-One of the following values:
DHCP: Sets DHCP as the source for configuring a DNS server for an interface.

Static: Sets the source of the configured DNS server to be a local static configuration.

Addr-One of the following values:
<ip: An IP of the DNS server.
None: Clears the list of DNS servers.
Register-one of the following values:
None: Disable dynamic DNS registration.
Primary: Registered only under the primary DNS suffix.
Both: Registered under the primary DNS suffix, also registered under a specific connection suffix.

Description: Set the DNS server configuration to DHCP or static mode. Only if the source is "static",
and the "addr" option can also be used to configure the IP of the DNS server for this particular interface
The case of a static list of addresses.

Example:

Set DNS name= "Local area Connection" Source=dhcp
Set DNS "Local area Connection" static 10.0.0.1 Primary

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.