Netsh Commands for Interface (IPv4 and IPv6)
2014-04-19 17:47
741 查看
You can use commands in the Netsh Interface context and subcontexts to configure the TCP/IP version 4 protocol (including addresses, default gateways, Domain Name System (DNS) and WINS servers) and to display configuration and statistical information for IPv4.In addition, you can use commands in this context and related subcontexts (6to4, isatap, portproxy, and teredo) to configure Internet Protocol version 6 (IPv6).The netsh interface context contains the following commands:add
delete
reset
set credentials
set interface
show credentials
show interface
To run these commands from the command prompt, you must either enter the netsh interface context or prepend the context to the command. For example, if you are at the command prompt but have not typed netsh and then interface to enter the netsh interface context, you must type:netsh interface commandWhere command is the command that you want to run, including all of the required parameters for the command.The Netsh Interface context also includes several subcontexts.
If you specify that the value for connect equals CONNECTED, then the interface is automatically enabled even if you also specify that the value for adminequals DISABLED.
ExamplesFollowing is an example of the show interface command.show interface name="Local Area Connection"
delete
reset
set credentials
set interface
show credentials
show interface
To run these commands from the command prompt, you must either enter the netsh interface context or prepend the context to the command. For example, if you are at the command prompt but have not typed netsh and then interface to enter the netsh interface context, you must type:netsh interface commandWhere command is the command that you want to run, including all of the required parameters for the command.The Netsh Interface context also includes several subcontexts.
Subcontexts of Netsh Interface
This context provides the following subcontexts:Subcontext name | Result |
---|---|
6to4 | Changes to the netsh interface 6to4 context. |
HTTPSTunnel | netsh interface HTTPSTunnel |
ipv4 | Changes to the netsh interface ipv4 context. |
ipv6 | Changes to the netsh interface ipv6 context. |
isatap | Changes to the netsh interface isatap context. |
portproxy | Changes to the netsh interface portproxy context. |
tcp | Changes to the netsh interface tcp context. |
teredo | Changes to the netsh interface teredo context. |
Formatting legend
For information on how to interpret netsh command syntax, see Formatting Legend.Netsh Interface command reference
Following are the details for the commands in the Netsh Interface context.add
Adds an interface to the router. For full interfaces, a phone book entry with the same name must already exist on the system.Syntaxadd [name=] Name [[type=]full]ParametersnameRequired. Specifies the name of the interface to be added.typeOptional. Specifies that a demand dial interface is created when full is designated.ExamplesFollowing is an example of the add interface command that creates a demand dial interface.add name="Demand-Dial Interface" type=fulldelete
Deletes an interface from the router.Syntaxdelete [ name= ] NameParametersnameRequired. Specifies the name of the interface to be deleted.Examples:The following example command deletes a demand dial interface at the routerdelete name="Demand-Dial Interface"reset
Deletes all of the interfaces that can be added through this context.Syntaxresetset credentials
Specifies the credentials that are used to connect to or add an interface.Syntaxset credentials [ name= ] InterfaceName [ user= ]UserName [[ domain= ] Domain [password=] Password ]ParametersInterfaceNameRequired. Specifies the name of the interface that you want to add.UserNameRequired. Specifies the user account name that has the required permissions to add an interface.DomainOptional. Specifies the domain where the user account is located.PasswordOptional. Specifies the password of the user account.ExamplesFollowing are two examples of the set credentials command.set credentials name="Demand-Dial Interface" user=guestset credentials name="Demand-Dial Interface" user=admin domain=mydomain password=mypasswordset interface
Changes the parameters for an existing interface.Syntaxset interface [name = ] IfName [ [admin = ] ENABLED|DISABLED [connect = ] CONNECTED|DISCONNECTED [newname = ] NewName ]ParametersIfNameRequired. Specifies the name of the interface that you want to modify.adminOptional. Specifies whether the interface should be enabled or disabled.connectOptional. Specifies whether or not to enable and connect the interface (non-LAN only).newnameOptional. Specifies a new name for the interface (LAN only).RemarksAt least one option other than the name must be specified.If you specify that the value for connect equals CONNECTED, then the interface is automatically enabled even if you also specify that the value for adminequals DISABLED.
show credentials
Displays the credentials that are used to connect to an interface.Syntaxshow credentials [name = ] IfNameParametersIfNameRequired. Specifies the name of the interface whose credentials you want to display.show interface
Displays a list of the configured interfaces, including their current Name, Admin State, State, and Type.Syntaxshow interface [[name=] Name]ParametersNameOptional. Specifies the name of the interface that you want to display. If Name is not specified, all interfaces are displayed.ExamplesFollowing is an example of the show interface command.show interface name="Local Area Connection"
相关文章推荐
- Network interface operations for IPv4 and IPv6 on AIX Version 5.3
- C Language Examples of IPv4 and IPv6 Raw Sockets for Linux
- Handbook of IPv4 to IPv6 Transition: Methodologies for Institutional and Corporate Networks
- gateways for IPv4 and IPv6
- How to support both ipv4 and ipv6 address for JAVA code.
- How to enable packet forwarding for IPv4 and IPv6
- C Language Examples of IPv4 and IPv6 Raw Sockets for Linux
- What is the "internal" interface and port for on Openvswitch?
- getaddrinfo 进行域名解析 ipv4 and ipv6
- iptables -- administration tool for IPv4 packet filtering and NAT
- Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean错误
- SUSE Linux Toolbox: 1000+ Commands for openSUSE and SUSE, Linux Enterprise (Paperback) Dec.2007.eBook-BBL
- Macros for Build Commands and Properties
- cyrus-and/chrome-remote-interface: Chrome Debugging Protocol interface for Node.js
- How to add route for IPV6 interface
- Cool Commands for Unix and Windows (ZZ)
- How to Support MUI (Multi User Interface) for both Vista and XP
- Netsh Commands for Wireless Local Area Network (WLAN) in Windows Server 2008 R2
- DE2 framebuffer and video capture interface for SOPC (altera11.0)
- BR16F84 OBD II Interface Chip For PWM, VPW, and ISO 9141-2 Vehicles