Netsh RAS IP Context Commands

The following commands are specific to the ras IP context within the Netsh environment.

To view the command syntax, click a command:

Add commands

Delete commands

Set commands

Show commands

Netsh commands for ras IP

  • The following entries provide details for each command.

dump

Displays the IP 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

Following is the command to save the current configuration as a script in the rasipcfg.dmp file.

dump > rasipcfg.dmp

show config

Displays the current IP configuration of the remote access server.

Syntax

show config

set negotiation

Specifies whether the remote access server should allow IP to be configured for any client connections the server accepts.

Syntax

set negotiation

[mode=] {allow | deny}

Parameters

[mode=] {allow | deny}


Required. Specifies whether to permit IP over client connections. The allow parameter allows IP over client connections. The deny parameter prevents IP over client connections.

set access

Specifies whether IP network traffic from any client should be forwarded to the network or networks to which the remote access server is connected.

Syntax

set access

[mode=] {all | serveronly}

Parameters

[mode=] {all | serveronly}


Required. Specifies whether clients should be able to reach the remote access server and any networks to which it is connected. The all parameter allows clients to reach networks through the server. The serveronly parameter allows clients to reach only the server.

set addrassign

Sets the method by which the remote access server should assign IP addresses to its clients.

Syntax

set addrassign

[method=] {auto | pool}

Parameters

[method=] {auto | pool}


Required. Specifies whether IP addresses should be assigned by using DHCP or from a pool of addresses held by the remote access server. The auto parameter specifies that addresses should be assigned by using DHCP. If no DHCP server is available, a random, private address is assigned. The pool parameter specifies that addresses should be assigned from a pool.

set addrreq

Specifies whether dial-in clients should be able to request their own IP addresses.

Syntax

set addrreq

[mode=] {allow | deny}

Parameters

[mode=] {allow | deny}


Required. Specifies whether clients should be able to request their own IP addresses. The allow parameter allows clients to request addresses. The deny parameter prevents clients from requesting addresses.

set broadcastnameresolution

Enables or disables broadcast name resolution using NetBIOS over TCP/IP.

Syntax

set broadcastnameresolution

[mode=] {enabled | disabled}

Parameters

[mode=] {enabled | disabled}


Required. Specifies whether to enable or disable broadcast name resolution using NetBIOS over TCP/IP. The enabled parameter enables broadcast name resolution using NetBIOS over TCP/IP. The disabled parameter disables broadcast name resolution using NetBIOS over TCP/IP.

Remarks

  • To check the status of broadcastnameresolution, use the dump command.

show broadcastnameresolution

Displays whether broadcast name resolution using NetBIOS over TCP/IP has been enabled or disabled for the remote access server.

Syntax

show broadcastnameresolution

add range

Adds a range of addresses to the pool of static IP addresses that the remote access server can assign to clients.

Syntax

add range

[from=] StartingIPAddress

[to=] EndingIPAddress

Parameters

[from=] StartingIPAddress [to=] EndingIPAddress


Required. Specifies the range of IP addresses to add. The StartingIPAddress parameter specifies the first IP address in the range. The EndingIPAddress parameter specifies the last IP address in the range.

Example

To add the range of IP addresses 10.2.2.10 to 10.2.2.20 to the static pool of IP addresses that the remote access server can assign, type:

add range from=10.2.2.10 to=10.2.2.20

delete range

Deletes a range of addresses from the pool of static IP addresses that the remote access server can assign to clients.

Syntax

delete range

[from=] StartingIPAddress

[to=] EndingIPAddress

Parameters

[from=] StartingIPAddress [to=] EndingIPAddress


Required. Specifies the range of IP addresses to delete. The StartingIPAddress parameter specifies the first IP address in the range. The EndingIPAddress parameter specifies the last IP address in the range.

Example

To delete the range of IP addresses 10.2.2.10 to 10.2.2.20 from the pool of static IP addresses that the remote access server can assign, type:

delete range from=10.2.2.10 to=10.2.2.20

delete pool

Deletes all addresses from the pool of static IP addresses that the remote access server can assign to clients.

Syntax

delete pool

set preferredadapter

Specifies the preferred adapter for Routing and Remote Access service.

Syntax

set preferredadapter

[name=] InterfaceName

Parameters

[name=] InterfaceName


Specifies that the adapter to be used to obtain the IP addresses for allocation (if configured to use DHCP) and the IP address of DHCP and WINS servers for assignment to remote access clients and demand-dial routers. If no interface is specified, the server randomly selects an adapter when the Routing and Remote Access service is started.

show preferredadapter

Displays the preferred adapter for Routing and Remote Access service.

Syntax

show preferredadapter