Netsh Routing IP Relay Context Commands

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

  • The following entries provide details for each command.

dump

Displays the Dynamic Host Configuration Protocol (DHCP) Relay Agent 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 routingiprelay.dmp file.

dump > routingiprelay.dmp

add dhcpserver

Adds a DHCP server to the list of DHCP servers whose messages will be forwarded by DHCP Relay Agent.

Syntax

add dhcpserver

[server=] IPAddress

Parameters

[server=] IPAddress


Required. Specifies, by IP address, the DHCP server you want to add.

Example

To add a DHCP server with the IP address of 10.0.0.1 to the global list of DHCP servers, type:

add dhcpserver 10.0.0.1

add interface

Enables DHCP Relay Agent on the specified interface.

Syntax

add interface

[name=] InterfaceName

Parameters

[name=] InterfaceName


Required. Specifies, by name, the interface on which you want to enable DHCP Relay Agent. 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 enable DHCP Relay Agent on the Local Area Connection interface, type:

add interface "Local Area Connection"

delete interface

Disables DHCP Relay Agent on the specified interface.

Syntax

delete interface

[name=] InterfaceName

Parameters

[name=] InterfaceName


Required. Specifies, by name, the interface on which you want to disable DHCP Relay Agent. 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 disable DHCP Relay Agent on the Local Area Connection interface, type:

delete interface "Local Area Connection"

delete dhcpserver

Removes a DHCP server from the list of DHCP servers whose messages will be forwarded by DHCP Relay Agent.

Syntax

delete dhcpserver

[server=] IPAddress

Parameters

[server=] IPAddress


Required. Specifies, by IP address, the DHCP server to be deleted.

Example

To delete a DHCP server with the IP address of 10.0.0.1 from the global list of DHCP servers, type:

delete dhcpserver 10.0.0.1

set global

Sets global parameters for DHCP Relay Agent configuration.

Syntax

set global

[loglevel=] {none | error | warn | info}

Parameters

[loglevel=] {none | error | warn | info}


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

Example

To configure global parameters for DHCP Relay Agent to not log events, type:

set global loglevel=none

set interface

Updates the DHCP Relay Agent configuration on an interface.

Syntax

set interface

[name=] InterfaceName

[relaymode=] {enable | disable}

[[maxhop=] Integer]

[[minsecs=] Integer]

Parameters

[name=] InterfaceName


Required. Specifies, by name, the interface on which you want to update the configuration of DHCP Relay Agent. 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").
[relaymode=] {enable | disable}


Required. Specifies whether the DHCP Relay Agent is enabled or disabled. The enable parameter specifies that DHCP Relay Agent should be enabled for this interface. The disable parameter disables DHCP Relay Agent for this interface.
[[maxhop=] Integer]


Specifies the number of hops a DHCP packet can make before it should be dropped and should no longer be relayed.
[[minsecs=] Integer]


Specifies the minimum number of seconds from boot time that must appear in a DHCP packet before it should be sent to a DHCP server in the list of servers whose messages will be forwarded by DHCP Relay Agent.

Example

To update the DHCP Relay Agent configuration on the interface named Local Area Connection with a maximum hop count of 16 and a value of 4 seconds for the minimum seconds from boot time, type:

set interface name="Local Area Connection" enable 16 4

show interface

Displays configuration information for DHCP Relay Agent on the specified interface. Used without parameters, show interface displays DHCP Relay Agent configuration information for all interfaces.

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

show global

Displays DHCP Relay Agent global configuration.

Syntax

show global

The information displayed for this command consists of:

Logging Level


Shows the level of logging for events related to DHCP Relay Agent service.
Max Receive Queue Size


The maximum number of DHCP packets the router can have queued at one time (for all interfaces).
Server Count


The number of DHCP servers in the global list.

show ifconfig

Displays DHCP Relay Agent configuration information for the specified interface. Used without parameters, show ifconfig displays information once for all interfaces where DHCP Relay Agent is enabled.

Syntax

show ifconfig

[[index=] Integer]

[[rr=] Integer]

Parameters

[[index=] Integer]


Specifies, by index value, the interface for which you want to display information.
[[rr=] Integer]


Specifies, in seconds, how often you want the information to be refreshed.

Example

To display the DHCP Relay Agent configuration with a 5-second refresh interval, type:

show ifconfig rr=5

show ifbinding

Displays IP address bindings for the specified interface. Used without parameters, show ifbinding displays information once for all interfaces where DHCP relay is enabled for use.

Syntax

show ifbinding

[[index=] Integer]

[[rr=] Integer]

Parameters

[[index=] Integer]


Specifies, by index value, the interface for which you want to display information.
[[rr=] Integer]


Specifies, in seconds, how often you want the information to be refreshed.

Example

To display the IP address bindings for all interfaces, type:

show ifbinding

show ifstats

Displays DHCP Relay Agent statistics for the specified interface. Used without parameters, show ifstats displays information one time for all interfaces where DHCP relay is enabled for use.

Syntax

show ifstats

[[index=] Integer]

[[rr=] Integer]

Parameters

[[index=] Integer]


Specifies, by index value, the interface for which you want to display information.
[[rr=] Integer]


Specifies, in seconds, how often you want the information to be refreshed.

Example

To display DHCP Relay Agent statistics for all interfaces, type:

show ifstats

install

Installs the routing protocol under IP.

Syntax

install

uninstall

Removes the routing protocol corresponding to the current context.

Syntax

uninstall