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 command saves the current configuration as a script in the routingipv6cfg.dmp file.
dump > routingipv6cfg.dmp
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 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.
- [srcaddr=] IPv6Address
- Specifies the source address field of the packet to be filtered.
- [srcprefixlen=] IPv6PrefixLength
- Specifies the source prefix length of the packet to be filtered. An address and a prefix length of zero (0) means ANY.
- [dstaddr=] IPv6Address
- Specifies the destination address field of packet to be filtered.
- [dstprefixlen=] IPv6PrefixLength
- Specifies the destination prefix length of packet to be filtered.
- {[proto=] any | [proto=] {tcp | tcp-est | udp}
- Specifies the protocol type for the packet to be filtered.
- [srcport=] Integer
- Specifies the source port field of the packet to be filtered. A value of zero (0) means ANY.
- [dstport=] Integer | [proto=] icmp
- Specifies the destination port field of packet to be filtered. A value of zero (0) means ANY.
- [type=] Integer
- Specifies the ICMP type field of the packet to be filtered. A value of 255 means ANY.
- [code=] Integer}
- 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 interface named Virtual Private Connection, 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
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 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 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.
- [srcaddr=] IPv6Address
- Specifies the source address field of the packet to be filtered.
- [srcprefixlen=] IPv6PrefixLength
- Specifies the source prefix length of the packet to be filtered. An address and a prefix length of zero (0) means ANY.
- [dstaddr=] IPv6Address
- Specifies the destination address field of packet to be filtered.
- [dstprefixlen=] IPv6PrefixLength
- Specifies the destination prefix length of packet to be filtered.
- {[proto=] any | [proto=] {tcp | tcp-est | udp}
- Specifies the protocol type for the packet to be filtered.
- [srcport=] Integer
- Specifies the source port field of the packet to be filtered. A value of zero (0) means ANY.
- [dstport=] Integer | [proto=] icmp
- Specifies the destination port field of packet to be filtered. A value of zero (0) means ANY.
- [type=] Integer
- Specifies the ICMP type field of the packet to be filtered. A value of 255 means ANY.
- [code=] Integer}
- Specifies the ICMP code field of the packet to be filtered. A value of 255 means ANY.
Example
To add an IPv6 packet filter to the interface named Virtual Private Connection, 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
delete filter "Virtual Private Connection" input 3000:1234:1234:1234::1 64 3000:1234:1234:1235::1 64 any
set filter
Configures the IPv6 packet filter settings for the specified interface.
Syntax
set filter
[name=] InterfaceName
[filtertype=] {input | output | dial}
[action=] IPv6Address
[fragcheck=] IPv6PrefixLength
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 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 the dial-up connection for the interface named Dial-up Connection, 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 remove the use of NAT. 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").
The information displayed for this command consists of:
- Input
- Shows information about input filters.
- Output
- Show information about output filters.
- Demand-dial
- Shows information about demand-dial filters.
- Frag. Check
- Shows if fragment checking is enabled or disabled.
- Interface
- Displays the name of the interface.
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 interface named Local Area Connection, 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 interface named Local Area Connection, 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.
The information displayed for this command consists of:
- Prefix
- Displays the address prefix and prefix length.
- Protocol
- Displays the protocol that added the route.
- Met
- Displays the metric value of the route.
- Gateway
- Displays the IPv6 address of the next hop used in forwarding.
- Interface
- Displays the interface that the route points to and uses.
Examples
To display persistent routes for all interfaces, type:
show persistentroutes
To display persistent routes for the interface named Local Area Connection, type:
show persistentroutes name="Local Area Connection"