[an error occurred while processing this directive]

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

The following entries provide details for each command.

dump

Displays the demand-dial 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 routingdemanddialcfg.dmp file.

dump > routingdemanddialcfg.dmp

add interface

Adds a new demand-dial interface.

Syntax

add interface

[name=] InterfaceName

[type=] vpn | dialup

[host=] HostName

[device=] DeviceName

[user=] UserName

[password=] Password

Parameters

[name=] InterfaceName


Required. Specifies the name of the demand-dial interface.
[type=] {vpn | dialup}


Required. Specifies the type of demand-dial connection: VPN or dial-up.
[host=] HostName


Required. For a connection using a VPN device, specifies the host name or IP address of the remote computer. For a connection using a physical device, such as a modem, specifies a comma-separated list of phone numbers (primary, alternate1, alternate2, and so on).
[device=] DeviceName


Required. For a connection using a VPN device, specifies the type of VPN connection. For a connection using a physical device, such as a modem, specifies the name of the dial-up device.
[user=] UserName


Required. Specifies the user name dial-out credential in the format domain\username.
[password=] Password


Required. Specifies the password dial-out credential.

Remarks

By default, the following parameters are set for the new demand-dial connection:

idletime= 5


Idle time, in minutes, before hanging up
redialatt= 0


Redial attempts
redialinterval= 1


Interval, in minutes, between redial attempts
swc= enabled, lcp= enabled


PPP settings: enable Link Control Protocol (LCP) extensions, enable software compression
encryption= req


Require data encryption
mschapv2= enabled


MS-CHAP v2 enabled for logon security
restrictions= none


No restriction on dial-out hours

Example

In the following example, a VPN demand-dial interface named VPN1 is added with a connection to host 10.0.0.200. Dial-out credentials are user name Dialin1 and password P@ssword.

add interface name=VPN1 type=vpn host=10.0.0.200

device= auto user=Dialin1 password=P@ssword

delete interface

Deletes a demand-dial interface.

Syntax

delete interface

[name=] InterfaceName

Parameters

[name=] InterfaceName


Required. Specifies the name of the demand-dial interface.

Example

The following is an example of removing the VPN1 demand-dial interface.

delete interface VPN1

set interface

Sets the options for a demand-dial interface.

Syntax

set interface

[name=] InterfaceName

[host=] HostName

[device=] DeviceName

[conntype=] {dd | persistent}

[idletime=] Time

[redialatt=] Number

[redialinterval=] Interval

[callback=] {enabled | disabled}

[restrictions=] Times

Parameters

[name=] InterfaceName


Required. Specifies the name of the demand-dial interface.
[host=] HostName


Required. For a connection using a VPN device, specifies the host name or IP of the remote computer. For a connection using a physical device, such as a modem, specifies a comma-separated list of phone numbers (primary, alternate1, alternate2, and so on).
[device=] DeviceName


Required. For a connection using a VPN device, specifies the type of VPN connection. For a connection using a physical device, such as a modem, specifies the name of the dial-up device.
[conntype=] {dd | persistent}


Required. Specifies the connection type: Demand-dial or Persistent.
[idletime=] Time


Required. Specifies the idle time, in minutes, before hanging up. Allowed values, in minutes: 0 (Never), 1, 5, 20, 30, 60 (1 hour), 120 (2 hours), 240 (4 hours), 480 (8 hours), 720 (12 hours).
[redialatt=] Number


Required. Specifies the number of redial attempts.
[redialinterval=] Interval


Required. Specifies the interval, in minutes, between redial attempts. Allowed values, in seconds: 1, 3, 5, 10, 30, 60 (1 minute), 120 (2 minutes), 300 (5 minutes), 600 (10 minutes).
[callback=] {enabled | disabled}


Required. Specifies whether dial-up callback is enabled or disabled. Callback can reduce phone charges and increase security. The default is disabled.
[restrictions=] Times


Specifies the times during which dial-out is restricted. Format is a comma-separated string where day of the week is specified by a number (Sunday = 0, Monday = 1,… Saturday = 6). Restricted time is specified as follows: <day1><space><time range><space><time range>.

Example

In the following example, a demand-dial interface named VPN1 is added with a connection to host 10.0.0.201, a demand-dial connection type, an idle time of 5 minutes, 3 redial attempts, a redial interval of 10 minutes, and callback disabled. Dial-out is restricted all Saturday and Sunday from midnight to noon and 3:00 P.M. to midnight.

set interface name=VPN1 host=10.0.0.201 device=auto conntype=dd idletime=5 redialatt=3 redialinterval=10 callback=disabled restriction = “6 00:00-24:00, 0 00:00-12:00 15:00-24:00”

show interface

Shows the settings for the specified demand-dial interface. Used without parameters, show interface displays demand-dial configuration 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").

set callbackdevice

Sets the callback number of the callback device for the specified demand-dial interface.

Syntax

set callbackdevice

[name= ] CallbackDevice

[number= ] Number

Parameters

[name=] CallbackDevice


Required. Specifies the callback device.
[number=] Number


Required. Specifies the callback phone number.

Example

The following sets the callback number of device Standard 56000 bps Modem to (425) 555-0110.

set callbackdevice name="standard 56000 bps modem (com1)" number=4255550110

show callbackdevice

Shows the callback number of the callback device for the specified demand-dial interface.

Syntax

show callbackdevice

[[name=] CallbackDevice]

Parameters

[[name=] CallbackDevice]


Specifies the callback device. If you do not specify a device, all the callback devices are listed.

set credentials

Sets the dial-out credentials for the specified demand-dial interface.

Syntax

set credentials

[name= ] InterfaceName

[user= ] UserName

[password= ] Password

Parameters

[name=] InterfaceName


Required. Specifies the name of the demand-dial interface.
[user=] UserName


Required. Specifies the user name dial-out credential in the format domain\username.
[password=] Password


Required. Specifies the password dial-out credential.

Example

The following sets the dial-out credentials for the VPN1 demand-dial interface to: user name Dialin1 and password P@ssword.

set credentials name=vpn1 user=Dialin1 password=P@ssword

set ppp

Sets the PPP options for the specified demand-dial interface.

Syntax

set ppp

[name=] InterfaceName

[lcp=] {enabled | disabled}

[swc=] {enabled | disabled}

[multi=] {enabled | disabled}

Parameters

[name=] InterfaceName


Required. Specifies the name of the demand-dial interface.
[lcp=] {enabled | disabled}


Required. Specifies whether LCP extensions are enabled or disabled. The default is enabled.
[swc=] {enabled | disabled}


Required. Specifies whether software compression is enabled or disabled. The default is enabled.
[multi=] {enabled | disabled}


Required. Specifies whether Multilink negotiation is enabled for a single link connection. The default is disabled.

Example

The following sets the PPP settings for VPN1 demand-dial interface.

set ppp name=vpn1 lcp=disabled swc=enabled multi=disabled

show ppp

Shows the PPP settings for the specified demand-dial interface.

Syntax

show ppp

[name= ] InterfaceName

Parameters

[name=] InterfaceName


Required. Specifies the demand-dial interface.

Example

The following shows the PPP settings for VPN1 demand-dial interface.

show ppp name=vpn1

set security

Sets the security options for the specified demand-dial interface.

Syntax

set security

[name=] InterfaceName

[encryption=] {none | opt | req | max}

[pap=] {enabled | disabled}

[chap=] {enabled | disabled}

[mschapv2=] {enabled | disabled}

[psk=] {enabled | disabled}

[secret=] SharedSecret

Parameters

[name=] InterfaceName


Required. Specifies the name of the demand-dial interface.
[encryption=] {none | opt | req | max}


Required. Specifies the data encryption level to be enforced. None: no encryption allowed. Disconnect if server requests encryption. Opt: encryption is optional. Connect whether or not there is encryption. Req: encryption is required. Disconnect if server does not support encryption. This is the default setting. Max: maximum strength encryption required. Disconnect if server does not support maximum strength encryption.
[pap=] {enabled | disabled}


Required. Specifies Password Authentication Protocol (PAP) authentication is supported. Enable only with encryption=none. Default is disabled.
[chap=] {enabled | disabled}


Required. Specifies MS Challenge Password Authentication Protocol (CHAP) authentication is supported. Enable only with encryption=none. Default is disabled.
[mschapv2=] {enabled | disabled}


Required. Specifies MS Challenge Password Authentication Protocol version 2 (MS-CHAP v2) authentication is supported. Default is enabled.
[psk=] {enabled | disabled}


Required. Specifies preshared key authentication is supported for Internet Key Exchange (IKE). For use with L2TP IPsec VPN VPN type. Default is disabled.
[secret=] SharedSecret


Specifies the preshared key. Use when psk authentication is enabled.

Example

The following sets the security settings for VPN1 demand-dial interface.

set security name=vpn1 encryption=opt pap=disabled chap=disabled mschapv2=enabled psk=disabled

show security

Shows the security settings for the specified demand-dial interface.

Syntax

show security

[name=] InterfaceName

Parameters

[name=] InterfaceName


Required. Specifies the demand-dial interface.

Example

Following shows the security settings for VPN1 demand-dial interface.

show security name=vpn1


[an error occurred while processing this directive]