Netsh commands for Interface IPv6
The Netsh commands for Interface IPv6 provide a command-line tool that you can use to query and configure IPv6 interfaces, address, caches, and routes.
In addition, the Interface IPv6 context of netsh has a subcontext for 6to4. You can use the commands in the netsh interface IPv6 6to4 context to configure or display the configuration of the 6to4 service on either a 6to4 host or a 6to4 router.
You can run these commands at the command prompt for the netsh interface ipv6 context. For these commands to work at the command, you must type netsh interface ipv6 before typing commands and parameters as they appear in the syntax below. To view help for a command at the command prompt, type CommandName/?, where CommandName is the name of the command.
For more information about netsh, see Netsh Overviewand Enter a Netsh Context.
To view the command syntax, click a command:
- 6to4
- add
6over4tunnel
- add
address
- add
dnsserver
- add
neighbors
- add
potentialrouter
- add
prefixpolicy
- add route
- add
v6v4tunnel
- delete
address
- delete
destinationcache
- delete
dnsserver
- delete
interface
- delete
neighbors
- delete
potentialrouter
- delete
prefixpolicy
- delete
route
- dump
- isatap
- reset
- set
address
- set
compartment
- set
dnsserver
- set
dynamicportrange
- set global
- set
interface
- set
neighbors
- set
prefixpolicy
- set
privacy
- set route
- set state
- set
subinterface
- set teredo
- show
address
- show
compartments
- show
destinationcache
- show
dnsservers
- show
dynamicportrange
- show
global
- show
interfaces
- show
ipstats
- show joins
- show
neighbors
- show
offload
- show
potentialrouters
- show
prefixpolicies
- show
privacy
- show route
- show
siteprefixes
- show
subinterfaces
- show
tcpstats
- show
teredo
- show
udpstats
6to4
Specifies that the 6to4 context of netsh interface IPv6 6to4 is used.
Syntax
6to4
add 6over4tunnel
Creates a 6over4 interface by using the specified IPv4 address.
Syntax
add 6over4tunnel [[interface=]String] [localaddress=]IPv4Address [[store=]{active | persistent}]
Parameters
- [[ interface=] String]
- Specifies an interface name or index.
- [ localaddress=] IPv4Address
- Required. Specifies the IPv4 address that is encapsulated.
- [[ store=]{ active| persistent}]
- Specifies whether the change lasts only until the next boot (active) or is persistent (persistent). The default selection is persistent.
Examples
This example command creates a 6over4 interface by using the IPv4 address 10.1.1.1 on the interface named "Private."
add 6over4tunnel "Private" 10.1.1.1
add address
Adds an IPv6 address to a specified interface. Time values can be expressed in days (d), hours (h), minutes (m), and seconds (s). For example, 2d represents two days.
Syntax
add address [[interface=]String] [address=]IPv6Address [[type=]{unicast | anycast}] [[validlifetime=]{Integer | infinite}] [[preferredlifetime=]{Integer | infinite}] [[store=]{active | persistent}]
Parameters
- [[ interface=] String]
- Specifies an interface name or index.
- [ address=] IPv6Address
- Required. Specifies the IPv6 address to add.
- [[ type=]{ unicast| anycast}]
- Specifies whether a unicast address (unicast) or an anycast address (anycast) is added. The default selection is unicast.
- [[ validlifetime=]{ Integer| infinite}]
- Specifies the lifetime over which the address is valid. The default value is infinite.
- [[ preferredlifetime=]{ Integer| infinite}]
- Specifies the lifetime over which the address is preferred. The default value is infinite.
- [[ store=]{ active| persistent}]
- Specifies whether the change lasts only until the next boot (active) or is persistent (persistent). The default selection is persistent.
Examples
This example command adds the IPv6 address FE80::2 to the interface named "Private."
add address "Private" FE80::2
add dnsserver
Adds a new DNS server IP address to the statically-configured list of DNS servers for the specified interface.
Syntax
add dnsserver [interface=]String [address=]IPAddress [[index=]Integer]
Parameters
- [ interface=] String
- Required. Specifies, by name, which interface will have a DNS server IP address added to its list of DNS server IP addresses.
- [ address=] IPAddress
- Required. Specifies the IPv6 address of the DNS server to add to the list.
- [[ index=] Integer]
- Specifies the position on the statically-configured list in which to place the DNS server IP address specified in address. By default, the DNS server IP address is added to the end of the list.
Remarks
If an index is specified, the Domain Name System (DNS) server is placed in that position in the list.
Examples
In the first example command, a DNS server with the IPv6 address FEC0:0:0:FFFF::1 is added to the list of DNS server IP addresses for the interface named "Local Area Connection." In the second example, a DNS server with the IPv6 address FEC0:0:0:FFFF::2 is added at index 2 as the second server on the list of servers for the interface named "Local Area Connection."
add dnsserver "Local Area Connection" FEC0:0:0:FFFF::1
add dnserver "Local Area Connection" FEC0:0:0:FFFF::2 index=2
add neighbors
Specifies an entry in the neighbor cache.
Syntax
add neighbors [[interface=]String] [[address=]IPv4Address] [neighbor=]<string> [[subinterface=]<string>]
Parameters
- [[ interface=] String]
- Specifies an interface name or index.
- [[ address=] IPv4Address]
- Specifies the address of the neighbor.
- [neighbor=]<string>
- Specifies the link layer address of the neighbor.
- [[subinterface=]<string>]
- Specifies the LUID of the subinterface. This is only needed on interfaces with multiple subinterfaces.
- [[store=]active|persistent]
- One of the following values:
- active: Address will disappear on next
boot.
- Persistent (default): Address will be
persistent.
- active: Address will disappear on next
boot.
Examples
This example command adds an entry to the neighbor cache on the interface named "Private."
add neighbors "Private" "3f::2" "12-34-56-78-9a-bc"
add potentialrouter
Adds a potential router to a given interface.
Syntax
add potentialrouter [interface=]<string> [[address=]<IPv6 address>]
Parameters
- [[ interface=] String]
- Specifies an interface name or index.
- [[ address=] IPv6Address]
- Specifies the address of the potential router.
add prefixpolicy
Adds a source and destination address selection policy for a specified prefix.
Syntax
add prefixpolicy [prefix=]IPv6Address/Integer [precedence=]Integer [label=]Integer [[store=]{active | persistent}]
Parameters
- [ prefix=] IPv6Address/Integer
- Required. Specifies the prefix for which to add a policy in the policy table. Integer specifies the prefix length.
- [ precedence=] Integer
- Required. Specifies the precedence value used for sorting destination addresses in the policy table.
- [ label=] Integer
- Required. Specifies the label value that allows for policies that require a specific source address prefix for use with a destination address prefix.
- [[ store=]{ active| persistent}]
- Specifies whether the change lasts only until the next boot (active) or is persistent (persistent). The default selection is persistent.
Examples
This example command adds a prefix policy for prefix ::/96, with a precedence value of three and a label value of four.
add prefixpolicy ::/96 3 4
add route
Adds a route for a specified prefix. Time values can be expressed in days (d), hours (h), minutes (m), and seconds (s). For example, 2d represents two days.
Syntax
add route [prefix=]IPv6Address/Integer [[interface=]String] [[nexthop=]IPv6Address] [[siteprefixlength=]Integer] [[metric=]Integer] [[publish=]{no | yes | immortal}] [[validlifetime=]{Integer | infinite}] [[preferredlifetime=]{Integer | infinite}] [[store=]{active | persistent}]
Parameters
- [ prefix=] IPv6Address/Integer
- Required. Specifies the prefix for which to add a route. Integer specifies the prefix length.
- [[ interface=] String]
- Specifies an interface name or index.
- [[ nexthop=] IPv6Address]
- Specifies the gateway address, if the prefix is not on-link.
- [[ siteprefixlength=] Integer]
- Specifies the prefix length for the entire site, if the prefix is not on-link.
- [[ metric=] Integer]
- Specifies the route metric.
- [[ publish=]{ no| yes| immortal}]
- Specifies whether routes are advertised (yes), advertised with an infinite lifetime (immortal), or not advertised (no) in Route Advertisements. The default selection is no.
- [[ validlifetime=]{ Integer| infinite}]
- Specifies the lifetime over which the route is valid. The default value is infinite.
- [[ preferredlifetime=]{ Integer| infinite}]
- Specifies the lifetime over which the route is preferred. The default value is infinite.
- [[ store=]{ active| persistent}]
- Specifies whether the change lasts only until the next boot (active) or is persistent (persistent). The default selection is persistent.
Examples
This example command adds a route on the interface named "Internet" with a prefix of 3FFE:: and a prefix length of 16 bits (3FFE::/16). The nexthop value is FE80::1.
add route 3FFE::/16 "Internet" FE80::1
add v6v4tunnel
Creates an IPv6-in-IPv4 tunnel.
Syntax
add v6v4tunnel [[interface=]String] [localaddress=]IPv4Address [remoteaddress=]IPv4Address [[neighbordiscovery=]{enabled | disabled}] [[store=]{active | persistent}]
Parameters
- [[ interface=] String]
- Specifies an interface name or index.
- [ localaddress=] IPv4Address
- Required. Specifies the IPv4 address of the local tunnel endpoint.
- [ remoteaddress=] IPv4Address
- Required. Specifies the IPv4 address of the remote tunnel endpoint.
- [[ neighbordiscovery=]{ enabled| disabled}]
- Specifies whether Neighbor Discovery is enabled (enabled) or disabled (disabled) on the interface. The default selection is disabled.
- [[ store=]{ active| persistent}]
- Specifies whether the change lasts only until the next boot (active) or is persistent (persistent). The default selection is persistent.
Examples
This example command creates an IPv6-in-IPv4 tunnel between the local address 10.0.0.1 and the remote address 192.168.1.1 on the interface "Private."
add v6v4tunnel "Private" 10.0.0.1 192.168.1.1
delete address
Syntax
delete address [[interface=]String] [address=]IPv6Address [[store=]{active | persistent}]
Modifies an IPv6 address on a specified interface.
Parameters
- [[ interface=] String]
- Specifies an interface name or index.
- [ address=] IPv6Address
- Required. Specifies the IPv6 address to delete.
- [[ store=]{ active| persistent}]
- Specifies whether the deletion lasts only until the next boot (active) or is persistent (persistent). The default selection is persistent.
Examples
This example command deletes the address FE80::2 from the interface named "Private."
delete address "Private" FE80::2
delete destinationcache
Clears the destination cache. If an interface is specified, clears the cache only on that interface. If an address is also specified, deletes only that destination cache entry.
Syntax
delete destinationcache [[interface=]String] [[address=]IPv6Address]
Parameters
- [[ interface=] String]
- Specifies an interface name or index.
- [[ address=] IPv6Address]
- Specifies the address of the destination.
Remarks
When no parameters are specified, all entries in the destination caches for all interfaces are deleted.
Examples
This example command deletes the destination cache for the interface named "Private."
delete destinationcache "Private"
delete dnsserver
Deletes statically configured DNS server IPv6 addresses for a specific interface.
Syntax
delete dnsserver [interface=]String [[address=]{IPv6Address | all}]
Parameters
- [ interface=] String
- Required. Specifies the interface, by name, for which you want to remove a DNS server from the list of DNS servers.
- [[ address=]{ IPv6Address| all}]
- Specifies the DNS server IPv6 address to delete. If all is specified, all DNS server IPv6 addresses on the list for the interface are deleted.
Examples
In the first example command, the DNS server IPv6 address FEC0:0:0:FFFF::1 is deleted from the list of addresses for the connection named "Local Area Connection." In the second example command, all DNS server IPv6 addresses are deleted for the connection named "Local Area Connection."
delete dnsserver "Local Area Connection" FEC0:0:0:FFFF::1
delete dnsserver "Local Area Connection" all
delete interface
Deletes a specified interface from the IPv6 stack.
Syntax
delete interface [[interface=]String] [[store=]{active | persistent}]
Parameters
- [[ interface=] String]
- Specifies an interface name or index.
- [[ store=]{ active| persistent}]
- Specifies whether the deletion lasts only until the next boot (active) or is persistent (persistent). The default selection is persistent.
Examples
This example command deletes the interface named "Private."
delete interface "Private"
delete neighbors
Specifies that all entries in the neighbor cache are deleted. If an interface is specified, clears the cache only on that interface. If an address is also specified, deletes only that neighbor cache entry.
Syntax
delete neighbors [[interface=]String] [[address=]IPv6Address]
Parameters
- [[ interface=] String]
- Specifies an interface name or index.
- [[ address=] IPv6Address]
- Specifies the address of the neighbor.
Examples
This example command removes all entries from the neighbor cache on the interface named "Private."
delete neighbors "Private"
delete potentialrouter
Delete a potential router from a given interface.
Syntax
delete potentialrouter [interface=]<string> [[address=]<IPv6 address>]
Parameters
- [[ interface=] String]
- Specifies an interface name or index.
- [[ address=] IPv6Address]
- Specifies the address of the potential router.
delete prefixpolicy
Deletes the source and destination address selection policy for a specified prefix.
Syntax
delete prefixpolicy [prefix=]IPv6Address/Integer [[store=]{active | persistent}]
Parameters
- [ prefix=] IPv6Address/Integer
- Required. Specifies the prefix (IPv6Address) and prefix length (Integer) to delete from the policy table.
- [[ store=]{ active| persistent}]
- Specifies whether the deletion lasts only until the next boot (active) or is persistent (persistent). The default selection is persistent.
Examples
This example command deletes the prefix ::/96 from the policy table.
delete prefixpolicy ::/96
delete route
Deletes an IPv6 route.
Syntax
delete route [prefix=]IPv6Address/Integer [[interface=]String] [[nexthop=]IPv6Address] [[store=]{active | persistent}]
Parameters
- [ prefix=] IPv6Address/Integer
- Required. Specifies the prefix of the route to delete.
- [[ interface=] String]
- Specifies an interface name or index.
- [[ nexthop=] IPv6Address]
- Specifies the gateway address, if the prefix is not on-link.
- [[ store=]{ active| persistent}]
- Specifies whether the deletion lasts only until the next boot (active) or is persistent (persistent). The default selection is persistent.
Examples
This example command deletes the route with the prefix 3FFE::/16 and the gateway FE80::1 from the interface named "Internet."
delete route 3FFE::/16 "Internet" FE80::1
dump
Dumps the network adapter IPv6 configuration to the command prompt window when run within the netsh context. When used in a batch file or script, output can be saved in a text file.
Syntax
netsh interface ipv6 dump > [PathAndFileName]
Parameters
- [ PathAndFileName]
- Specifies both the location where to the file is saved and the name of the destination file to which the configuration is saved.
Remarks
- After file output is obtained, you can use
the netsh exec command to either configure another computer
with the same IPv6 configuration or to restore the original
configuration on the same computer.
- All IPv6 configuration information is saved
with the dump command. For example, if an ISATAP or a 6to4
configuration is defined on an interface, the dump command
saves these settings in the text file.
Examples
In the first example, the command is run manually at the netsh interface ipv6 context of a command prompt. The IPv6 configuration is displayed in the command prompt window, and can be copied and pasted into a text file. In the second example, the dump command is run in a batch file, and the configuration is saved to a text file named Ipv6_conf.txt at the location C:\Temp.
dump
netsh interface ipv6 dump > C:\temp\ipv6_conf.txt
isatap
Specifies that the isatap context of netsh interface IPv6 isatap is used.
Syntax
isatap
Remarks
- Intrasite Automatic Tunnel Addressing
Protocol (ISATAP) is used for communication between IPv6 and IPv4
nodes within an IPv4 site. It is described in the Internet draft
titled "Intra-Site Automatic Tunnel Addressing Protocol (ISATAP)"
(draft-ietf-ngtrans-isatap-00.txt).
reset
Resets the IPv6 configuration state.
Syntax
reset
set address
Modifies an IPv6 address on a specified interface. Time values can be expressed in days (d), hours (h), minutes (m), and seconds (s). For example, 2d represents two days.
Syntax
set address [[interface=]String] [address=]IPv6Address [[type=]{unicast | anycast}] [[validlifetime=]{Integer | infinite}] [[preferredlifetime=]{Integer | infinite}] [[store=]{active | persistent}]
Parameters
- [[ interface=] String]
- Specifies an interface name or index.
- [ address=] IPv6Address
- Required. Specifies the IPv6 address to modify.
- [[ type=]{ unicast| anycast}]
- Specifies whether the address is marked as a unicast address (unicast) or as an anycast address (anycast). The default selection is unicast.
- [[ validlifetime=]{ Integer| infinite}]
- Specifies the lifetime over which the address is valid. The default value is infinite.
- [[ preferredlifetime=]{ Integer| infinite}]
- Specifies the lifetime over which the address is preferred. The default value is infinite.
- [[ store=]{ active| persistent}]
- Specifies whether the change lasts only until the next boot (active) or is persistent (persistent). The default selection is persistent.
Examples
This example command sets the address FE80::2 on the interface named "Private" as an anycast address.
set address "Private" FE80::2 anycast
set compartment
Modifies compartment configuration parameters.
Syntax
set compartment [compartment=]<integer> [defaultcurhoplimit=]<integer>[store=]active|persistent
Parameters
- [compartment=]<integer>
- Specifies an interface name or index.
- [defaultcurhoplimit=]<integer>[
- Specifies the address of the neighbor.
- [[store=]active|persistent]
- One of the following values:
- active: Address will disappear on next
boot.
- Persistent (default): Address will be
persistent.
- active: Address will disappear on next
boot.
Example
set compartment compartment=1 defaultcurhoplimit=255 store=active
set dnsserver
Configures a DNS server address for a specified interface.
Syntax
set dnsserver [name=]InterfaceName [source=]{dhcp | static } [addr=]{IP Address | none} [register=]{none | primary | both}
Parameters
- [ name=] InterfaceName
- Required. Specifies the name of the interface for which you want to set DNS information. The InterfaceName parameter must match the name of the interface as specified in Network Connections. If InterfaceName contains spaces, use quotation marks around the text (for example, "Interface Name").
- [ source=]{ dhcp| static }
- Required. Specifies whether the IP address of the DNS server is configured by DHCP or is static.
- [ addr=]{ IP Address| none }
- If the IP address is static, IP Address specifies the IP address of the DNS server to configure, and none specifies that the DNS configuration should be removed.
- [ register=]{ none| primary| both }
- None specifies whether to disable dynamic update. Primary registers the computer name under the primary DNS suffix only. Both register the computer name under both the primary DNS suffix as well as under the connection-specific suffix.
- /?
- Displays help at the command prompt.
Remarks
- If the interface is already statically
configured, the static parameter replaces the existing list
of DNS server addresses with the one specified in the command.
- Only if the [source] is static is the
[addr] option available for configuring a static list of DNS server
IP addresses for the specified interface.
Examples
set dnsserver name="Local Area Connection" source=dhcp
set dnsserver "Local Area Connection" static fec0:0:0:ffff::1 primary
set dynamicportrange
Modifies the range of ports used for dynamic port assignment. Dynamic port assignment is also known as wildcard port assignment.
Syntax
set dynamicportrange [[protocol=]tcp|udp][startport=]<integer> [numberofports=]<integer>[[store=]active|persistent]
Parameters
- [[protocol=[tcp|udp]
- One of the following values:
- TCP: Display the dynamic port range for
TCP.
- TCP: Display the dynamic port range for
TCP.
- [startport=]<integer>
- Specifies the starting port for dynamic port assignment.
- [numberofports=]<integer>
-
- Specifies the number of ports available for
dynamic port assignment.
- Specifies the number of ports available for
dynamic port assignment.
- [[store=]active|persistent]
- One of the following values:
- Active: Address will disappear on next
boot.
- Active: Address will disappear on next
boot.
Example
set dynamicportrange protocol=tcp startport=10000 numberofports=20000
set global
Modifies global configuration parameters.
Syntax
set global [[defaultcurhoplimit=]Integer] [neighborcachelimit=]Integer [[routecachelimit=]Integer] [[reassemblylimit=]Integer] [[store=]{active | persistent}]
Parameters
- [[ defaultcurhoplimit=] Integer]
- Specifies the default hop limit of packets sent.
- [ neighborcachelimit=] Integer
- Required. Specifies the maximum number of neighbor cache entries.
- [[ routecachelimit=] Integer]
- Specifies the maximum number of route cache entries.
- [[ reassemblylimit=] Integer]
- Specifies the maximum size of the reassembly buffer.
- [[ store=]{ active| persistent}]
- Specifies whether the change lasts only until the next boot (active) or is persistent (persistent). The default selection is persistent.
Examples
This example command sets global parameters for all IPv6-enabled interfaces on the computer. The default hop limit is set to 32, the maximum number of neighbor cache entries is set to 100, and the maximum number of route cache entries is 100,000.
set global 32 100 100000
set interface
Modifies interface configuration parameters.
Syntax
set interface [[interface=]String] [[forwarding=]{enabled | disabled}] [[advertise=]{enabled | disabled}] [[mtu=]Integer] [[siteid=]Integer] [[metric=]Integer] [[firewall=]{enabled | disabled}] [[siteprefixlength=]Integer] [[store=]{active | persistent}]
Parameters
- [[ interface=] String]
- Specifies an interface name or index.
- [[ forwarding=]{ enabled| disabled}]
- Specifies whether packets arriving on this interface can be forwarded to other interfaces. The default selection is disabled.
- [[ advertise=]{ enabled| disabled}]
- Specifies whether Router Advertisements are sent on this interface. The default selection is disabled.
- [[ mtu=] Integer]
- Specifies the Maximum Transfer Unit (MTU) of this interface. The default MTU is the natural MTU of the link.
- [[ siteid=] Integer]
- Specifies the site scope zone identifier.
- [[ metric=] Integer]
- Specifies the interface metric, which is added to route metrics for all routes over the interface.
- [[ firewall=]{ enabled| disabled}]
- The Firewall can no longer be configured from Netsh. The value specified is ignored.
- [[ siteprefixlength=] Integer]
- Specifies the default length of the global prefix for the entire site.
- [[ store=]{ active| persistent}]
- Specifies whether the change lasts only until the next boot (active) or is persistent (persistent). The default selection is persistent.
Examples
This example command sets the interface with the name "Private," with a siteid of two and a metric of two. All other parameter values are left at the default values.
set interface "Private" siteid=2 metric=2
set neighbors
Sets an entry in the neighbor cache.
Syntax
set neighbors [[interface=]String] [[address=]IPv6Address] [neighbor=]<string> [[subinterface=]<string>][[store=]active|persistent]
Parameters
- [[ interface=] String]
- Specifies an interface name or index.
- [[ address=] IPv6Address]
- Specifies the address of the neighbor.
- [neighbor=]<string>
- Specifies the link layer address of the neighbor.
- [[subinterface=]<string>]
- Specifies the LUID of the subinterface. This is only needed on interfaces with multiple subinterfaces.
- [[store=]active|persistent]
- One of the following values:
- active: Address will disappear on next
boot.
- Persistent (default): Address will be
persistent.
- active: Address will disappear on next
boot.
Examples
This example command sets an entry to the neighbor cache on the interface named "Private."
set neighbors "Private" "fec0::2" "12-34-56-78-9a-bc"
set prefixpolicy
Modifies a source and destination address selection policy for a specified prefix.
Syntax
set prefixpolicy [prefix=]IPv6Address/Integer [precedence=]Integer [label=]Integer [[store=]{active | persistent}]
Parameters
- [ prefix=] IPv6Address/Integer
- Required. Specifies the prefix for which to add a policy in the policy table. Integer specifies the prefix length.
- [ precedence=] Integer
- Required. Specifies the precedence value used for sorting destination addresses in the policy table.
- [ label=] Integer
- Required. Specifies the label value that allows for policies that require a specific source address prefix for use with a destination address prefix.
- [[ store=]{ active| persistent}]
- Specifies whether the change lasts only until the next boot (active) or is persistent (persistent). The default selection is persistent.
Examples
This example command sets a policy in the policy table for the prefix ::/96, with a precedence value of three and a label value of four.
set prefixpolicy ::/96 3 4
set privacy
Modifies parameters related to temporary address generation. If randomtime= is specified, maxrandomtime= is not used. Time values can be expressed in days (d), hours (h), minutes (m), and seconds (s). For example, 2d represents two days.
Syntax
set privacy [[state=]{enabled | disabled}] [[maxdadattempts=]Integer] [[maxvalidlifetime=]Integer] [[maxpreferredlifetime=]Integer] [[regeneratetime=]Integer] [[maxrandomtime=]Integer] [[randomtime=]Integer] [[store=]{active | persistent}]
Parameters
- [[ state=]{ enabled| disabled}]
- Specifies whether temporary addresses are enabled.
- [[ maxdadattempts=] Integer]
- Specifies the number of duplicate address detection attempts made. The default value is five.
- [[ maxvalidlifetime=] Integer]
- Specifies the maximum lifetime over which a temporary address is valid. The default value is 7d (seven days).
- [[ maxpreferredlifetime=] Integer]
- Specifies the maximum lifetime over which an anonymous is preferred. The default value is 1d (one day).
- [[ regeneratetime=] Integer]
- Specifies the duration of time that elapses when a new address is generated prior to deprecating a temporary address. The default value is 5s (five seconds).
- [[ maxrandomtime=] Integer]
- Specifies the upper limit to use when computing a random delay at boot. The default value is 10m (10 minutes).
- [[ randomtime=] Integer]
- Specifies a time value to use, instead of a value generated at boot.
- [[ store=]{ active| persistent}]
- Specifies whether the change lasts only until the next boot (active) or is persistent (persistent). The default selection is persistent.
set route
Modifies route parameters. Time values can be expressed in days (d), hours (h), minutes (m), and seconds (s). For example, 2d represents two days.
Syntax
set route [prefix=]IPv6Address/Integer [[interface=]String] [[nexthop=]IPv6Address] [[siteprefixlength=]Integer] [[metric=]Integer] [publish=]{no | yes | immortal}] [[validlifetime=]{Integer | infinite}] [[preferredlifetime=]{Integer | infinite}] [[store=]{active | persistent}]
Parameters
- [ prefix=] IPv6Address/Integer
- Required. Specifies the prefix (IPv6Address) and prefix length (Integer) of the route to modify.
- [[ interface=] String]
- Specifies an interface name or index.
- [[ nexthop=] IPv6Address]
- Specifies the gateway address, if the prefix is not on-link.
- [[ siteprefixlength=] Integer]
- Specifies the prefix length for the entire site, if the prefix is not on-link.
- [[ metric=] Integer]
- Specifies the route metric.
- [[ publish=]{ no| yes| immortal}]
- Specifies whether routes are advertised (yes), advertised with an infinite lifetime (immortal), or not advertised (no) in Route Advertisements. The default selection is no.
- [[ validlifetime=]{ Integer| infinite}]
- Specifies the lifetime over which the route is valid. The default value is infinite.
- [[ preferredlifetime=]{ Integer| infinite}]
- Specifies the lifetime over which the route is preferred. The default value is infinite.
- [[ store=]{ active| persistent}]
- Specifies whether the change lasts only until the next boot (active) or is persistent (persistent). The default selection is persistent.
Examples
This example command sets a route on the interface named "Internet." The route prefix is 3FFE::, and has a length of 16 bits. The gateway address, defined by the nexthop= parameter, is FE80::1.
set route 3FFE::/16 "Internet" FE80::1
set state
Enables or disables IPv4 compatibility. The default value for all parameters is disabled.
Syntax
set state [[6over4=]{enabled | disabled | default}] [[v4compat=]{enabled | disabled | default}]
Parameters
- [[6over4=]{enabled| disabled| default}]
- Specifies whether 6over4 interfaces are created. To both disable and delete 6over4 compatible interfaces, specify default. To disable 6over4 compatible interfaces without deleting them, specify disabled.
- [[ v4compat=]{ enabled| disabled| default}]
- Specifies whether IPv4 compatible interfaces are created. To both disable and delete IPv4 compatible interfaces, specify default. To disable IPv4 compatible interfaces without deleting them, specify disabled.
Examples
In the first example command, IPv4-compatible addresses are disabled, and any previously existing interfaces are deleted. In the second example command, IPv4-compatible addresses are enabled.
set state default
set state 6over4=disabled v4compat=enabled
set subinterface
Modifies subinterface configuration parameters.
Syntax
set subinterface [interface=]<string> [[mtu=]<integer>] [[subinterface=]<string>] [[store=]active|persistent]
Parameters
- [[ interface=] String]
- Specifies an interface name or index.
- [[mtu=]<integer>]
- Specifies the MTU of this subinterface. The default is the natural MTU of the link.
- [[subinterface=]<string>]
- Specifies the subinterface LUID. This is only required on interfaces with multiple subinterfaces.
- [[ store=][active|persistent]
- Specifies whether active (active) or persistent (persistent) addresses are displayed. The default selection is active.
Example
set subinterface "1" mtu=1500 store=active
set teredo
Sets the Teredo state. A 'default' argument to a parameter sets it to the system default.
Syntax
set teredo [[type]=disabled|client|enterpriseclient|default][[servername=]<hostname>|<IPv4 address>|default][[refreshinterval=]<integer>|default][[clientport=]<integer>|default][[supernode=]<hostname>|<IPv4 address>|default]
Parameters
- [[type]=disabled|client|enterpriseclient|default]
- One of the following values:
- Disabled: Disables the Teredo service.
- Client: Enables the Teredo client.
- Enterpriseclient: Skip managed network
detection.
- Disabled: Disables the Teredo service.
- [servername=]<hostname>|<IPv4 address>|default]
- Specifies the name or IPv4 address of the Teredo server.
- [refreshinterval=]<integer>|default]
- Specifies the client refresh interval (in seconds).
- [clientport=]<integer>|default]
- Specifies the client's UDP port (otherwise chosen by system).
- [supernode=]<hostname>|<IPv4 address>|default]
- Specifies the super-node to use when behind a firewall.
Examples
set teredo disable
set teredo client teredo.ipv6.microsoft.com 60 34567
show address
Displays all IPv6 addresses, or all addresses on a specified interface.
Syntax
show address [[interface=]String] [[level=]{normal | verbose}] [[store=]{active | persistent}]
Parameters
- [[ interface=] String]
- Specifies an interface name or index.
- [[ level=]{ normal| verbose}]
- Specifies whether one line per interface is displayed (normal) or additional information is displayed for each interface (verbose). When no interface is specified, the default selection is normal. When an interface is specified, the default selection is verbose.
- [[ store=]{ active| persistent}]
- Specifies whether active (active) or persistent (persistent) addresses are displayed. The default selection is active.
show compartments
Displays information about all compartments, or about a given compartment if one is specified.
Syntax
show compartments [compartment=]<integer> [[level=]normal|verbose] [store=]active|persistent
Parameters
- [compartment=]<integer>
- Specifies an interface name or index.
- [[level=]normal|verbose]
- One of the following values:
- normal: Display one line per compartment
(default when no compartment is specified).
- verbose: Display extra information about each
compartment( default when a compartment is specified).
- normal: Display one line per compartment
(default when no compartment is specified).
- [[store=]active|persistent]
- One of the following values:
- active: Address will disappear on next
boot.
- Persistent (default): Address will be
persistent.
- active: Address will disappear on next
boot.
Example
show compartments
show destinationcache
Displays destination cache entries. If an interface is specified, displays the cache only on that interface. If an address is also specified, displays only that destination cache entry.
Syntax
show destinationcache [[interface=]String] [[address=]IPv6Address]
Parameters
- [[ interface=] String]
- Specifies an interface name or index.
- [[ address=] IPv6Address]
- Specifies the address of the destination.
show dnsservers
Displays the DNS server configuration for a specific interface or interfaces.
Syntax
show dnsservers [[interface=]String]
Parameters
- [[ interface=] String]
- Specifies the interface, by name, for which you want to display configured DNS server IPv6 addresses. If no interface is specified, servers for all interfaces are displayed.
Examples
In this example command, DNS server IPv6 addresses configured on the "Local Area Connection" interface are displayed.
show dnsservers "Local Area Connection"
show dynamicportrange
Displays dynamic port range configuration parameters.
Syntax
show dynamicportrange [[protocol=]tcp|udp] [[store=]active|persistent]
Parameters
- [[protocol=[tcp|udp]
- One of the following values:
- TCP: Show the dynamic port range for TCP.
- UDP: Show the dynamic port range for UDP.
- TCP: Show the dynamic port range for TCP.
- [[store=]active|persistent]
- One of the following values:
- Active: Address will disappear on next
boot.
- Persistent (default): Address will be
persistent.
- Active: Address will disappear on next
boot.
Example
show dynamicportrange
show global
Displays global configuration parameters.
Syntax
show global [[store=]{active | persistent}]
Parameters
- [[ store=]{ active| persistent}]
- Specifies whether active (active) or persistent (persistent) information is displayed. The default selection is active.
show interfaces
Displays information about all interfaces, or about a specified interface.
Syntax
show interfaces [[interfaces=]String] [[level=]{normal | verbose}] [[store=]{active | persistent}]
Parameters
- [[ interfaces=] String]
- Specifies an interface name or index.
- [[ level=]{ normal| verbose}]
- Specifies whether one line per interface is displayed (normal) or additional information is displayed for each interface (verbose). When no interface is specified, the default selection is normal. When an interface is specified, the default selection is verbose.
- [[ store=]{ active| persistent}]
- Specifies whether active (active) or persistent (persistent) interfaces are displayed. The default selection is active.
show ipstats
Displays IP statistics. Used without parameters, show ipstats displays the statistics once.
Syntax
show ipstats [[rr=]RefreshRate]
Parameters
- [ rr=] RefreshRate
- Specifies the refresh rate (the number of seconds between refreshing the display of the statistics).
- /?
- Displays help at the command prompt.
show joins
Displays all IPv6 multicast addresses, or all multicast addresses on a specified interface.
Syntax
show joins [[interface=]String] [[level=]{normal | verbose}]
Parameters
- [[ interface=] String]
- Specifies an interface name or index.
- [[ level=]{ normal| verbose}]
- Specifies whether one line per interface is displayed (normal) or additional information is displayed for each interface (verbose). When no interface is specified, the default selection is normal. When an interface is specified, the default selection is verbose.
show neighbors
Displays neighbor cache entries. If an interface is specified, the command displays the cache only on that interface. If a subinterface is also specified, the command shows only the cache for that subinterface. If an address is specified as well, the command displays only that specific neighbor cache entry.
Syntax
show neighbors [[interface=]String] [[address=]IPv6Address] [neighbor=]<string> [[subinterface=]<string>][[store=]active|persistent] [[level=]normal|verbose]
Parameters
- [[ interface=] String]
- Specifies an interface name or index.
- [[ address=] IP6Address]
- Specifies the address of the neighbor.
- [[subinterface=]<string>]
- Specifies the LUID of the subinterface. This is only needed on interfaces with multiple subinterfaces.
- [[store=]active|persistent]
- One of the following values:
- active: Address will disappear on next
boot.
- Persistent (default): Address will be
persistent.
- active: Address will disappear on next
boot.
- [[level=]normal|verbose]
- One of the following values:
- normal: Display one line per subinterface
(default when no subinterface is specified).
- verbose: Display extra information on each
subinterface. (default when a subinterface is specified).
- normal: Display one line per subinterface
(default when no subinterface is specified).
Example
show neighbors
show offload
Displays the tasks that can be performed by the network adapter for the specified interface corresponding to installed network hardware. Used without parameters, show offload displays offload information for all interfaces corresponding to installed network hardware.
Syntax
show offload [[name=]InterfaceName ]
Parameters
- [ name=] InterfaceName
- Specifies the name of the interface for which you want to display offload information. The InterfaceName parameter must match the name of the interface as specified in Network Connections. If InterfaceName contains spaces, use quotation marks around the text (for example, "Interface Name").
- /?
- Displays help at the command prompt.
show potentialrouters
Displays all potential routers, or all potential routers on a given
interface if one is specified.
Syntax
show potentialrouter [interface=]<string> [[level=]normal|verbose]
Parameters
- [[ interface=] String]
- Specifies an interface name or index.
- [[level=]normal|verbose]
- One of the following values:
- normal: Display one line per subinterface
(default when no subinterface is specified).
- verbose: Display extra information on each
subinterface. (default when a subinterface is specified).
- normal: Display one line per subinterface
(default when no subinterface is specified).
show prefixpolicies
Displays prefix policy table entries used in source and destination address selection.
Syntax
show prefixpolicies [[store=]{active | persistent}]
Parameters
- [[ store=]{ active| persistent}]
- Specifies whether active (active) or persistent (persistent) information is displayed. The default selection is active.
show privacy
Displays privacy configuration parameters.
Syntax
show privacy [[store=]{active | persistent}]
Parameters
- [[ store=]{ active| persistent}]
- Specifies whether active (active) or persistent (persistent) information is displayed. The default selection is active.
show route
Displays route table entries.
Syntax
show route [[level=]{normal | verbose}] [[store=]{active | persistent}]
Parameters
- [[ level=]{ normal| verbose}]
- Specifies whether only normal routes (normal) or routes used for loopback (verbose) are displayed. The default selection is normal.
- [[ store=]{ active| persistent}]
- Specifies whether active (active) or persistent (persistent) routes are displayed. The default selection is active.
show siteprefixes
Displays the site prefix table.
Syntax
show siteprefixes
show subinterfaces
Displays information about all subinterfaces, or about all subinterfaces on a given interface if one is specified.
Syntax
show subinterfaces [interface=]<string> [[ level=]normal| verbose] [[subinterface=]<string>] [[store=]active|persistent]
- [[ interface=] String]
- Specifies an interface name or index.
- [[ level=]normal|verbose]
- Specifies whether only normal routes (normal) or routes used for loopback (verbose) are displayed. The default selection is normal.
- [[subinterface=]<string>]
- Specifies the subinterface LUID. This is only required on interfaces with multiple subinterfaces.
- [[ store=][active|persistent]
- Specifies whether active (active) or persistent (persistent) addresses are displayed. The default selection is active.
Example
show subinterfaces
show tcpstats
Displays TCP statistics. Used without parameters, show tcpstats displays the statistics once.
Syntax
show tcpstats [[rr=]RefreshRate]
Parameters
- [ rr=] RefreshRate
- Specifies the refresh rate (the number of seconds between refreshing the display of the statistics).
show teredo
shows the Teredo state.
Syntax
show teredo
Examples
show teredo
show udpstats
Displays UDP statistics. Used without parameters, show udpstats displays the statistics once.
Syntax
show udpstats [[rr=]RefreshRate]
Parameters
- [ rr=] RefreshRate
- Specifies the refresh rate (the number of seconds between refreshing the display of the statistics).
- /?
- Displays help at the command prompt.
Netsh interface IPv6 6to4
You can use the following commands in the netsh interface IPv6 6to4 context to display the configuration of or configure the 6to4 service on either a 6to4 host or a 6to4 router. For more information about Netsh, see Netsh Overview.
set interface
Configures the 6to4 service on an interface.
Syntax
set interface [name=] InterfaceName [[routing=] {enabled | disabled | default}]
Parameters
- [ name=] InterfaceName
- Required. Specifies the name of the interface for which you want to set 6to4 service configuration. InterfaceName must match the name of the interface specified in Network Connections. If InterfaceName contains any spaces, it must be enclosed in quotes.
- [[ routing=] { enabled| disabled| default}]
- Specifies whether the forwarding of 6to4 packets received on the interface is enabled, disabled, or set to its default value.
Remarks
- This command enables, disables, or sets to
default the routing behavior of the 6to4 service on a specified
interface.
The default setting for the routing= parameter is enabled, which enables routing on private interfaces if Internet Connection Sharing (ICS) is used.
Note
- Internet Connection Sharing and Network
Bridge are not included in Windows Server 2003, Web Edition;
Windows Server 2003, Datacenter Edition; and the Itanium-based
versions of the original release of the Windows Server 2003
operating systems.
show interface
Displays the 6to4 service routing configuration on all interfaces, or on a specified interface.
Syntax
show interface [[name=] InterfaceName]
Parameters
- [[ name=] InterfaceName]
- Specifies the name of the interface for which you want to display the 6to4 service configuration. InterfaceName must match the name of the interface specified in Network Connections. If InterfaceName contains any spaces, it must be enclosed in quotes.
Remarks
- If an interface name is not specified, the
6to4 configuration for all interfaces is displayed.
set relay
Configures the name of the 6to4 relay router for the 6to4 service. Additionally, specifies how often the name is resolved and the state of the relay component for the 6to4 service.
Syntax
set relay [[name=] {RelayDNSName | default}] [[state=] {enabled | disabled | automatic | default}] [[interval=] {ResInterval | default}]
Parameters
- [[ name=] { RelayDNSName| default}]
- Specifies either the fully qualified domain name (FQDN) of a 6to4 relay router on the IPv4 Internet (RelayDNSName), or sets the relay name to its default value of 6to4.ipv6.microsoft.com (default).
- [[ state=] { enabled| disabled| automatic| default}]
- Specifies whether the state of the relay component for the 6to4 service is enabled, disabled, automatically enabled if a public IPv4 address is configured, or set to its default value.
- [[ interval=] { ResInterval| default}]
- Specifies how often the name of the relay router is resolved in minutes (ResInterval) or sets the resolution interval to its default value of 1440 minutes (default).
Remarks
- The 6to4 relay router is a router that
provides an access point between the IPv4 Internet and the 6bone
(the native IPv6 portion of the Internet). In order to access 6bone
resources from a 6to4 router, the 6to4 router encapsulates 6to4
traffic with an IPv4 header and sends it to the IPv4 address of the
6to4 relay router. The 6to4 relay router removes the IPv4 header
and forwards the traffic to the 6bone. For return traffic, the 6to4
relay router encapsulates IPv6 traffic and sends it to the 6to4
router at the 6to4 host's site.
- The default name of the 6to4 relay router is
6to4.ipv6.microsoft.com.
- The default state is automatic, which
enables the forwarding of native IPv6 traffic to a relay router
when a public IPv4 address is assigned to any interface.
- The default resolution interval is 1440
minutes (once each day).
show relay
Displays the relay router configuration for the 6to4 service.
Syntax
show relay
set routing
Sets both the state of routing and the inclusion of site-local address prefixes in Router Advertisements that are sent by the 6to4 router.
Syntax
set routing [[routing=] {enabled | disabled | automatic | default}] [[sitelocals=] {enabled | disabled | default}]
Parameters
- [[ routing=] { enabled| disabled| automatic| default}]
- Specifies whether the state of routing on a 6to4 router is enabled, disabled, automatically enabled if Internet Connection Sharing (ICS) is enabled, or set to its default value.
- [[ sitelocals=] { enabled| disabled| default}]
- Specifies whether the advertising of site-local address prefixes, in addition to 6to4 address prefixes, is enabled, disabled, or set to its default value.
Remarks
- The default setting for the routing=
parameter is automatic, which enables routing on private
interfaces when ICS is used.
- The default setting for the
sitelocals= parameter is enabled, which enables the
advertising of site-local prefixes when site-local addresses are
configured on private interfaces.
Note
- Internet Connection Sharing and Network
Bridge are not included in Windows Server 2003, Web Edition;
Windows Server 2003, Datacenter Edition; and the Itanium-based
versions of the original release of the Windows Server 2003
operating systems.
show routing
Displays the routing configuration of the 6to4 service.
Syntax
show routing
set state
Configures the state of the 6to4 service.
Syntax
set state [[state=] {enabled | disabled | default}] [[undoonstop=] {enabled | disabled | default}] [[6over4=] {enabled | disabled | default}]
Parameters
- [[ state=] { enabled| disabled| default}]
- Specifies whether the state of the 6to4 service is enabled, disabled, or set to its default value.
- [[ undoonstop=] { enabled| disabled| default}]
- Specifies whether the reversal of all automatic configuration that has been performed by the 6to4 service occurs when the service stops is enabled, disabled, or set to its default value.
Remarks
- The default setting for the state=
parameter is enabled, which enables the 6to4 service.
- The default setting for the
undoonstop= parameter is enabled, which reverses all
automatic configuration performed by the 6to4 service when the
service is stopped.
show state
Displays the state of the 6to4 service.
Syntax
show state
Netsh interface ipv6 isatap
Intra-Site Automatic Tunnel Addressing Protocol (ISATAP) is an address assignment and tunneling mechanism for communication between IPv6/IPv4 nodes within an IPv4 site. It is described in the Internet draft titled "Intra-Site Automatic Tunnel Addressing Protocol (ISATAP)" (draft-ietf-ngtrans-isatap-00.txt). You can use the following commands to configure the ISATAP router.
set router
Specifies the Intra-Site Automatic Tunneling Address Protocol (ISATAP) router information, including router name, state, and resolution interval.
Syntax
set router [[name=]{String | default}] [[state=]{Enabled | Disabled | Default}] [[interval]=Integer]
Parameters
- [[ name=]{ String| default}]
- Specifies whether the router is named with a string. If default is specified, the system reverts to using the default name.
- [[ state=]{ Enabled| Disabled| Default}]
- Specifies whether the ISATAP router relays packets between subnets.
- [[ interval]= Integer]
- Specifies the router resolution interval, in minutes. The default interval is 1440 (24 hours).
Examples
The following example command sets the router name to isatap, enables the router, and sets the resolution interval to 120 minutes:
set router isatap enabled 120
set state
Enables or disables IPv4 compatibility. The default value for all parameters is disabled.
Syntax
set state [[state=]{enabled | disabled | default}]
Parameters
- [[state=]{enabled| disabled| default}]
- Specifies whether isatap interfaces are created. To both disable and delete isatap compatible interfaces, specify default. To disable isatap compatible interfaces without deleting them, specify disabled.
Examples
In this example command, IPv6-compatible addresses are disabled, and any previously existing interfaces are deleted.
set state default
show router
Displays configuration information for the ISATAP router.
Syntax
show router
Remarks
This command displays the router name, the relay state, and the resolution interval.
show state
Displays the ISATAP state.
Syntax
show state
For information on how to interpret netsh command syntax, see Formatting Legend.