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
Netsh commands for routing IPv6
The following entries provide details for each command.
dump
Displays the IPv6 configuration of a remote access server in script form.
Syntax
dump
Remarks
- You can dump the contents of the current
configuration to a file that can be used to restore altered
configuration settings.
Example
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.
add filter
Adds an IPv6 packet filter to a specified interface.
Syntax
add filter
[ name = ] InterfaceName
[ filtertype = ] { input | output | dial }
[ srcaddr = ] IPv6Address
[ srcprefixlen = ] IPv6PrefixLength
[ dstaddr = ] IPv6Address
[ dstprefixlen = ] IPv6PrefixLength
{ [ proto = ] any |
[ proto = ] { tcp | tcp-est | udp } [ srcport = ] Integer [ dstport = ] Integer |
[ proto = ] icmp [ type = ] Integer [ code = ] Integer }
Parameters
- [ 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.
Examples
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
delete filter
Deletes an IPv6 packet filter from a specified interface.
Syntax
delete filter
[ name = ] InterfaceName
[ filtertype = ] { input | output | dial }
[ srcaddr = ] IPv6Address
[ srcprefixlen = ] IPv6PrefixLength
[ dstaddr = ] IPv6Address
[ dstprefixlen = ] IPv6PrefixLength
{ [ proto = ] any |
[ proto = ] { tcp | tcp-est | udp } [ srcport = ] Integer [ dstport = ] Integer |
[ proto = ] icmp [ type = ] Integer [ code = ] Integer }
Parameters
- [ 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.
Example
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
set filter
Modifies the default action or fragment checking for an IPv6 packet filter.
Syntax
set filter
[ name = ] InterfaceName
[ [ filtertype=] { input | output | dial } [ action = ] { drop | forward } ]
[ [ fragcheck = ] IPv6PrefixLength ]
Parameters
- [ 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.
Example
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
show filter
Displays IPv6 packet filter information for the specified interface. Used without parameters, show filter displays configuration information for all interfaces.
Syntax
show filter
[ name = ] InterfaceName
Parameters
- [ 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").
add persistentroute
Adds a persistent static route to the specified interface.
Syntax
add persistentroute
[ dest = ] IPv6Address
[ prefixlength = ] IPv6PrefixLength
[ name = ] InterfaceName
[ [ nhop = ] IPv6Address ]
[ [ proto = ] { static | nondod } ]
[ [ metric = ] Integer ]
Parameters
- [ 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
- static: trigger demand-dial connection
(default)
- [ metric = ] Integer
- Specifies the metric for the route.
Example
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
delete persistentroute
Deletes a persistent static route from the specified interface.
Syntax
delete persistentroute
[ dest = ] IPv6Address
[ prefixlength = ] IPv6PrefixLength
[ name = ] InterfaceName
[ [ nhop = ] IPv6Address ]
Parameters
- [ 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.
Example
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"
set persistentroute
Modifies a persistent static route on the specified interface.
Syntax
set persistentroute
[ dest = ] IPv6Address
[ prefixlength = ] IPv6PrefixLength
[ name = ] InterfaceName
[ [ nhop = ] IPv6Address ]
[ [ proto = ] { static | nondod } ]
[ [ metric = ] Integer ]
Parameters
- [ 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
- static: trigger demand-dial connection
(default)
- [ metric = ] Integer
- Specifies the metric for the route.
Example
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
show persistentroutes
Displays persistent static routes.
Syntax
show persistentroutes
[ name = ] InterfaceName
Parameters
- [ name = ] InterfaceName
- Specifies the interface where persistent routes are used.
Examples
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"