Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

Netsh RAS IP Context Commands

Updated: June 3, 2009

Applies To: Windows Server 2008, Windows Server 2008 R2

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

To view the command syntax, click a command:

Add commands

Delete commands

Set commands

Show commands

  • The IP context is for IP version 4. The following entries provide details for each command.

Displays the IP configuration of a remote access server in script form.

dump

  • You can dump the contents of the current configuration to a file that can be used to restore altered configuration settings.

The following commands save the current configuration as a script in the c:\test\rasipcfg.dmp file.

  • From the command prompt:

    netsh ras ip dump > c:\test\rasipcfg.dmp

  • From the netsh ras ip context prompt:

    set file open c:\test\rasipcfg.dmp

    dump

    set file close

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

Displays the current IPv4 configuration of the remote access server.

show config

Specifies whether the remote access server should allow IPv4 to be used on client connections the server accepts.

set negotiation

mode = ] { allow | deny }

mode = ] { allow | deny }
Required. Specifies whether to permit the use of the IPv4 protocol over client connections. The allow parameter allows IPv4 over client connections. The deny parameter prevents IPv4 over client connections.

Specifies whether IPv4 network traffic from any client are forwarded to the network or networks to which the remote access server is connected.

set access

mode = ] { all | serveronly }

mode = ] { all | serveronly }
Required. Specifies whether clients are 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 and any shared folders that it makes available.

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

set addrassign

method = ] { auto | pool }

method = ] { auto | pool }
Required. Specifies whether IPv4 addresses are assigned by using DHCP or from a pool of addresses held by the remote access server. The auto parameter specifies that addresses are assigned by using DHCP. If no DHCP server is available, a random, private address is assigned. The pool parameter specifies that addresses are assigned from a pool.

Specifies whether dial-up clients are able to request their own IPv4 addresses.

set addrreq

mode = ] { allow | deny }

mode = ] { allow | deny }
Required. Specifies whether clients are able to request their own IPv4 addresses. The allow parameter allows clients to request addresses. The deny parameter prevents clients from requesting addresses.

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

set broadcastnameresolution

mode = ] { enabled | disabled }

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.

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

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

add range

from = ] StartingIPAddress

to = ] EndingIPAddress

from = ] StartingIPAddress [ to = ] EndingIPAddress
Required. Specifies the range of IPv4 addresses to add. The StartingIPAddress parameter specifies the first IPv4 address in the range. The EndingIPAddress parameter specifies the last IPv4 address in the range.

To add the range of IPv4 addresses 10.2.2.10 through 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

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

delete range

from = ] StartingIPAddress

to = ] EndingIPAddress

from = ] StartingIPAddress [ to = ] EndingIPAddress
Required. Specifies the range of IPv4 addresses to delete. The StartingIPAddress parameter specifies the first IPv4 address in the range. The EndingIPAddress parameter specifies the last IPv4 address in the range.

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

delete range from=10.2.2.10 to=10.2.2.20

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

delete pool

Specifies the preferred adapter for the Routing and Remote Access service.

set preferredadapter

name = ] InterfaceName

name = ] InterfaceName
Specifies the adapter used to obtain the IPv4 addresses for allocation (if configured to use DHCP) and the IPv4 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.

Displays the preferred adapter for Routing and Remote Access service.

show preferredadapter

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.