Netsh Routing IP Autodhcp Context Commands

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

The following entries provide details for each command.

dump

Displays the DHCP allocator 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 is the command to save the current configuration as a script in the routingipautodhcp.dmp file.

dump > routingipautodhcp.dmp

add exclusion

Adds an IP address exclusion to the DHCP allocator scope.

Syntax

add exclusion IPAddress

Parameters

IPAddress


Required. Specifies an IP address to exclude from the DHCP allocator scope.

Example

To exclude 10.0.0.1 from the addresses that can be allocated dynamically, type:

add exclusion exclusion=10.0.0.1

delete exclusion

Deletes an IP address previously excluded from the DHCP allocator scope.

Syntax

delete exclusion IPAddress

Parameters

IPAddress


Required. Specifies an IP address already excluded from the DHCP allocator scope.

Example

To delete 10.0.0.1 from the list of excluded addresses that cannot be allocated dynamically, type:

delete exclusion exclusion=10.0.0.1

install

Installs the routing protocol under IP.

Syntax

install

set global

Sets global parameters used to support DHCP allocation.

Syntax

set global

{[[scopenetwork=] IPAddress] | [[scopemask=] SubnetMask] | [[leasetime=] Minutes] | [[loglevel=] {none | error | warn | info}]}

Parameters

[scopenetwork=] IPAddress


Specifies the IP network address for the DHCP allocator scope.
[scopemask=] SubnetMask


Specifies the subnet mask associated with the IP network address for the scope.
[leasetime=] Minutes


Specifies the lease duration time, in minutes.
[loglevel=] {none | error | warn | info}


Specifies which events should be logged. The none parameter specifies that no events related to DHCP allocation should be logged. The error parameter specifies that only errors related to DHCP allocation should be logged. The warn parameter specifies that only warnings related to DHCP allocation should be logged. The info parameter specifies that all events related to DHCP allocation should be logged.

Examples

To set the IP network for DHCP allocation to 10.10.10.0, with an associated scope subnet mask of 255.255.255.0, a lease time of 11520 minutes (8 days), and logging of information for all related events, type:

set global 10.10.10.0 255.255.255.0 11520 info

To adjust only the lease time globally for all scopes on all interfaces to a value of 4320 minutes (3 days), type:

set global leasetime=4320

set interface

Configures DHCP allocator parameters for the specified interface.

Syntax

set interface

[name=] InterfaceName

[mode=] {enable | disable}

Parameters

[name=] InterfaceName


Required. Specifies, by name, the interface on which to configure parameters. 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").
[mode=] {enable | disable}


Required. Specifies whether DHCP allocation is enabled or disabled for the interface.

Example

To enable DHCP allocation for interface Local Area Connection, type:

set interface name="Local Area Connection" mode=enable

show global

Displays the DHCP allocator global configuration.

Syntax

show global

The information displayed for this command consists of:

Scope Address


Shows IP address configured for the DHCP allocator scope.
Scope Mask


Shows subnet mask associated with the network IP address.
Lease Time


Shows DHCP lease duration time, in minutes.
Logging Level


Shows the level of logging for events related to DHCP allocation.

show interface

Displays the DHCP allocator configuration for the specified interface.

Syntax

show interface

[name=] InterfaceName

Parameters

[name=] InterfaceName


Required. 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 the DHCP allocator configuration for interface Local Area Connection, type:

show interface name="Local Area Connection"

uninstall

Removes the routing protocol under IP.

Syntax

uninstall