The following commands are specific to the routing IP routerdiscovery 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 IP routerdiscovery

The following entries provide details for each command.

dump

Displays the router discovery 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\routerdiscoverycfg.dmp file.

  • From the command prompt:

    netsh routing ip routerdiscovery dump > c:\test\routerdiscoverycfg.dmp

  • From the netsh routing ip routerdiscovery context prompt:

    set file open c:\test\routerdiscoverycfg.dmp

    dump

    set file close

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

add interface

Configures router discovery for the specified interface.

Syntax

add interface

name = ] InterfaceName

[ [ disc = ] { enable | disable } ]

[ [ minint = ] Integer ]

[ [ maxint = ] Integer ]

[ [ life = ] Integer ]

[ [ level = ] Integer ]

Parameters

name = ] InterfaceName

Required. Specifies, by name, the interface for which you want to configure router discovery. 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").
disc = ] { enable | disable }

Specifies whether router discovery should occur on this interface.
minint = ] Integer

Specifies a minimum interval, in minutes, between when router discovery packets are sent.
maxint = ] Integer

Specifies a maximum interval, in minutes, between when router discovery packets are sent.
life = ] Integer

Specifies the number of minutes for which a router discovery packet sent from this router or server is valid.
level = ] Integer

Specifies a number indicating preference for using this interface as the default gateway. Where multiple interfaces are enabled for router discovery, a higher number used here indicates a higher level of preference.

Remarks

  • When enabled, router discovery advertisements are sent at random times bounded by the set minimum and maximum intervals.

Example

To enable router discovery for the “Local Area Connection” interface, specifying a minimum interval of 7 minutes, a maximum interval of 10 minutes, a life of 30 minutes for router discovery packets, and a zero (0) or no preference level, type:

add interface "Local Area Connection" enable 7 10 30 0

set interface

Configures router discovery for the specified interface.

Syntax

set interface

name = ] InterfaceName

[ [ disc = ] { enable | disable } ]

[ [ minint = ] Integer ]

[ [ maxint = ] Integer ]

[ [ life = ] Integer ]

[ [ level = ] Integer ]

Parameters

name = ] InterfaceName

Required. Specifies, by name, the interface for which you want to configure router discovery. 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").
disc = ] { enable | disable }

Specifies whether router discovery should occur on this interface.
minint = ] Integer

Specifies, in minutes, a minimum interval between when router discovery packets are sent.
maxint = ] Integer

Specifies, in minutes, a maximum interval between when router discovery packets are sent.
life = ] Integer

Specifies, in minutes, how long a router discovery packet sent from this router or server is valid.
level = ] Integer

Specifies a number indicating preference for using this interface as the default gateway. A higher number used here specifies a higher level of preference.

Example

To enable router discovery for the “Local Area Connection” interface, specifying a minimum interval of 7 minutes, a maximum interval of 10 minutes, a life of 30 minutes for router discovery packets, and a zero (0) or no preference level, type:

set interface name="Local Area Connection" enable 7 10 30 0

delete interface

Deletes router discovery configuration for the specified interface.

Syntax

delete interface

name = ] InterfaceName

Parameters

name = ] InterfaceName

Required. Specifies, by name, the interface for which you want to delete router-discovery configuration. 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").

Example

To delete the router-discovery configuration for an interface named Local Area Connection, type:

delete interface name="Local Area Connection"

show interface

Displays the router discovery configuration. Used without parameters, show interface displays information for all interfaces.

Syntax

show interface

[ [ name = ] InterfaceName ]

Parameters

name = ] InterfaceName

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").

Example

To display router discovery information for an interface named Local Area Connection, type:

show interface name="Local Area Connection"

uninstall

Removes the router discovery protocol from IPv4.

Syntax

uninstall