IPv6 utilities

Configuration changes are not permanent and are lost if you reboot or restart the computer. You can save configuration changes by writing them as command lines in a command script file (.cmd) that you can run after restarting either your computer or the IPv6 protocol. To run your configuration changes automatically after restarting your computer, use Scheduled Tasks in Control Panel to run the .cmd file when the computer starts.

Ipv6.exe

Configuration for the IPv6 protocol is done with Ipv6.exe, which is used for querying and configuring interfaces, addresses, caches, and routes.

Ipv6.exe has numerous commands, each with its own set of parameters.

ipv6 install 

Installs the IPv6 protocol as a network protocol for LAN connections. After it is installed, it appears in the list of components in the properties of a local area connection in Network Connections. Type ipv6 if at the Command Prompt to determine whether IPv6 is installed.

ipv6 uninstall 

Removes the IPv6 protocol as a network protocol for LAN connections.

ipv6 [-v] if [IfIndex]

Displays information about interfaces. If an interface index number is specified, information about only that interface is displayed. Otherwise, information about all interfaces is displayed. The output includes the interface's link-layer address and the list of IPv6 addresses assigned to the interface. It includes the interface's current MTU and the maximum (true) MTU that the interface can support. The -v parameter displays additional interface information.

Interface 1 is a pseudo-interface that is used for loopback (named the Loopback Pseudo-Interface). Interface 2 is a pseudo-interface that is used for automatic tunneling (named the Automatic Tunneling Pseudo-Interface). Interface 3 is typically a pseudo-interface that is used for 6to4 tunneling (named the 6to4 Tunneling Pseudo-Interface). Other interfaces are numbered sequentially in the order in which they are created. This order varies among computers.

If the link-layer address is of the form aa-bb-cc-dd-ee-ff, it is a Fiber Distributed Data Interface (FDDI) or Ethernet interface.

The loopback, automatic tunneling, and 6to4 tunneling pseudo-interfaces do not use IPv6 Neighbor Discovery.

ipv6 ifcr v6v4 V4Src V4Dst [nd] [pmld]

Creates a configured IPv6 over IPv4 tunnel interface with the specified source and destination IPv4 addresses. The nd option enables Neighbor Discovery across the tunnel so that Router Advertisement messages can be sent and received. The pmld option enables periodic Multicast Listener Discovery (MLD) messages in case the node at the end of the tunnel uses the tunnel as a nonbroadcast multiple access (NBMA) link.

ipv6 ifcr 6over4 V4Src 

Creates an interface for 6over4 using the specified IPv4 source address. For more information about 6over4, see RFC 2529.

ipv6 ifc IfIndex {[forwards] | [-forwards]} {[advertises] | [-advertises]} [mtu #Bytes] [site SiteIdentifier]

Controls interface attributes. Interfaces can be forwarding, in which case they forward packets whose destination address is not assigned to the interface. Interfaces can be advertising, in which case they send router advertisements. These attributes can be independently controlled. An interface either sends router solicitations and receives router advertisements, or receives router solicitations and sends router advertisements.

Because the loopback and automatic tunneling pseudo-interfaces do not use Neighbor Discovery, they cannot be configured to send router advertisements.

You can abbreviate forwards as forw and advertises as adv.

You can set the MTU for the interface. The new MTU must be less than or equal to the link's maximum (true) MTU (as specified by ipv6 if), and greater than or equal to the minimum IPv6 MTU (1280 bytes).

You can also change the site-identifier for an interface. Site identifiers are used in the sin6_scope_id field for site-local addresses.

ipv6 ifd IfIndex 

Deletes an interface. The loopback and automatic tunneling pseudo-interfaces cannot be deleted.

ipv6 adu IfIndex/Address [life ValidLifetime[/PrefLifetime]] [anycast] [unicast]

Adds or removes a unicast or anycast address assignment on an interface, defaulting to unicast unless anycast is specified.

If lifetime is not specified, it is infinite. If only a valid lifetime is specified, then the preferred lifetime is equal to the valid lifetime. You can specify either an infinite lifetime or a specific lifetime in seconds. The preferred lifetime must be less than or equal to the valid lifetime. Specifying a lifetime of zero causes the address to be removed.

You can abbreviate lifetime as life.

For anycast addresses, the only valid lifetime values are zero and infinite.

ipv6 nc [IfIndex [Address]]

Displays the contents of the neighbor cache. If an interface number is specified, only the contents of that interface's neighbor cache are displayed. Otherwise, the contents of all of the interface's neighbor caches are displayed. If an interface is specified, you can specify an IPv6 address, displaying only the single neighbor cache entry.

The interface, IPv6 address, link-layer address, and reachability state are displayed for each neighbor cache entry.

ipv6 ncf [IfIndex [Address]]

Removes the specified neighbor cache entries. Only neighbor cache entries without references are removed. Because route cache entries contain references to neighbor cache entries, it is recommended that you first run the ipv6 rcf command. Routing table entries can also contain references to neighbor cache entries.

ipv6 rc [IfIndex [Address]]

Displays the contents of the route cache. The route cache is the name used in the IPv6 protocol for Windows for the destination cache. If an interface and address are specified, the route cache entry used to reach the address through the interface is displayed. Otherwise, all route cache entries are displayed.

For each route cache entry, the IPv6 address and the current next-hop interface and neighbor address are displayed. The preferred source address for use with this destination, the current path MTU for reaching this destination through the interface, and the specification of whether this is an interface-specific route cache entry are also displayed. If there is a care-of address for this destination address, it is also displayed.

A destination address can have multiple route cache entries--as many as one for each outgoing interface. However, a destination address can have a maximum of one route cache entry that is not interface-specific. An interface-specific route cache entry is used only if the application specifies that outgoing interface.

ipv6 rcf [IfIndex [Address]]

Removes the specified route cache entries.

ipv6 bc 

Displays the contents of the binding cache, which holds bindings between home addresses and care-of addresses for mobile IPv6.

The home address, the care-of address, and binding sequence number and lifetime are displayed for each binding.

ipv6 [-v] rt 

Displays the current contents of the routing table.

For each routing table entry, the route prefix, an on-link interface or a next-hop neighbor on an interface, a preference value (smaller is preferred), and a lifetime in seconds is displayed. Use the -v parameter to view additional system routing table entries.

Routing table entries might also have publish and aging attributes. By default, they age (the lifetime counts down) and are not published (not used in constructing router advertisements).

On hosts, routing table entries are normally autoconfigured from router advertisements.

For more information, see The IPv6 routing table

ipv6 rtu Prefix IfIndex[/Address] [life Valid[/Preferred]] [preference P] [publish] [age] [spl SitePrefixLength]

Adds or removes a route in the routing table. The route prefix is not optional. On-link prefixes require an interface. Off-link prefixes require an interface and a next-hop address. The route can have a lifetime in seconds (the default is infinite) and a preference (the default is zero, which is preferred). Specifying a lifetime of zero causes the route to be deleted.

If the route is specified as published (used in constructing router advertisements) then, by default, it does not age. The route lifetime does not count down, so it is effectively infinite. When the route is included in Router Advertisement messages, the lifetime is used. Optionally, a route can be specified as a published route that ages. A nonpublished route, by default, always ages.

The spl parameter can be used to specify a site prefix length associated with the route. The site prefix length is used only when sending router advertisements.

You can abbreviate lifetime as life, preference as pref, and publish as pub.

ipv6 spt 

Displays the contents of the site prefix table.

The prefix, the interface to which the site prefix applies, and the prefix lifetime (in seconds) are displayed for each site prefix.

Site prefixes are normally autoconfigured from router advertisements. They are used with the getaddrinfo() function to filter out inappropriate site-local addresses.

ipv6 spu Prefix IfIndex [life L]

Adds, removes, or updates a prefix in the site prefix table.

The prefix and interface number are not optional. The site prefix lifetime (specified in seconds) defaults to infinite when the lifetime is not specified. Specifying a lifetime of zero causes the site prefix to be deleted.

This command is not required for standard configuration of hosts or routers.

ipv6 gp 

Displays the values of the global parameters for the IPv6 protocol.

ipv6 [-p] gpu DefaultCurHopLimit Hops 

Sets the value of the Hop Limit field in the IPv6 header for packets sent by the node. The default value is 128. This value can be changed by Router Advertisement messages or applications. The -p option saves the setting in the registry.

ipv6 [-p] gpu UseAnonymousAddresses [yes|no|always|Counter]

Determines whether anonymous addresses are used. The default value is yes. The -p option saves the setting in the registry.

ipv6 [-p] gpu MaxAnonDADAttempts Number 

Sets the number of times that an anonymous address is checked for uniqueness. The default number of attempts is 5. The -p option saves the setting in the registry.

ipv6 [-p] gpu MaxAnonLifetime Valid[/Preferred]

Sets the valid and preferred lifetimes of anonymous addresses. The default valid lifetime is 7 days. The default preferred lifetime is 1 day. The -p option saves these settings in the registry.

ipv6 [-p] gpu AnonRegenerateTime Time 

Sets the period of time (in seconds) within which to generate a new anonymous address. The default value is 5 seconds. The -p option saves the setting in the registry.

ipv6 [-p] gpu MaxAnonRandomTime Time 

Sets the amount of time in minutes for the maximum anonymous random time. The anonymous random time is the time period that elapses prior to the expiration of the valid time in which an anonymous address can generate a new anonymous address. The IPv6 protocol for Windows randomly chooses an anonymous random time between the values of AnonRandomTime and MaxAnonRandomTime. Random staggering of anonymous address regeneration is done to prevent unwanted impacts on network traffic when a large number of anonymous addresses become simultaneously invalid. The default value is 10 minutes. The -p option saves the setting in the registry.

ipv6 [-p] gpu AnonRandomTime Time 

Sets the amount of time in seconds of the minimum anonymous random time. The default value is 0 seconds. The -p option saves the setting in the registry.

ipv6 [-p] gpu NeighborCacheLimit Number 

Sets the maximum number of entries in the neighbor cache for each interface. The default value is 8 entries. The -p option saves the setting in the registry.

ipv6 [-p] gpu RouteCacheLimit Number 

Sets the maximum number of entries in the route cache for each interface. The default value is 32 entries. The -p option saves the setting in the registry.

ipv6 ppt 

Displays the prefix policy table. The prefix policy table is used to specify the policies for source and destination address selection.

ipv6 ppu Prefix precedence PrecedenceValue srclabel SourceLabelValue [dstlabel DestinationLabelValue]

Updates the prefix policy table with a policy that specifies the preference, a source label value (SourceLabelValue), and a destination label value (DestinationLabelValue). Entries in the prefix policy table can modify the behavior of source and destination address selection. For more information, see the Internet draft titled "Default Address Selection for IPv6."

ipv6 renew [IfIndex]

Renews the IPv6 configuration for all interfaces. If an interface index number is specified, only the configuration for that interface is renewed. For a host, autoconfigured addresses are refreshed by sending Router Solicitation messages on the appropriate interfaces. Addresses are reconfigured on the basis of received Router Advertisement messages. For a router, multicast Router Advertisement messages are sent on all appropriate interfaces.

Ipsec6.exe

You can use Ipsec6.exe to configure IPSec policies and security associations.

Ipsec6.exe has multiple commands, each with its own set of parameters.

ipsec6 sp [Interface]

Displays the active security policies. Alternately, displays the active security policies for a specific interface.

ipsec6 sa 

Displays the active security associations.

ipsec6 l FileNameWithNoExtension 

Loads the security policies from FileName.spd, and the security associations from FileName.sad.

ipsec6 s FileNameWithNoExtension 

Saves the current security policies to FileName.spd, and the current security associations to FileName.sad. You can use this command to create files that are used to configure security policy and security associations. When there are no security policies or security associations, this command creates FileName.spd for security policies and FileName.sad for security associations. You can use these files as templates to configure the desired security policies or security associations by modifying them with a text editor.

ipsec6 d [sp | sa] [Index]

Deletes the security policies (using the sp parameter) or security associations (using the sa parameter) from the list of active security policies and security associations, as specified by index number. You can use ipsec6 sp or ipsec6 sa to display the index number.

ipsec6 m [on | off]

Specifies whether binding updates that are used for mobile IPv6 are protected by IP security. This is enabled by default.

Ping6.exe

You can use Ping6.exe to send ICMPv6 Echo Request messages to perform network diagnostics and test reachability for a specific destination.

Ping6.exe has the following syntax:

ping6 [-t] [-a] [-n Count] [-l Size] [-w Timeout] [-s SrcAddr] [-r] {Name|Dest[%ScopeID]}

where

-t pings the specified computer until the Ping6 tool is interrupted.

-a resolves addresses to computer names.

-n sends the number of Echo Request messages specified in Count. The default is 4.

-l sends Echo Request messages that contain the amount of data specified by Length. The default is 32 bytes, and the maximum is 65,527 bytes.

-w specifies a time-out interval in milliseconds. The default is 4000.

-s specifies the source address in the Echo Request messages. This is required for link-local destination addresses.

-r specifies that the IPv6 Routing extension header be used to send an Echo Request message to the local host, using the destination as an intermediate destination.

Name specifies the destination name.

Dest specifies the destination address.

ScopeID specifies the scope or zone of the destination for Echo Request messages. For link-local addresses, ScopeID is equal to the interface index, as displayed in the output of the ipv6 if command. For site-local addresses, ScopeID is equal to the site number, as displayed in the output of the ipv6 if command. If multiple sites are not being used, a scope ID for site-local addresses is not required. ScopeID is not required when the destination is a global address.

Tracert6.exe

You can use Tracert6.exe to send ICMPv6 Echo Request messages to discover and display the path between the sending host and a destination.

Tracert6.exe has the following syntax:

tracert6 [-d] [-h MaximumHops] [-w Timeout] [-s SrcAddr] [-r] {Name|Dest[%ScopeID]}

where

-d prevents a DNS reverse query from being performed on every intermediate router address.

-h specifies the maximum number of hops over which the tracert packets can travel to reach the destination.

-w specifies a time-out interval in milliseconds. The default is 4000.

-s specifies the source address in the Echo Request messages.

-r specifies that the IPv6 Routing extension header be used to send an Echo Request message to the local host, using the destination as an intermediate destination.

Name specifies the destination name.

Dest specifies the destination address.

ScopeID specifies the scope or zone for the destination of Echo Request messages. For link-local addresses, ScopeID is equal to the interface index, as displayed in the output of the ipv6 if command. For site-local addresses, ScopeID is equal to the site number, as displayed in the output of the ipv6 if command. If multiple sites are not being used, a scope ID for site-local addresses is not required. ScopeID is not required when the destination is a global address.

Netsh interface IPv6 6to4

You can use the following commands in the netsh interface IPv6 6to4 context to configure the behavior or display the configuration of the 6to4 service on either a 6to4 host or a 6to4 router. For more information about using the 6to4 service, see IPv6 traffic between nodes in different sites across the Internet (6to4)

For more information about Netsh, see Using Netsh

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. The InterfaceName parameter must match the name of the interface specified in Network Connections. If the 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.

/? : Displays help at the command prompt.

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.

show interface

Displays the 6to4 service routing configuration on all interfaces or 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. The InterfaceName parameter must match the name of the interface specified in Network Connections. If InterfaceName contains any spaces, it must be enclosed in quotes.

/? : Displays help at the command prompt.

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 that the state of the relay component for the 6to4 service is either enabled, disabled, automatically enabled if a public IPv4 address is configured, or set to its default value.

interval= ResInterval|default : Specifies either how often that the name of the relay router is resolved in minutes ResInterval, or sets the resolution interval to its default value of 1440 minutes (default).

/? : Displays help at the command prompt.

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 that the state of routing on a 6to4 router is either enabled, disabled, automatically enabled if Internet Connection Sharing (ICS) is enabled, or set to its default value.

sitelocals= enabled|disabled|default : Specifies that the advertising of site-local address prefixes in addition to 6to4 address prefixes is either enabled, disabled, or set to its default value.

/? : Displays help at the command prompt.

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.

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 that the state of the 6to4 service is either enabled, disabled, or set to its default value.

undoonstop= enabled|disabled|default : Specifies that the reversal of all automatic configuration performed by the 6to4 service when the service is stopped is either enabled, disabled, or set to its default value.

6over4= enabled|disabled|default : Specifies that the creation of 6over4 interfaces for each configured IPv4 address is either enabled, disabled, or set to its default value.

/? : Displays help at the command prompt.

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.

The default setting for the 6over4= parameter is disabled, which does not create 6over4 interfaces that correspond to the configured IPv4 addresses.

show state

Displays the state of the 6to4 service.

Syntax

show state

reset

Resets the 6to4 service.

Syntax

reset



© 2016 Microsoft Corporation. All rights reserved. Contact Us |Terms of Use |Trademarks |Privacy & Cookies