Export (0) Print
Expand All

Netsh Routing IPv6 Context Commands

Updated: June 3, 2009

Applies To: Windows Server 2008, Windows Server 2008 R2

The following commands are specific to the routing IPv6 context within the Netsh environment.

To view the command syntax, click a command:

Add commands

Delete commands

Set commands

Show commands

The following entries provide details for each command.

Displays the IPv6 configuration of a remote access server in script form.

dump

  • You can dump the contents of the current configuration to a file that can be used to restore altered configuration settings.

The following commands save the current configuration as a script in the c:\test\ipv6cfg.dmp file.

  • From the command prompt:

    netsh routing ipv6 dump > c:\test\ipv6cfg.dmp

  • From the netsh routing ipv6 context prompt:

    set file open c:\test\ipv6cfg.dmp

    dump

    set file close

You can use the netsh exec command to run the script created by the netsh dump command.

Adds an IPv6 packet filter to a specified interface.

add filter

name = ] InterfaceName

filtertype = ] { input | output | dial }

srcaddr = ] IPv6Address

srcprefixlen = ] IPv6PrefixLength

dstaddr = ] IPv6Address

dstprefixlen = ] IPv6PrefixLength

{ [ proto = ] any |

   [ proto = ] { tcp | tcp-est | udp } [ srcport = ] Integerdstport = ] Integer |

proto = ] icmptype = ] Integercode = ] Integer }

name = ] InterfaceName
Required. Specifies, by name, the interface on which to add the filter. 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").

filtertype = ] { input | output | dial }
Specifies the filter type. The input parameter specifies that the filter being created filters input. The output parameter specifies that the filter being created filters output. The dial parameter specifies that the filter being created filters a dial-up connection.

srcaddr = ] IPv6Address
Specifies the source IPv6 address field of the packet to be filtered.

srcprefixlen = ] IPv6PrefixLength
Specifies the source IPv6 prefix length of the packet to be filtered. An address and a prefix length of zero (0) means ANY.

dstaddr = ] IPv6Address
Specifies the destination IPv6 address field of packet to be filtered.

dstprefixlen = ] IPv6PrefixLength
Specifies the destination IPv6 prefix length of packet to be filtered.

proto = ] { any | tcp | tcp-est | udp | icmp }
Specifies the protocol type for the packet to be filtered.

srcport = ] Integer
If proto is set to tcp, tcp-est, or udp, specifies the source port field of the packet to be filtered. A value of zero (0) means ANY.

dstport = ] Integer
If proto is set to tcp, tcp-est, or udp, specifies the destination port field of packet to be filtered. A value of zero (0) means ANY.

type = ] Integer
If proto is set to icmp, specifies the ICMP type field of the packet to be filtered. A value of 255 means ANY.

code = ] Integer }
If proto is set to icmp, specifies the ICMP code field of the packet to be filtered. A value of 255 means ANY.

To add an IPv6 packet filter to the “Virtual Private Connection” interface, type:

add filter name="Virtual Private Connection" filtertype=input srcaddr=3000:1234:1234:1234::1 srcprefixlen=64 dstaddr=3000:1234:1234:1235::1 dstprefixlen=64 proto=any

or

add filter "Virtual Private Connection" input 3000:1234:1234:1234::1 64 3000:1234:1234:1235::1 64 any

Deletes an IPv6 packet filter from a specified interface.

delete filter

name = ] InterfaceName

filtertype = ] { input | output | dial }

srcaddr = ] IPv6Address

srcprefixlen = ] IPv6PrefixLength

dstaddr = ] IPv6Address

dstprefixlen = ] IPv6PrefixLength

{ [ proto = ] any |

   [ proto = ] { tcp | tcp-est | udp } [ srcport = ] Integerdstport = ] Integer |

proto = ] icmptype = ] Integercode = ] Integer }

name = ] InterfaceName
Required. Specifies, by name, the interface from which you want to remove the filter. 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").

filtertype = ] { input | output | dial }
Specifies the filter type. The input parameter specifies that the filter being deleted filters input. The output parameter specifies that the filter being deleted filters output. The dial parameter specifies that the filter being deleted filters a dial-up connection.

srcaddr = ] IPv6Address
Specifies the source IPv6 address field of the packet to be filtered.

srcprefixlen = ] IPv6PrefixLength
Specifies the source IPv6 prefix length of the packet to be filtered. An address and a prefix length of zero (0) means ANY.

dstaddr = ] IPv6Address
Specifies the destination IPv6 address field of packet to be filtered.

dstprefixlen = ] IPv6PrefixLength
Specifies the destination IPv6 prefix length of packet to be filtered.

proto = ] { any | tcp | tcp-est | udp | icmp }
Specifies the protocol type for the packet to be filtered.

srcport = ] Integer
If proto is set to tcp, tcp-est, or udp, specifies the source port field of the packet to be filtered. A value of zero (0) means ANY.

dstport = ] Integer
If proto is set to tcp, tcp-est, or udp, specifies the destination port field of packet to be filtered. A value of zero (0) means ANY.

type = ] Integer
If proto is set to icmp, specifies the ICMP type field of the packet to be filtered. A value of 255 means ANY.

code = ] Integer }
If proto is set to icmp, specifies the ICMP code field of the packet to be filtered. A value of 255 means ANY.

To delete an IPv6 packet filter from the “Virtual Private Connection” interface that matches the specified parameters, type:

delete filter name="Virtual Private Connection" filtertype=input srcaddr=3000:1234:1234:1234::1 srcprefixlen=64 dstaddr=3000:1234:1234:1235::1 dstprefixlen=64 proto=any

Modifies the default action or fragment checking for an IPv6 packet filter.

set filter

name = ] InterfaceName

[ [ filtertype=] { input | output | dial } [ action = ] { drop | forward } ]

[ [ fragcheck = ] IPv6PrefixLength ]

name = ] InterfaceName
Required. Specifies, by name, the interface on which to modify the filter. 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").

filtertype = ] { input | output | dial }
Specifies the filter type. The input parameter specifies that the filter being modified filters input. The output parameter specifies that the filter being modified filters output. The dial parameter specifies that the filter being modified filters a dial-up connection.

action = ] { drop | forward }
Specifies the action to be taken when a packet does not match any filter. The drop parameter specifies that unmatched packets are dropped. The forward parameter specifies that unmatched packets are forwarded.

fragcheck = ] { enable | disable }
Specifies whether fragment checking is enabled or disabled for input packets.

To set the IPv6 packet filter action for dial-up connections for the “Dial-up Connection” interface, type:

set filter name="Dial-up Connection" filtertype=dial action=forward

Displays IPv6 packet filter information for the specified interface. Used without parameters, show filter displays configuration information for all interfaces.

show filter

name = ] InterfaceName

name = ] InterfaceName
Required. Specifies, by name, the interface for which you want to display 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").

Adds a persistent static route to the specified interface.

add persistentroute

dest = ] IPv6Address

prefixlength = ] IPv6PrefixLength

name = ] InterfaceName

[ [ nhop = ] IPv6Address ]

[ [ proto = ] { static | nondod } ]

[ [ metric = ] Integer ]

dest = ] IPv6Address
Required. Specifies the destination IPv6 address for the specified route.

prefixlength = ] IPv6PrefixLength
Specifies the prefix length for the destination address.

name = ] InterfaceName
Required. Specifies the interface where the route is to be added.

nhop = ] IPv6Address
Specifies the next hop IPv6 address for the route. For routes over point-to-point interfaces, this value is not needed.

proto = ] { static | nondod }
Specifies one of the following values:

  • static: trigger demand-dial connection (default)

  • nondod: do not trigger demand-dial connection

metric = ] Integer
Specifies the metric for the route.

To add a persistent static route to the “Local Area Connection” interface, type:

add persistentroute dest=3000:1234:5678::1 prefixlength=48 name="Local Area Connection" proto=static metric=1

Deletes a persistent static route from the specified interface.

delete persistentroute

dest = ] IPv6Address

prefixlength = ] IPv6PrefixLength

name = ] InterfaceName

[ [ nhop = ] IPv6Address ]

dest = ] IPv6Address
Required. Specifies the destination IPv6 address for the specified route.

prefixlength = ] IPv6PrefixLength
Specifies the prefix length for the destination address.

name =] InterfaceName
Required. Specifies the interface where the route is to be added.

nhop = ] IPv6Address
Specifies the next hop IPv6 address for the route. For routes over point-to-point interfaces, this value is not required.

To delete a persistent static route from the “Local Area Connection” interface, type:

delete persistentroute dest=3000:1234:5678::1 prefixlen=48 name="Local Area Connection"

Modifies a persistent static route on the specified interface.

set persistentroute

dest = ] IPv6Address

prefixlength = ] IPv6PrefixLength

name = ] InterfaceName

[ [ nhop = ] IPv6Address ]

[ [ proto = ] { static | nondod } ]

[ [ metric = ] Integer ]

dest = ] IPv6Address
Required. Specifies the destination IPv6 address for the specified route.

prefixlength =] IPv6PrefixLength
Specifies the prefix length for the destination address.

name = ] InterfaceName
Required. Specifies the interface where the route is to be added.

nhop = ] IPv6Address
Specifies the next hop IPv6 address for the route. For routes over point-to-point interfaces, this value is not required.

proto = ] { static | nondod }
Specifies one of the following values:

  • static: trigger demand-dial connection (default)

  • nondod: do not trigger demand-dial connection

metric = ] Integer
Specifies the metric for the route.

To modify a persistent static route on the interface named Local Area Connection, type:

set persistentroute dest=3000:1234:5678::1 prefixlen=48 name="Local Area Connection" proto=static metric=2

Displays persistent static routes.

show persistentroutes

name = ] InterfaceName

name = ] InterfaceName
Specifies the interface where persistent routes are used.

To display persistent routes for all interfaces, type:

show persistentroutes

To display persistent routes for the “Local Area Connection” interface, type:

show persistentroutes name="Local Area Connection"

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft